|
@@ -31,6 +31,7 @@ func AutoUpdateUserView() {
|
|
|
go_redis.BRPop2Func(utils.CACHE_KEY_USER_VIEW, func(b []byte) {
|
|
|
var userViewRedisData cache.UserViewRedisData
|
|
|
if err := json.Unmarshal(b, &userViewRedisData); err != nil {
|
|
|
+ //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 {
|
|
@@ -39,6 +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)))
|
|
|
go alarm_msg.SendAlarmMsg(utils.APPNAME+" "+utils.RunMode+" 失败提醒:"+fmt.Sprint("AutoUpdateUserView Update UpdateCompanyProductViewData ERR:", err, ";response data:", string(b)), 2)
|
|
|
}
|
|
|
|
|
@@ -68,10 +70,12 @@ func AutoUpdateUserView() {
|
|
|
}
|
|
|
viewTime, tmpErr := time.ParseInLocation(utils.FormatDateTime, userViewRedisData.ViewTime, time.Local)
|
|
|
if tmpErr != nil {
|
|
|
- go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", err, ";response data:", string(b)), utils.EmailSendToUsers)
|
|
|
+ //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)))
|
|
|
go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+" 失败提醒", fmt.Sprint("AutoUpdateUserView ADD UserReportViewRecord ERR:", err, ";response data:", string(b)), utils.EmailSendToUsers)
|
|
|
}
|
|
|
}
|
|
@@ -80,6 +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)))
|
|
|
go alarm_msg.SendAlarmMsg(utils.APPNAME+" "+utils.RunMode+" 失败提醒:"+fmt.Sprint("AutoUpdateUserView Update UpdateWxUserViewData ERR:", err, ";response data:", string(b)), 2)
|
|
|
}
|
|
|
}
|