Explorar o código

Merge branch 'cygx_12.2' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai hai 1 ano
pai
achega
8bb4fd0973
Modificáronse 3 ficheiros con 13 adicións e 11 borrados
  1. 3 1
      controllers/activity.go
  2. 9 9
      services/activity_wx_template_msg.go
  3. 1 1
      services/resource_data.go

+ 3 - 1
controllers/activity.go

@@ -899,7 +899,7 @@ func (this *ActivityCoAntroller) SignupAdd() {
 
 	//公司线下调研活动客户报名后给建会人,所属销售推送模板信息
 	if signupStatus == "Success" {
-		go services.SendResearchActivitiesTemplateMsg(user, activityInfo)
+		go services.SendResearchActivitiesTemplateMsg(user, activityInfo, "报名")
 	}
 	if signupType == 1 && user.IsMsgOutboundMobile == 0 {
 		resp.GoOutboundMobile = true
@@ -1040,6 +1040,8 @@ func (this *ActivityCoAntroller) SignupCancel() {
 		go services.SendActivitieCancelSignTemplateMsg(user, activityInfo)
 	}
 
+	go services.SendResearchActivitiesTemplateMsg(user, activityInfo, "取消报名") //公司线下调研活动客户报名后给建会人,所属销售推送模板信息
+
 	go services.YanXuanActivityPointsBillSignupCancel(activityId, uid) // 用户取消报名添加到处理研选扣点
 
 	br.Ret = 200

+ 9 - 9
services/activity_wx_template_msg.go

@@ -10,7 +10,7 @@ import (
 )
 
 // SendResearchActivitiesTemplateMsg 线下调研活动报名给所属销售跟建会人员推送
-func SendResearchActivitiesTemplateMsg(user *models.WxUserItem, activityDetail *models.ActivityDetail) (err error) {
+func SendResearchActivitiesTemplateMsg(user *models.WxUserItem, activityDetail *models.ActivityDetail, doStatus string) (err error) {
 	//如果不是公司线下调研就返回
 	if activityDetail.ActivityTypeId != 4 {
 		return
@@ -47,12 +47,12 @@ func SendResearchActivitiesTemplateMsg(user *models.WxUserItem, activityDetail *
 	var remark string
 	var redirectUrl string
 
-	first = "【" + activityDetail.ActivityName + "】有客户报名"
-	keyword1 = user.RealName + "——" + user.CompanyName + "(所属销售:" + sellerItem.RealName + ")"
+	//first = "【" + activityDetail.ActivityName + "】有客户报名"
+	keyword1 = user.RealName + "——" + user.CompanyName + "(" + sellerItem.RealName + ")"
 	keyword2 = user.Mobile
 	keyword3 = time.Now().Format(utils.FormatDateTime)
-	keyword4 = activityDetail.ActivityName
-	remark = "点击查看报告详情"
+	keyword4 = doStatus + ":" + activityDetail.ActivityName
+	//remark = "点击查看报告详情"
 
 	openIdList, e := models.GetWxOpenIdByMobileSliceList(mobiles)
 	if e != nil {
@@ -174,10 +174,10 @@ func SendActivitieCancelSignTemplateMsg(user *models.WxUserItem, activityDetail
 		err = errors.New("GetUserRecordListByMobile, Err: " + e.Error() + cnf.ConfigValue)
 		return
 	}
-	keyword1 := user.RealName + "--" + user.CompanyName + "(" + sellerItemQy.RealName +")"
+	keyword1 := user.RealName + "--" + user.CompanyName + "(" + sellerItemQy.RealName + ")"
 	keyword2 := user.Mobile
 	keyword3 := time.Now().Format(utils.FormatDateTime)
-	keyword4 := "取消报名" + "【" +activityDetail.ActivityName+"】"
+	keyword4 := "取消报名" + "【" + activityDetail.ActivityName + "】"
 	openIdArr := make([]string, 0)
 	for _, v := range openIdList {
 		openIdArr = append(openIdArr, v.OpenId)
@@ -219,10 +219,10 @@ func SendNeiRongZuActivitieSignTemplateMsg(user *models.WxUserItem, activityDeta
 		err = errors.New("GetUserRecordListByMobile, Err: " + e.Error() + cnf.ConfigValue)
 		return
 	}
-	keyword1 := user.RealName + "--" + user.CompanyName + "(" + sellerItemQy.RealName +")"
+	keyword1 := user.RealName + "--" + user.CompanyName + "(" + sellerItemQy.RealName + ")"
 	keyword2 := user.Mobile
 	keyword3 := time.Now().Format(utils.FormatDateTime)
-	keyword4 := "报名"  + "【" +activityDetail.ActivityName+"】"
+	keyword4 := "报名" + "【" + activityDetail.ActivityName + "】"
 	openIdArr := make([]string, 0)
 	for _, v := range openIdList {
 		openIdArr = append(openIdArr, v.OpenId)

+ 1 - 1
services/resource_data.go

@@ -162,7 +162,7 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
 			err = errors.New("GetCygxProductInteriorList, Err: " + e.Error())
 			return
 		}
-		ProductInteriorHistoryMap := GetCygxProductInteriorHistoryListPvMap(articleIds)
+		ProductInteriorHistoryMap := GetCygxProductInteriorHistoryListPvMap(productinteriorIds)
 		for _, v := range listProductInterior {
 			v.Body = ProductInteriorHtml(v.Body)
 			v.Pv = ProductInteriorHistoryMap[v.ProductInteriorId]