Browse Source

Merge remote-tracking branch 'origin/debug' into debug

ziwen 2 years ago
parent
commit
3a848e2d96
1 changed files with 14 additions and 8 deletions
  1. 14 8
      controllers/tactics.go

+ 14 - 8
controllers/tactics.go

@@ -118,14 +118,20 @@ func (this *TacticsController) List() {
 		listTacticsSrt = strings.TrimRight(listTacticsSrt, ",")
 		condition = ` AND category_id IN(` + listTacticsSrt + `)`
 	} else {
-		categoryIdSet, errCategory := models.GetdetailByCategoryIdSet(categoryId)
-		if errCategory != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
-			return
-		}
-		if categoryIdSet != "" {
-			condition = ` AND category_id IN(` + categoryIdSet + `)`
+		//categoryIdSet, errCategory := models.GetdetailByCategoryIdSet(categoryId)
+		//if errCategory != nil {
+		//	br.Msg = "获取信息失败"
+		//	br.ErrMsg = "获取信息失败,Err:" + errCategory.Error() + "categoryID 不存在:" + strconv.Itoa(categoryId)
+		//	return
+		//}
+		//if categoryIdSet != "" {
+		//	condition = ` AND category_id IN(` + categoryIdSet + `)`
+		//} else {
+		//	condition = ` AND category_id IN(` + strconv.Itoa(categoryId) + `)`
+		//}
+
+		if detail.PolymerizationId != "" {
+			condition = ` AND category_id IN(` + detail.PolymerizationId + `)`
 		} else {
 			condition = ` AND category_id IN(` + strconv.Itoa(categoryId) + `)`
 		}