浏览代码

未发布的报告不显示收藏

kobe6258 3 月之前
父节点
当前提交
f6e04e52f6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/report/report.go

+ 1 - 1
models/report/report.go

@@ -435,7 +435,7 @@ func FilterReportIds(ids []int) (total int64, reportIds []int, err error) {
 	`
 	err = db.Model(&Report{}).Select("id").
 		Where("id in ?", ids).
-		Where("classify_id not in (?) and source=?", gorm.Expr(etaSubQuery), SourceETA).Or("plate_name not in (?) and source=?", gorm.Expr(htSubQuery), SourceHT).
+		Where("(classify_id not in (?) and source=?) or (plate_name not in (?) and source=?)", gorm.Expr(etaSubQuery), SourceETA, gorm.Expr(htSubQuery), SourceHT).
 		Where("Status = ?", StatusPublish).
 		Scan(&reportIds).Error
 	if err != nil {