Parcourir la source

中标预测 邮件提醒

wangshan il y a 4 ans
Parent
commit
f13cfd6cf6
1 fichiers modifiés avec 16 ajouts et 13 suppressions
  1. 16 13
      src/jfw/modules/bigmember/src/service/analysis/forecastwinner.go

+ 16 - 13
src/jfw/modules/bigmember/src/service/analysis/forecastwinner.go

@@ -312,19 +312,22 @@ func (this *Analysis) FWStatus() {
 				}
 			}
 			if isFFalse > 0 {
-				//预测失败 清除redis数据
-				go ClearRedisInfo(userId)
-				go func() {
-					getRes := new(util.ForecastS)
-					if redis.GetNewInterface("other", redis_forecast_status+userId, &getRes) != nil {
-						log.Println("redis 1获取预测参数有误-", userId)
-					}
-					s_nickname, _ := this.GetSession("s_nickname").(string)
-					if s_nickname == "" {
-						s_nickname, _ = this.GetSession("app_name").(string)
-					}
-					SaveFalseLogAndSendMail(userId, falseMsg, f_id, s_nickname, *getRes)
-				}()
+				if rfrExist && f_id != "" {
+					go func() {
+						//预测失败 清除redis数据
+						ClearRedisInfo(userId)
+						//发送失败邮件提醒
+						getRes := new(util.ForecastS)
+						if redis.GetNewInterface("other", redis_forecast_status+userId, &getRes) != nil {
+							log.Println("redis 1获取预测参数有误-", userId)
+						}
+						s_nickname, _ := this.GetSession("s_nickname").(string)
+						if s_nickname == "" {
+							s_nickname, _ = this.GetSession("app_name").(string)
+						}
+						SaveFalseLogAndSendMail(userId, falseMsg, f_id, s_nickname, *getRes)
+					}()
+				}
 				regMap.Data = map[string]interface{}{
 					"id":      "",
 					"success": false,