ziwen 1 年之前
父节点
当前提交
ff7a556e80
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      controllers/help_doc/doc.go

+ 6 - 4
controllers/help_doc/doc.go

@@ -10,6 +10,7 @@ import (
 	"hongze/hz_crm_api/utils"
 	"hongze/hz_crm_api/utils"
 	"html"
 	"html"
 	"strconv"
 	"strconv"
+	"strings"
 	"time"
 	"time"
 )
 )
 
 
@@ -206,7 +207,7 @@ func (this *HelpDocController) ListReport() {
 	pageSize, _ := this.GetInt("PageSize")
 	pageSize, _ := this.GetInt("PageSize")
 	currentIndex, _ := this.GetInt("CurrentIndex")
 	currentIndex, _ := this.GetInt("CurrentIndex")
 
 
-	classifyId := this.GetString("ClassifyId")
+	classifyIds := this.GetString("ClassifyIds")
 	keyWord := this.GetString("KeyWord")
 	keyWord := this.GetString("KeyWord")
 
 
 	var startSize int
 	var startSize int
@@ -225,9 +226,10 @@ func (this *HelpDocController) ListReport() {
 		condition += ` AND title LIKE '%` + keyWord + `%' `
 		condition += ` AND title LIKE '%` + keyWord + `%' `
 	}
 	}
 
 
-	if classifyId != "" {
-		condition += ` AND classify_id= ? `
-		pars = append(pars, classifyId)
+	if len(classifyIds) > 0 {
+		classifyIdSlice := strings.Split(classifyIds,",")
+		condition += ` AND classify_id IN ( ` + utils.GetOrmInReplace(len(classifyIdSlice)) + ` ) `
+		pars = append(pars, classifyIdSlice)
 	}
 	}
 
 
 	total, err := help_doc.GetHelpDocListCount(condition, pars)
 	total, err := help_doc.GetHelpDocListCount(condition, pars)