Explorar o código

与前端联调是否展示预约纪要按钮

xingzai %!s(int64=2) %!d(string=hai) anos
pai
achega
cf92173da9
Modificáronse 4 ficheiros con 28 adicións e 0 borrados
  1. 9 0
      controllers/activity.go
  2. 4 0
      models/activity.go
  3. 11 0
      services/activity.go
  4. 4 0
      services/article.go

+ 9 - 0
controllers/activity.go

@@ -524,6 +524,9 @@ func (this *ActivityCoAntroller) ScheduleList() {
 		}
 		expertTxt, _ := services.GetReportContentTextSub(v.Expert)
 		list[k].Expert = expertTxt
+		if v.IsHideAppointment == 0 {
+			list[k].IsShowAppointment = services.IsShowAppointment(v.ActivityTypeId, v.ChartPermissionName)
+		}
 	}
 	//添加我的日程访问记录
 	item := new(models.CygxPageHistoryRecord)
@@ -818,6 +821,9 @@ func (this *ActivityCoAntroller) Detail() {
 		if activityInfo.ChartPermissionNames != "" {
 			activityInfo.ChartPermissionName = activityInfo.ChartPermissionNames
 		}
+		if activityInfo.IsHideAppointment == 0 {
+			activityInfo.IsShowAppointment = services.IsShowAppointment(activityInfo.ActivityTypeId, activityInfo.ChartPermissionName)
+		}
 		resp.Detail = activityInfo
 	}
 	resp.HasPermission = hasPermission
@@ -2775,6 +2781,9 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 		}
 		expertTxt, _ := services.GetReportContentTextSub(v.Expert)
 		list[k].Expert = expertTxt
+		if v.IsHideAppointment == 0 {
+			list[k].IsShowAppointment = services.IsShowAppointment(v.ActivityTypeId, v.ChartPermissionName)
+		}
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp := new(models.GetCygxActivityListRep)

+ 4 - 0
models/activity.go

@@ -99,6 +99,8 @@ type ActivityDetail struct {
 	AppAttendance           string `description:"App参会"`
 	ConferencePassword      string `description:"会议密码"`
 	Scale                   string `description:"管理规模,空不填,1::50亿以下,2:50~100亿,3:100亿以上。多个用, 隔开"`
+	IsShowAppointment       bool   `description:"是否展示预约纪要"`
+	IsHideAppointment       int    `description:"是否隐藏预约纪要按钮  1是,0 否"`
 }
 
 type CygxActivityResp struct {
@@ -160,6 +162,7 @@ type CygxActivityList struct {
 	Expert                  string `description:"专家"`
 	IsSignup                int    `description:"是否已报名 1是 ,0 否"`
 	IsAppointment           int    `description:"是否已预约纪要 1是 ,0 否"`
+	IsShowAppointment       bool   `description:"是否展示预约纪要"`
 	SignupNum               int    `description:"已报名人数"`
 	ActiveState             string `description:"活动进行状态 未开始:1、进行中2、已结束3"`
 	IsCancelMeetingReminder int    `description:"是否取消会议提醒 1展示取消会议提醒 ,0展示会议提醒"`
@@ -169,6 +172,7 @@ type CygxActivityList struct {
 	ImgUrl                  string `description:"图片链接"`
 	ImgUrlText              string `description:"图片链接文字"`
 	ActivityType            int    `description:"活动线上线下类型 1线上,0 线下"`
+	IsHideAppointment       int    `description:"是否隐藏预约纪要按钮  1是,0 否"`
 	JmcjRoadshowTitle       string `description:"进门财经手动匹配的活动名称"`
 }
 

+ 11 - 0
services/activity.go

@@ -1072,3 +1072,14 @@ func SendSpecialTemplateMsg(applyName, applyTime, mobile, activityName, openId,
 	sendTemplateMsg(sendUrl, openId, sendMap)
 	return
 }
+
+//判断预约纪要按钮是否显示
+func IsShowAppointment(activityTypeId int, chartPermissionName string) (isShowAppointment bool) {
+	if activityTypeId == 1 || activityTypeId == 2 || activityTypeId == 3 || activityTypeId == 4 {
+		isShowAppointment = true
+	}
+	if activityTypeId == 5 && chartPermissionName == "医药" {
+		isShowAppointment = true
+	}
+	return
+}

+ 4 - 0
services/article.go

@@ -591,6 +591,7 @@ func GetArticleListByApi(cont context.Context) (err error) {
 				fmt.Println("AddCygxArticle Err:", err.Error())
 				return err
 			}
+			//报告自动归类,以及推送相关模板消息
 			if v.ReportType == 2 {
 				var subjectStr string
 				var industrialManagementIdStr string
@@ -664,6 +665,9 @@ func GetArticleListByApi(cont context.Context) (err error) {
 					}
 				}
 			}
+
+			//类型ID 医药(医享会:28 、药调研:301)、消费【渠道新声:32】、科技【科技前言:79】、智造【匠心智造:84】
+			//如果是以上类型的报告做向相关参会的人
 		}
 	}
 	return