|
@@ -243,7 +243,6 @@ func SaveRule(c *gin.Context) {
|
|
|
if len(*d) > 0 {
|
|
|
c.JSON(200, gin.H{"msg": "已存在!"})
|
|
|
} else {
|
|
|
-
|
|
|
data["l_lasttime"] = time.Now().Unix()
|
|
|
data["l_date"] = time.Now().Unix()
|
|
|
data["s_user"] = session.Get("username")
|
|
@@ -273,13 +272,13 @@ func Shift(c *gin.Context) {
|
|
|
if str == "" {
|
|
|
c.JSON(200, gin.H{"rep": false})
|
|
|
} else {
|
|
|
- b := Mgo.Update("rc_rule", `{"_id":"`+strs[0]+`","delete":false}`, &map[string]interface{}{
|
|
|
+ b := Mgo.Update("rc_rule", `{"_id":"`+strs[0]+`"}`, &map[string]interface{}{
|
|
|
"$set": map[string]interface{}{
|
|
|
"i_order": qu.IntAll(strs[3]),
|
|
|
},
|
|
|
}, false, false)
|
|
|
if b {
|
|
|
- Mgo.Update("rc_rule", `{"_id":"`+strs[2]+`","delete":false}`, &map[string]interface{}{
|
|
|
+ Mgo.Update("rc_rule", `{"_id":"`+strs[2]+`"}`, &map[string]interface{}{
|
|
|
"$set": map[string]interface{}{
|
|
|
"i_order": qu.IntAll(strs[1]),
|
|
|
},
|