Эх сурвалжийг харах

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 жил өмнө
parent
commit
be7d6fb90b

+ 6 - 0
controllers/report.go

@@ -283,6 +283,7 @@ func (this *ReportController) IndustryList() {
 // @Param   IndustrialManagementId   query   int  true       "产业ID"
 // @Param   ShowTimeLine   query   int  true       "是否展示时间线 0不展示,1展示"
 // @Param   IsSendWx   query   int  false       "是否是通过微信模版进来的 1是,其它否"
+// @Param   ChapterId   query   int  false       "晨会精华段落ID"
 // @Success 200 {object} models.IndustrialToArticleCategoryListRep
 // @router /toArticleCategoryList [get]
 func (this *ReportController) ArticleCategoryList() {
@@ -305,6 +306,7 @@ func (this *ReportController) ArticleCategoryList() {
 	}
 	showTimeLine, _ := this.GetInt("ShowTimeLine", 0)
 	isSendWx, _ := this.GetInt("IsSendWx")
+	chapterId, _ := this.GetInt("ChapterId")
 
 	detail, err := models.GetIndustrialManagementDetail(industrialManagementId)
 	if err != nil {
@@ -437,6 +439,10 @@ func (this *ReportController) ArticleCategoryList() {
 			timeLineItem.IsRed = true
 		}
 		list = append([]*models.IndustrialToArticleCategoryRep{&timeLineItem}, list...)
+
+		if chapterId > 0 && isSendWx == 1 {
+			go services.AddCygxMorningMeetingReviewChapterHistory(user, chapterId, "微信")
+		}
 	}
 
 	resp := new(models.IndustrialToArticleCategoryListRep)

+ 6 - 8
controllers/yanxuan_special.go

@@ -186,14 +186,6 @@ func (this *YanxuanSpecialController) Detail() {
 		resp.IndustryTags = append(resp.IndustryTags, item.IndustryTags)
 	}
 
-	if isSendWx == 1 {
-		if item.UserId == sysUser.UserId {
-			resp.IsShowExamine = true
-		}
-		resp.ExamineStatus = item.Status
-	}
-	resp.ExamineStatus = item.Status
-
 	//如果状态未审核通过,而且查看的不是本人,不是审核人员,就无法查看详情
 	var configCode string
 	configCode = utils.TPL_MSG_WANG_FANG_WANG_YANG
@@ -203,6 +195,12 @@ func (this *YanxuanSpecialController) Detail() {
 		br.ErrMsg = "获取失败, Err:" + err.Error()
 		return
 	}
+
+	if isSendWx == 1 && strings.Contains(cnf.ConfigValue, sysUser.Mobile) {
+		resp.IsShowExamine = true
+		resp.ExamineStatus = item.Status
+	}
+	resp.ExamineStatus = item.Status
 	if item.UserId != sysUser.UserId && item.Status != 3 && !strings.Contains(cnf.ConfigValue, sysUser.Mobile) {
 		resp.CygxYanxuanSpecialItem = *new(models.CygxYanxuanSpecialItem) // 如果内容不可见,就把内容置空
 		resp.HasPermission = 2

+ 5 - 0
services/industrial_management.go

@@ -558,8 +558,13 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
 		}
 	}
 
+	hotMapindustrial, err := IndustrialManagementHotMapGropuPermission()
+	if err != nil {
+		return
+	}
 	for k, v := range list {
 		list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
+		list[k].IsHot = hotMapindustrial[v.IndustrialManagementId]
 		if userId > 0 {
 			//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
 			if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {