kobe6258 преди 9 месеца
родител
ревизия
c5d15b9cf8
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      models/report/report.go

+ 1 - 1
models/report/report.go

@@ -75,7 +75,7 @@ func InsertOrUpdateReport(list *[]Report, source string) (ids []int, err error)
 	}
 	db := models.Main()
 	//手动事务
-	err = db.Select("distinct id").Where("org_id in ? and source =? ", orgIds, source).Scan(&ids).Error
+	err = db.Model(&Report{}).Select("distinct id").Where("org_id in ? and source =? ", orgIds, source).Scan(&ids).Error
 	if err != nil {
 		logger.Error("查询研报失败:%v", err)
 		return