Browse Source

未发布的报告不显示收藏

kobe6258 3 tháng trước cách đây
mục cha
commit
f6e04e52f6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 {