Browse Source

no message

xingzai 2 years ago
parent
commit
f8957ca5c3
2 changed files with 11 additions and 9 deletions
  1. 9 9
      controllers/report.go
  2. 2 0
      models/report.go

+ 9 - 9
controllers/report.go

@@ -639,15 +639,15 @@ func (this *MobileReportController) List() {
 				list[k].IsRed = true
 			}
 		}
-		if categoryId > 0 {
-			detail, errCategory := models.GetdetailByCategoryId(categoryId)
-			if errCategory != nil {
-				br.Msg = "获取信息失败"
-				br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
-				return
-			}
-			resp.MatchTypeName = detail.MatchTypeName
-		}
+		//if categoryId > 0 {
+		//	detail, errCategory := models.GetdetailByCategoryId(categoryId)
+		//	if errCategory != nil {
+		//		br.Msg = "获取信息失败"
+		//		br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
+		//		return
+		//	}
+		//	resp.MatchTypeName = detail.MatchTypeName
+		//}
 		//resp.CategoryImgUrlPc = mapChartPermission[detail.ChartPermissionName]
 	}
 

+ 2 - 0
models/report.go

@@ -266,6 +266,7 @@ func GetReportAndproductInteriorIndustrialList(pars []interface{}, categoryId, i
 	o := orm.NewOrm()
 	sql := `SELECT
 			art.article_id,
+			art.category_id,
 			art.title,
 			art.publish_date,
 			( 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 , 
@@ -282,6 +283,7 @@ func GetReportAndproductInteriorIndustrialList(pars []interface{}, categoryId, i
 			art.article_id UNION ALL
 		SELECT
 			art.product_interior_id AS article_id,
+			0 as  category_id,
 			art.title,
 			art.publish_time AS publish_date,
 			( 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 ,