Browse Source

修改模板消息通知

longyu 2 years ago
parent
commit
756f11f79b
1 changed files with 9 additions and 3 deletions
  1. 9 3
      controllers/roadshow/calendar.go

+ 9 - 3
controllers/roadshow/calendar.go

@@ -218,7 +218,7 @@ func (this *CalendarController) Add() {
 		{
 			go func() {
 				sysAdmin, _ := admin.GetAdminWxById(v.ResearcherId)
-				if sysAdmin != nil && req.ActivityType != "内部会议" && req.ActivityType != "报告电话会" {
+				if sysAdmin != nil  {
 					first := "您收到一个新的【" + req.ActivityType + "】申请,请及时处理"
 					keyword1 := sysUser.RealName
 					keyword2 := "--"
@@ -232,7 +232,10 @@ func (this *CalendarController) Add() {
 						keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
 					}
 					remark := "请尽快完成审批"
-					wxAppPath := "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(int(rsCalendarId)) + "&RsCalendarResearcherId=" + strconv.Itoa(int(rsCalendarResearcherId))
+					var wxAppPath string
+					if req.ActivityType != "内部会议" && req.ActivityType != "报告电话会" {
+						wxAppPath = "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(int(rsCalendarId)) + "&RsCalendarResearcherId=" + strconv.Itoa(int(rsCalendarResearcherId))
+					}
 					openIdList, _ := models.GetAdminOpenIdByMobile(sysAdmin.Mobile)
 					if len(openIdList) > 0 {
 						services.SendWxMsgWithRoadshowPending(first, keyword1, keyword2, keyword3, keyword4, remark, wxAppPath, sysAdmin.Mobile)
@@ -1639,7 +1642,10 @@ func (this *CalendarController) Delete() {
 						}
 						keyword2 := "已删除"
 						remark := req.DeleteReason
-						wxAppPath := "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(rsCalendarItem.RsCalendarId) + "&RsCalendarResearcherId=" + strconv.Itoa(rsCalendarResearcherItem.RsCalendarResearcherId)
+						var wxAppPath string
+						if rsCalendarItem.ActivityType == "路演" || rsCalendarItem.ActivityType == "公开会议" {
+							wxAppPath = "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(rsCalendarItem.RsCalendarId) + "&RsCalendarResearcherId=" + strconv.Itoa(rsCalendarResearcherItem.RsCalendarResearcherId)
+						}
 						go services.SendWxMsgWithRoadshowDeleteNotice(first, keyword1, keyword2, remark, wxAppPath, sysAdmin.Mobile)
 					}
 				}