ziwen 1 year ago
parent
commit
ff7a556e80
1 changed files with 6 additions and 4 deletions
  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"
 	"html"
 	"strconv"
+	"strings"
 	"time"
 )
 
@@ -206,7 +207,7 @@ func (this *HelpDocController) ListReport() {
 	pageSize, _ := this.GetInt("PageSize")
 	currentIndex, _ := this.GetInt("CurrentIndex")
 
-	classifyId := this.GetString("ClassifyId")
+	classifyIds := this.GetString("ClassifyIds")
 	keyWord := this.GetString("KeyWord")
 
 	var startSize int
@@ -225,9 +226,10 @@ func (this *HelpDocController) ListReport() {
 		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)