소스 검색

no message

xingzai 2 년 전
부모
커밋
f3045f0141
2개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      controllers/report.go
  2. 2 0
      models/report.go

+ 1 - 0
controllers/report.go

@@ -2215,6 +2215,7 @@ func (this *MobileReportController) TacticsList() {
 			Abstract:    v.Abstract,
 			ImgUrlPc:    v.ImgUrlPc,
 			PublishDate: v.PublishDate,
+			Resource:    v.Resource,
 		})
 	}
 	if len(listResp) == 0 {

+ 2 - 0
models/report.go

@@ -199,6 +199,7 @@ func GetReportAndproductIndustrylListimg(categoryId, userId, startSize, pageSize
 			art.category_id,
 			art.title,
 			art.publish_date,
+			1 AS resource ,
 			( SELECT COUNT( 1 ) FROM cygx_article_history_record AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.article_id = art.article_id ) AS readnum 
 		FROM
 			cygx_article AS art 
@@ -213,6 +214,7 @@ func GetReportAndproductIndustrylListimg(categoryId, userId, startSize, pageSize
 			0 as  category_id,
 			art.title,
 			art.publish_time AS publish_date,
+			2 AS resource ,
 			( SELECT COUNT( 1 ) FROM cygx_product_interior_history AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.product_interior_id = art.product_interior_id ) AS readnum
 		FROM
 			cygx_product_interior AS art