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

Merge branch 'cygx/cygx_14.0' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

zhangchuanxing 3 сар өмнө
parent
commit
9e5a19a724

+ 5 - 0
controllers/report.go

@@ -925,6 +925,11 @@ func (this *ReportController) Fllow() {
 	item.Source = utils.REGISTER_PLATFORM
 	item.CompanyId = user.CompanyId
 	item.CompanyName = user.CompanyName
+	if followType == 3 {
+		item.FollowTypeOrder = -1
+	} else {
+		item.FollowTypeOrder = followType
+	}
 
 	//if count == 0 {
 	item.Type = 1

+ 2 - 2
models/industrial_management.go

@@ -77,7 +77,7 @@ func GetIndustrialManagementAll(uid int, condition, orderSrt string, startSize,
 			man.*,re.chart_permission_name as permission_name,
 			MAX(art.article_id ) AS article_id, 
            	man.new_art_publish_date AS update_time , MIN(art.publish_date) AS min_report_time,
-		    (SELECT follow_type  FROM cygx_industry_fllow AS f WHERE f.user_id = ` + strconv.Itoa(uid) + ` AND f.follow_type = 1 AND  f.industrial_management_id = man.industrial_management_id) AS follow_type 
+		    (SELECT follow_type_order  FROM cygx_industry_fllow AS f WHERE f.user_id = ` + strconv.Itoa(uid) + ` AND  f.industrial_management_id = man.industrial_management_id) AS follow_type_order 
 			FROM
 			cygx_industrial_management AS man
 			INNER JOIN cygx_report_mapping AS re ON re.chart_permission_id = man.chart_permission_id
@@ -89,7 +89,7 @@ func GetIndustrialManagementAll(uid int, condition, orderSrt string, startSize,
 			AND art.is_class = 1 ` + condition + `
 			GROUP BY
 			man.industry_name 
-			ORDER BY  follow_type DESC ,  ` + orderSrt + ` LIMIT ?,?`
+			ORDER BY  follow_type_order DESC ,  ` + orderSrt + ` LIMIT ?,?`
 	//AND man.industrial_management_id NOT IN ( SELECT industrial_management_id FROM cygx_industry_top WHERE user_id = ` + strconv.Itoa(uid) + ` )
 	_, err = o.Raw(sql, startSize, pageSize).QueryRows(&items)
 	return

+ 1 - 0
models/industry_fllow.go

@@ -21,6 +21,7 @@ type CygxIndustryFllow struct {
 	RealName               string    `description:"用户实际名称"`
 	Source                 int       `description:"来源1查研观向,2查研观向小助手,3勾选全部赛道的用户进行自动关注"`
 	FollowType             int       `description:"1,重点关注,3不感兴趣,0默认接受推送"`
+	FollowTypeOrder        int       `description:"排序方式,重点关注在最前面,不感兴趣在最后面。1,重点关注,-1不感兴趣,0默认接受推送"`
 }
 
 type CygxIndustryFllowRep struct {