Browse Source

字段修改

unknown 6 years ago
parent
commit
32b6f32b76
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/jy/admin/audit/rulemanager.go

+ 9 - 9
src/jy/admin/audit/rulemanager.go

@@ -77,8 +77,8 @@ func init() {
 func GetRecogField(c *gin.Context) {
 	data, _ := Mgo.Find("rc_field", `{"delete":false}`, `{"i_order":1}`, nil, false, -1, -1)
 	for _, d := range *data {
-		timeStr := time.Unix(d["l_lasttime"].(int64), 0).Format(Date_Short_Layout)
-		d["l_lasttime"] = timeStr
+		timeStr := time.Unix(d["l_createtime"].(int64), 0).Format(Date_Short_Layout)
+		d["l_createtime"] = timeStr
 	}
 	c.JSON(200, gin.H{"data": data})
 }
@@ -125,8 +125,8 @@ func GetClass(c *gin.Context) {
 	s_fid, _ := c.GetPostForm("fid")
 	data, _ := Mgo.Find("rc_class", `{"s_fid":"`+s_fid+`","delete":false}`, `{"i_order":1}`, nil, false, -1, -1)
 	for _, d := range *data {
-		timeStr := time.Unix(d["l_lasttime"].(int64), 0).Format(Date_Short_Layout)
-		d["l_lasttime"] = timeStr
+		timeStr := time.Unix(d["l_createtime"].(int64), 0).Format(Date_Short_Layout)
+		d["l_createtime"] = timeStr
 	}
 	c.JSON(200, gin.H{"data": data})
 }
@@ -146,7 +146,7 @@ func SaveClass(c *gin.Context) {
 		if len(*class) > 0 {
 			c.JSON(200, gin.H{"rep": false})
 		} else {
-			data["l_lasttime"] = time.Now().Unix()
+			data["l_createtime"] = time.Now().Unix()
 			//data["l_date"] = time.Now().Unix()
 			data["s_user"] = session.Get("username")
 			data["i_order"] = GetOrder("class")
@@ -205,8 +205,8 @@ func GetRule(c *gin.Context) {
 	cid, _ := c.GetPostForm("cid")
 	data, _ := Mgo.Find("rc_rule", `{"s_classid":"`+cid+`","delete":false}`, `{"i_order":1}`, nil, false, -1, -1)
 	for _, d := range *data {
-		timeStr := time.Unix(d["l_lasttime"].(int64), 0).Format(Date_Short_Layout)
-		d["l_lasttime"] = timeStr
+		timeStr := time.Unix(d["l_createtime"].(int64), 0).Format(Date_Short_Layout)
+		d["l_createtime"] = timeStr
 	}
 	c.JSON(200, gin.H{"data": data})
 }
@@ -245,8 +245,8 @@ 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["l_createtime"] = time.Now().Unix()
+			//data["l_date"] = time.Now().Unix()
 			data["s_user"] = session.Get("username")
 			data["i_order"] = GetOrder("rule")
 			data["delete"] = false