|
@@ -345,9 +345,9 @@ func (this *MicroRoadShowController) CommentAdd() {
|
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ var isResearch bool
|
|
|
sourceType := req.SourceType
|
|
|
-
|
|
|
+ title := req.Title
|
|
|
if sourceType == 0 {
|
|
|
sourceType = 1
|
|
|
}
|
|
@@ -362,6 +362,7 @@ func (this *MicroRoadShowController) CommentAdd() {
|
|
|
Content: req.Content,
|
|
|
Title: req.Title,
|
|
|
}
|
|
|
+
|
|
|
var resourceId int
|
|
|
if sourceType == 1 {
|
|
|
activityVoiceInfo, _ := models.GetCygxActivityVoiceByActivityId(req.Id)
|
|
@@ -394,13 +395,26 @@ func (this *MicroRoadShowController) CommentAdd() {
|
|
|
item.IndustryId = microVideo.IndustryId
|
|
|
resourceId = microVideo.IndustryId
|
|
|
}
|
|
|
+
|
|
|
+ if sourceType == 2 || sourceType == 3 {
|
|
|
+ detail, err := models.GetAddActivityInfoById(req.Id)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "操作失败"
|
|
|
+ br.ErrMsg = "活动ID错误,不存在activityId:" + strconv.Itoa(req.Id)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ title = detail.ActivityName
|
|
|
+ if strings.Contains(detail.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
|
|
|
+ isResearch = true
|
|
|
+ }
|
|
|
+ }
|
|
|
msgId, err := models.AddArticleComment(&item)
|
|
|
if err != nil {
|
|
|
br.Msg = "提交失败"
|
|
|
br.ErrMsg = "提交留言失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- services.SendWxMsgWithMicroRoadshowAsk(req, user, resourceId, int(msgId))
|
|
|
+ services.SendWxMsgWithMicroRoadshowAsk(req, user, resourceId, int(msgId), title, isResearch)
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "操作成功"
|