Roc 1 жил өмнө
parent
commit
ea8da81368
1 өөрчлөгдсөн 5 нэмэгдсэн , 6 устгасан
  1. 5 6
      services/task.go

+ 5 - 6
services/task.go

@@ -30,9 +30,8 @@ func AutoUpdateUserView() {
 	for {
 		go_redis.BRPop2Func(utils.CACHE_KEY_USER_VIEW, func(b []byte) {
 			var userViewRedisData cache.UserViewRedisData
-			utils.FileLog.Info("redis:" + string(b))
 			if err := json.Unmarshal(b, &userViewRedisData); err != nil {
-				fmt.Println(utils.APPNAME + " " + utils.RunMode + " 失败提醒:" + fmt.Sprint("AutoUpdateUserView ERR:", err, ";response data:", string(b)))
+				//fmt.Println(utils.APPNAME + " " + utils.RunMode + " 失败提醒:" + fmt.Sprint("AutoUpdateUserView ERR:", err, ";response data:", string(b)))
 				go alarm_msg.SendAlarmMsg(utils.APPNAME+" "+utils.RunMode+" 失败提醒:"+fmt.Sprint("AutoUpdateUserView ERR:", err, ";response data:", string(b)), 2)
 				//}
 				//if _, err := models.AddLogs(&log); err != nil {
@@ -41,7 +40,7 @@ func AutoUpdateUserView() {
 				// 客户的阅读时间
 				err = models.UpdateCompanyProductViewData(userViewRedisData.CompanyId, userViewRedisData.ProductId, userViewRedisData.ViewTime)
 				if err != nil {
-					fmt.Println(utils.APPNAME + " " + utils.RunMode + " 失败提醒:" + fmt.Sprint("AutoUpdateUserView Update UpdateCompanyProductViewData ERR:", err, ";response data:", string(b)))
+					//fmt.Println(utils.APPNAME + " " + utils.RunMode + " 失败提醒:" + fmt.Sprint("AutoUpdateUserView Update UpdateCompanyProductViewData ERR:", err, ";response data:", string(b)))
 					go alarm_msg.SendAlarmMsg(utils.APPNAME+" "+utils.RunMode+" 失败提醒:"+fmt.Sprint("AutoUpdateUserView Update UpdateCompanyProductViewData ERR:", err, ";response data:", string(b)), 2)
 				}
 
@@ -71,12 +70,12 @@ func AutoUpdateUserView() {
 					}
 					viewTime, tmpErr := time.ParseInLocation(utils.FormatDateTime, userViewRedisData.ViewTime, time.Local)
 					if tmpErr != nil {
-						fmt.Println(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", tmpErr, ";response data:", string(b)))
+						//fmt.Println(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", tmpErr, ";response data:", string(b)))
 						go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", tmpErr, ";response data:", string(b)), utils.EmailSendToUsers)
 					} else {
 						err = item.Insert(viewTime.Year(), item)
 						if err != nil {
-							fmt.Println(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", err, ";response data:", string(b)))
+							//fmt.Println(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", err, ";response data:", string(b)))
 							go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", err, ";response data:", string(b)), utils.EmailSendToUsers)
 						}
 					}
@@ -85,7 +84,7 @@ func AutoUpdateUserView() {
 				// 联系人的阅读时间
 				err = models.UpdateWxUserViewData(userViewRedisData.UserId, userViewRedisData.ProductId, userViewRedisData.ViewTime)
 				if err != nil {
-					fmt.Println(utils.APPNAME + " " + utils.RunMode + " 失败提醒:" + fmt.Sprint("AutoUpdateUserView Update UpdateWxUserViewData ERR:", err, ";response data:", string(b)))
+					//fmt.Println(utils.APPNAME + " " + utils.RunMode + " 失败提醒:" + fmt.Sprint("AutoUpdateUserView Update UpdateWxUserViewData ERR:", err, ";response data:", string(b)))
 					go alarm_msg.SendAlarmMsg(utils.APPNAME+" "+utils.RunMode+" 失败提醒:"+fmt.Sprint("AutoUpdateUserView Update UpdateWxUserViewData ERR:", err, ";response data:", string(b)), 2)
 				}
 			}