Ver código fonte

添加更新时间戳,jy_updatetime

wcc 1 ano atrás
pai
commit
c99902f687
1 arquivos alterados com 4 adições e 3 exclusões
  1. 4 3
      qyxy_inc_data_new/main.go

+ 4 - 3
qyxy_inc_data_new/main.go

@@ -251,9 +251,10 @@ func hookfn(line []byte) {
 	} else {
 		tmp["_id"] = util.IntAll(tmp["id"])
 		tmp["id"] = fmt.Sprintf("%d", util.IntAll(tmp["id"]))
-		if CurrentColl == "company_change" {
-			tmp["jy_updatetime"] = jyUpdatetime
-		}
+		tmp["jy_updatetime"] = time.Now().Unix()
+		//if CurrentColl == "company_change" {
+		//	tmp["jy_updatetime"] = jyUpdatetime
+		//}
 
 		saveInfo := []map[string]interface{}{map[string]interface{}{"_id": tmp["_id"]}, map[string]interface{}{"$set": tmp}}
 		tmpArr := [][]map[string]interface{}{saveInfo}