|
@@ -162,6 +162,9 @@ func GetReportCountByCondition(condition string, pars []interface{}) (count int,
|
|
|
|
|
|
// BatchPushReport 批量推送报告
|
|
|
func BatchPushReport(reportId []int) (err error) {
|
|
|
+ if len(reportId) == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE report_push_status SET state=1, push_time=NOW() WHERE report_id IN (` + utils.GetOrmReplaceHolder(len(reportId)) + `)`
|
|
|
_, err = o.Raw(sql, reportId).Exec()
|
|
@@ -170,6 +173,9 @@ func BatchPushReport(reportId []int) (err error) {
|
|
|
|
|
|
// BatchPushCancelReport 批量撤销推送报告
|
|
|
func BatchPushCancelReport(reportId []int) (err error) {
|
|
|
+ if len(reportId) == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE report_push_status SET state=0, modify_time=NOW() WHERE report_id IN (` + utils.GetOrmReplaceHolder(len(reportId)) + `)`
|
|
|
_, err = o.Raw(sql, reportId).Exec()
|