Эх сурвалжийг харах

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 жил өмнө
parent
commit
60ee6e9656

+ 2 - 2
controllers/activity.go

@@ -216,7 +216,7 @@ func (this *ActivityCoAntroller) ScheduleList() {
 			list[k].IsShowSustainable = true
 		}
 		if strings.Contains(v.ChartPermissionName, "研选") && v.ActivityTypeId == 1 {
-			list[k].ActivityTypeName = "买方研选电话会"
+			//list[k].ActivityTypeName = "买方研选电话会"
 			list[k].ImgUrlText = utils.YAN_XUAN_IMG
 		}
 		if v.ActivityType == 0 {
@@ -1987,7 +1987,7 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 			list[k].IsShowSustainable = true
 		}
 		if strings.Contains(v.ChartPermissionName, "研选") && v.ActivityTypeId == 1 {
-			list[k].ActivityTypeName = "买方研选电话会"
+			//list[k].ActivityTypeName = "买方研选电话会"
 			//list[k].ImgUrlText = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202112/20211221/bIdfv8t86xrFRpDOeGGHXOmKEuKl.png"
 			list[k].ImgUrlText = utils.YAN_XUAN_IMG
 		}

+ 1 - 2
controllers/banner.go

@@ -184,13 +184,12 @@ func (this *BannerController) YxSurvey() {
 		item.SellerName = sellerItem.RealName
 	}
 	newId, err := models.AddCygxBannerYxSurvey(item)
-	//err = services.AddCygxBannerYxSurvey(user, content)
-	services.SendCygxBannerYxSurveyTemplateMsg(user, content, int(newId))
 	if err != nil {
 		br.Msg = "申请失败"
 		br.ErrMsg = "申请失败,Err:" + err.Error()
 		return
 	}
+	go services.SendCygxBannerYxSurveyTemplateMsg(user, content, int(newId))
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "记录成功"

+ 10 - 2
services/activity.go

@@ -197,9 +197,17 @@ func SendEmailFileToExpert(cont context.Context) (err error) {
 		msg = "发送附件模版消息失败 Err:" + err.Error()
 		return
 	}
+	var activityIds []int
+	for _, v := range listActivity {
+		activityIds = append(activityIds, v.ActivityId)
+	}
+
+	//{
+	//	utils.SendAlarmMsg("预约外呼名单,会前1小时自动发送邮件给专家组 监控日志,监控使用无需处理,活动ID:"+fmt.Sprint(activityIds), 2)
+	//}
 
 	for _, v := range listActivity {
-		time.Sleep(5 * time.Second) //延时五秒,避免邮件发送不成功
+		time.Sleep(30 * time.Second) //延时30秒,避免邮件发送不成功
 		activityInfo, _ := models.GetAddActivityInfoById(v.ActivityId)
 		if activityInfo == nil {
 			msg = "活动不存在,Err:activityId:" + strconv.Itoa(v.ActivityId)
@@ -295,7 +303,7 @@ func SendEmailFileToExpert(cont context.Context) (err error) {
 			}
 			os.Remove(downLoadnFilePath)
 		} else {
-			go utils.SendEmail("发送附件模版消息失败"+"【"+utils.APPNAME+"】"+time.Now().Format(utils.FormatDateTime), msg+";Err:"+activityInfo.ActivityName, utils.EmailSendToUsers)
+			go utils.SendAlarmMsg("发送附件模版消息失败"+activityInfo.ActivityName, 2)
 			utils.FileLog.Info("发送附件模版消息失败,Err:%s", activityInfo.ActivityName)
 		}
 	}

+ 1 - 1
services/activity_signup.go

@@ -77,7 +77,7 @@ func CheckActivitySignUpLimit(user *models.WxUserItem, activityInfo *models.Acti
 // 校验报名截止时间
 func CheckSiginupDeadline(activityInfo *models.ActivityDetail) (checkTime bool, popupMsg string) {
 	checkTime = true
-	if activityInfo.SiginupDeadline != utils.FormatDateTimeInit {
+	if activityInfo.SiginupDeadline != utils.FormatDateTimeInit && activityInfo.SiginupDeadline != "" {
 		timeResp := utils.StrTimeToTime(activityInfo.SiginupDeadline)
 		if timeResp.Before(time.Now()) {
 			checkTime = false

+ 2 - 4
services/banner_yx_survey.go

@@ -82,7 +82,7 @@ func SendCygxBannerYxSurveyTemplateMsg(user *models.WxUserItem, content string,
 	for _, v := range listMobile {
 		mobiles = append(mobiles, v)
 	}
-
+	mobiles = append(mobiles, utils.MobileShenTao, utils.MobileZhangChuanXin, utils.MobileWangFang) // 添加沈涛、张传星、王芳手机号
 	openIdList, e := models.GetWxOpenIdByMobileSliceList(mobiles)
 	if e != nil {
 		err = errors.New("GetWxOpenIdByMobileSliceList, Err: " + e.Error() + configCode)
@@ -109,9 +109,7 @@ func SendCygxBannerYxSurveyTemplateMsg(user *models.WxUserItem, content string,
 	keyword3 = time.Now().Format(utils.FormatDateTime)
 	keyword4 = fmt.Sprint("研选调研需求:", content)
 	var redirectUrl string
-	if utils.RunMode == "release" {
-		redirectUrl = utils.WX_MSG_PATH_YX_SURVEY_DETAIL + strconv.Itoa(articleId)
-	}
+	redirectUrl = utils.WX_MSG_PATH_YX_SURVEY_DETAIL + strconv.Itoa(articleId)
 	sendInfo := new(SendWxTemplate)
 	sendInfo.Keyword1 = keyword1
 	sendInfo.Keyword2 = keyword2

+ 1 - 1
utils/config.go

@@ -171,7 +171,7 @@ func init() {
 		EmailTechnology = "mlluo@hzinsights.com;jxu@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com;hwang@hzinsights.com;rli@hzinsights.com"       //科技行业专家邮箱
 		EmailMedicine = "xlzheng@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com;yxyan@hzinsights.com;ppwang@hzinsights.com"                       //医药行业专家邮箱
 		EmailConsumption = "yrhuang@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com;jxu@hzinsights.com;hychen@hzinsights.com;lwang@hzinsights.com" //消费行业专家邮箱
-		EmailZhizao = "xfma@hzinsights.com;agne@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com;kfyu@hzinsights.com"                               //智造行业专家邮箱
+		EmailZhizao = "xfma@hzinsights.com;agne@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com"                                                   //智造行业专家邮箱
 		EmailStrategy = "experts@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com"                                                                  //策略行业专家邮箱
 		EmailExpert = "experts@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com"                                                                    //研选行业专家邮箱
 		EmaiWhiteUserList = "tshen@hzinsights.com;cxzhang@hzinsights.com;yyli@hzinsights.com"                                                                                       //白名单邮箱

+ 7 - 1
utils/constants.go

@@ -181,7 +181,7 @@ const (
 	WX_MSG_PATH_RESEARCHTHEME_DETAIL     = "reportPages/researchTheme/researchTheme?id="                  //主题详情模板消息地址
 	WX_MSG_PATH_ACTIVITY_SIGN            = "pages-message/activityTemplate/activityTemplate?id="          //活动模板消息地址
 	WX_MSG_PATH_APPLY_DETAIL             = "pages-message/applyFor/applyFor?id="                          //潜在用户试用权限申请
-	WX_MSG_PATH_YX_SURVEY_DETAIL         = "pages-purchaser/survey/surveyDetail?suveryId="                //用户提交研选调研需求
+	WX_MSG_PATH_YX_SURVEY_DETAIL         = "pages-purchaser/survey/surveyDetail?surveyId="                //用户提交研选调研需求
 	WX_MSG_PATH_APPLY_COLLECTION_DETAIL  = "reportPages/bulletinDetail/bulletinDetail?id="                //精选看板申请详情页
 )
 
@@ -218,3 +218,9 @@ const (
 	TPL_MSG                     = "tpl_msg"                     //王芳手机号地址参数
 	TPL_MSG_NEI_RONG_ZU         = "tpl_msg_nei_rong_zu"         //内容组四人
 )
+
+const (
+	MobileShenTao       = "18767183922" //沈涛手机号
+	MobileZhangChuanXin = "15557270714" // 张传星手机号
+	MobileWangFang      = "18621268829" // 王芳手机号
+)