|
@@ -258,6 +258,7 @@ func (this *ReportController) IndustryList() {
|
|
|
// @Description 产业下所关联的文章分类列表接口
|
|
|
// @Param IndustrialManagementId query int true "产业ID"
|
|
|
// @Param ShowTimeLine query int true "是否展示时间线 0不展示,1展示"
|
|
|
+// @Param IsSendWx query int false "是否是通过微信模版进来的 1是,其它否"
|
|
|
// @Success 200 {object} models.IndustrialToArticleCategoryListRep
|
|
|
// @router /toArticleCategoryList [get]
|
|
|
func (this *ReportController) ArticleCategoryList() {
|
|
@@ -279,6 +280,7 @@ func (this *ReportController) ArticleCategoryList() {
|
|
|
return
|
|
|
}
|
|
|
showTimeLine, _ := this.GetInt("ShowTimeLine", 0)
|
|
|
+ isSendWx, _ := this.GetInt("IsSendWx")
|
|
|
|
|
|
detail, err := models.GetIndustrialManagementDetail(industrialManagementId)
|
|
|
if err != nil {
|
|
@@ -422,7 +424,7 @@ func (this *ReportController) ArticleCategoryList() {
|
|
|
timeLineRed := false
|
|
|
if count < 2 {
|
|
|
timeLineRed = true
|
|
|
- } else if count > 1 && recordItem.CreateTime.Before(utils.StrTimeToTime(morningMeetingTime)){
|
|
|
+ } else if count > 1 && recordItem.CreateTime.Before(utils.StrTimeToTime(morningMeetingTime)) {
|
|
|
timeLineRed = true
|
|
|
}
|
|
|
if !timeLineItem.IsRed && timeLineRed && haveMorningMeeting {
|
|
@@ -440,7 +442,15 @@ func (this *ReportController) ArticleCategoryList() {
|
|
|
if videoSimple.Id > 0 {
|
|
|
resp.IndustryVideo = videoSimple
|
|
|
}
|
|
|
-
|
|
|
+ if isSendWx == 1 {
|
|
|
+ industryUserFollowMap, err := services.GetIndustryUserFollowMap(user)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "GetActivitySignupResp,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp.IsFollowButton = industryUserFollowMap[industrialManagementId]
|
|
|
+ }
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|
|
@@ -689,7 +699,7 @@ func (this *ReportController) List() {
|
|
|
timeLineRed := false
|
|
|
if count < 2 && v.SubCategoryName == "时间线" {
|
|
|
timeLineRed = true
|
|
|
- } else if count > 1 && recordItem.CreateTime.Before(utils.StrTimeToTime(v.PublishTime)){
|
|
|
+ } else if count > 1 && recordItem.CreateTime.Before(utils.StrTimeToTime(v.PublishTime)) {
|
|
|
timeLineRed = true
|
|
|
}
|
|
|
if v.SubCategoryName == "时间线" && timeLineRed {
|
|
@@ -3031,11 +3041,11 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
industrialIdMap := make(map[string]time.Time)
|
|
|
for _, v := range recrodList {
|
|
|
industrialManagementIdstr = strings.TrimLeft(v.Parameter, "PageSize=10&CurrentIndex=1&CategoryId=99999&IndustrialManagementId=")
|
|
|
- if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok{
|
|
|
+ if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok {
|
|
|
if createTime.Before(v.CreateTime) {
|
|
|
industrialIdMap[industrialManagementIdstr] = v.CreateTime
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
industrialIdMap[industrialManagementIdstr] = v.CreateTime
|
|
|
}
|
|
|
}
|
|
@@ -3051,7 +3061,7 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
timeLineRedMap := make(map[int]bool, 0)
|
|
|
|
|
|
for _, industrialId := range industrialIdArr {
|
|
|
- if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok{
|
|
|
+ if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
|
|
|
if createTime.Before(morningMeetingTimeMap[industrialId]) {
|
|
|
timeLineRedMap[industrialId] = true
|
|
|
}
|