|
@@ -1686,7 +1686,7 @@ func GetReportListByCollectList(classifyIdFirst, classifyIdSecond, classifyIdThi
|
|
|
return items, err
|
|
|
}
|
|
|
|
|
|
-func GetReportListByCollectCountV2(classifyIdFirst, classifyIdSecond, classifyIdThird, chartPermissionIdList []string, keyword, author string, state int) (count int, err error) {
|
|
|
+func GetReportListByCollectCountV2(classifyIdFirst, classifyIdSecond, classifyIdThird, chartPermissionIdList []string, keyword, author string, isPublic int, stateArr []int) (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
var params []interface{}
|
|
|
|
|
@@ -1731,9 +1731,14 @@ func GetReportListByCollectCountV2(classifyIdFirst, classifyIdSecond, classifyId
|
|
|
params = append(params, author)
|
|
|
}
|
|
|
|
|
|
- if state > 0 {
|
|
|
- sql += " AND b.state = ? "
|
|
|
- params = append(params, state)
|
|
|
+ if isPublic > 0 {
|
|
|
+ sql += " AND b.is_public_publish = ? "
|
|
|
+ params = append(params, isPublic)
|
|
|
+ }
|
|
|
+
|
|
|
+ if len(stateArr) > 0 {
|
|
|
+ sql += fmt.Sprintf(" AND b.state IN (%s)", utils.GetOrmInReplace(len(stateArr)))
|
|
|
+ params = append(params, stateArr)
|
|
|
}
|
|
|
|
|
|
// 分类id判断
|
|
@@ -1772,7 +1777,7 @@ func GetReportListByCollectCountV2(classifyIdFirst, classifyIdSecond, classifyId
|
|
|
return count, err
|
|
|
}
|
|
|
|
|
|
-func GetReportListByCollectListV2(classifyIdFirst, classifyIdSecond, classifyIdThird, chartPermissionIdList []string, keyword, orderField, orderType string, startSize, pageSize int, author string, state int) (items []*ReportList, err error) {
|
|
|
+func GetReportListByCollectListV2(classifyIdFirst, classifyIdSecond, classifyIdThird, chartPermissionIdList []string, keyword, orderField, orderType string, startSize, pageSize int, author string, isPublic int, stateArr []int) (items []*ReportList, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
var params []interface{}
|
|
|
|
|
@@ -1799,9 +1804,14 @@ b.abstract,b.admin_id,b.admin_real_name,b.last_modify_admin_id,b.last_modify_adm
|
|
|
params = append(params, author)
|
|
|
}
|
|
|
|
|
|
- if state > 0 {
|
|
|
- sql += " AND b.state = ? "
|
|
|
- params = append(params, state)
|
|
|
+ if isPublic > 0 {
|
|
|
+ sql += " AND b.is_public_publish = ? "
|
|
|
+ params = append(params, isPublic)
|
|
|
+ }
|
|
|
+
|
|
|
+ if len(stateArr) > 0 {
|
|
|
+ sql += fmt.Sprintf(" AND b.state IN (%s)", utils.GetOrmInReplace(len(stateArr)))
|
|
|
+ params = append(params, stateArr)
|
|
|
}
|
|
|
|
|
|
// 分类id判断
|