Browse Source

作者的文章排序

xingzai 3 years ago
parent
commit
444bb2dbba
3 changed files with 5 additions and 7 deletions
  1. 2 4
      controllers/report.go
  2. 1 1
      models/article_department.go
  3. 2 2
      utils/config.go

+ 2 - 4
controllers/report.go

@@ -515,7 +515,7 @@ func (this *ReportController) ArticleCollect() {
 	br.Data = resp
 }
 
-// @Title 关注/取消关注
+// @Title 关注/取消关注产业
 // @Description 关注/取消关注 接口
 // @Param	request	body models.CygxIndustryFllowRep true "type json string"
 // @Success 200
@@ -560,9 +560,7 @@ func (this *ReportController) Fllow() {
 		return
 	}
 	resp := new(models.CygxIndustryFllowResp)
-
-	countUser, err := models.GetArticleDepartmentFollowByUid(uid)
-
+	countUser, err := models.GetCountCygxIndustryFllowByUid(uid)
 	if countUser == 0 {
 		resp.GoFollow = true
 	}

+ 1 - 1
models/article_department.go

@@ -179,7 +179,7 @@ func GetIndustrialSubjectNewListByDepartmentId(departmentId, industrialManagemen
 //最新标的列表
 func GetArticleByDepartmentId(departmentId int) (items []*IndustrialManagementIdName, err error) {
 	o := orm.NewOrm()
-	sql := `SELECT article_id FROM cygx_article WHERE department_id = ? AND  publish_status = 1 AND subject_ids != '' GROUP  BY subject_ids  ORDER BY publish_date DESC  LIMIT 4 `
+	sql := `SELECT article_id,	MAX( publish_date ) art_time  FROM cygx_article WHERE department_id = ? AND  publish_status = 1 AND subject_ids != '' GROUP  BY subject_ids  ORDER BY art_time DESC  LIMIT 4 `
 	_, err = o.Raw(sql, departmentId).QueryRows(&items)
 	return
 }

+ 2 - 2
utils/config.go

@@ -96,7 +96,7 @@ func init() {
 		EmailStrategy = "xfma@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com"                                           //策略行业专家邮箱
 		EmaiWhiteUserList = "tshen@hzinsights.com;cxzhang@hzinsights.com;yyli@hzinsights.com"                                                             //白名单邮箱
 		WxMsgTemplateIdAskMsg = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk"
-		WxMsgTemplateIdAskMsgMobile = "15557270714,17634786714"
+		WxMsgTemplateIdAskMsgMobile = "15557270714,17634786714,18767183922"
 
 	} else {
 		WxAppId = "wxcc32b61f96720d2f"
@@ -122,7 +122,7 @@ func init() {
 		EmailStrategy = "jhwang@hzinsights.com;cxzhang@hzinsights.com"    //策略行业专家邮箱
 		EmaiWhiteUserList = "cxzhang@hzinsights.com"
 		WxMsgTemplateIdAskMsg = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo"
-		WxMsgTemplateIdAskMsgMobile = "15557270714,17634786714"
+		WxMsgTemplateIdAskMsgMobile = "15557270714,17634786714,18767183922"
 	}
 }