@@ -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