瀏覽代碼

登录鉴权修复

kobe6258 8 月之前
父節點
當前提交
e3813bd40f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      models/report/report.go

+ 3 - 0
models/report/report.go

@@ -70,6 +70,9 @@ func InsertOrUpdateReport(list *[]Report, source string) (ids []int, err error)
 		orgIds = append(orgIds, report.OrgID)
 	}
 	orgIds = silce_utils.RemoveDuplicates(orgIds)
+	if orgIds == nil || len(orgIds) == 0 {
+		return
+	}
 	db := models.Main()
 	//手动事务
 	err = db.Select("distinct id").Where("org_id in ? and source =? ", orgIds, source).Scan(&ids).Error