|
@@ -9,6 +9,7 @@ import (
|
|
|
"hongze/hz_crm_api/models/cygx"
|
|
|
"hongze/hz_crm_api/services"
|
|
|
cygxService "hongze/hz_crm_api/services/cygx"
|
|
|
+ "hongze/hz_crm_api/services/elastic"
|
|
|
"hongze/hz_crm_api/utils"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -761,14 +762,18 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
br.ErrMsg = "发布失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
//如果是添加多条活动那么就推送多次
|
|
|
for _, v := range activityIdArr {
|
|
|
if req.DoType == 1 {
|
|
|
- go cygxService.DoActivityOnenIdWxTemplateMsg(v)
|
|
|
- go cygxService.UpdateResourceData(v, "activity", "add", time.Now().Format(utils.FormatDateTime))
|
|
|
- go cygxService.YiDongSaveRoadshowDetail(v)
|
|
|
- go cygxService.YanXuanActivityPointsBillActivityPublishAndCancel(v, AdminUser.AdminId, 1) //活动发布以及取消发布处理研选扣点
|
|
|
+ go func() {
|
|
|
+ //同时添加多个活动的时候,避免协程开的过多
|
|
|
+ cygxService.DoActivityOnenIdWxTemplateMsg(v)
|
|
|
+ cygxService.UpdateResourceData(v, "activity", "add", time.Now().Format(utils.FormatDateTime))
|
|
|
+ cygxService.YiDongSaveRoadshowDetail(v)
|
|
|
+ cygxService.YanXuanActivityPointsBillActivityPublishAndCancel(v, AdminUser.AdminId, 1) //活动发布以及取消发布处理研选扣
|
|
|
+ elastic.AddComprehensiveActivity(v) // Es添加活动
|
|
|
+ }()
|
|
|
+
|
|
|
}
|
|
|
go cygxService.MakeActivitySigninImg(v)
|
|
|
}
|
|
@@ -778,8 +783,11 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
go cygxService.UpdateResourceData(req.ActivityId, "activity", "add", time.Now().Format(utils.FormatDateTime))
|
|
|
go cygxService.YanXuanActivityPointsBillActivityPublishAndCancel(activityId, AdminUser.AdminId, 1) //活动发布以及取消发布处理研选扣点
|
|
|
}
|
|
|
+ //如果二次编辑的时候,取消了易董办会选项,那么就对易董发送取消发布到广场的通知
|
|
|
+ if req.IsYidongConduct == 0 {
|
|
|
+ go cygxService.YiDongUpdateActivityStatus(activityId)
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
// 查研观向7.4-更新产业布局时间
|
|
|
if len(industryIds) > 0 {
|
|
|
go cygxService.UpdateIndustryLayoutTime(industryIds, false)
|