|
@@ -233,7 +233,7 @@ func GetMaxIdByPermissionIds(orgIds map[string][]int, disCardIds []int) (total i
|
|
|
total = 0
|
|
|
return
|
|
|
}
|
|
|
- countQuery := db.Model(&Report{}).Select("count(*)").Where("status = ? ", StatusPublish, disCardIds)
|
|
|
+ countQuery := db.Model(&Report{}).Select("count(*)").Where("status = ? ", StatusPublish)
|
|
|
maxQuery := db.Model(&Report{}).Select("MAX(id) id").Where("status = ? ", StatusPublish)
|
|
|
if len(disCardIds) > 0 {
|
|
|
countQuery.Where("id not in ?", disCardIds)
|