|
@@ -59,11 +59,11 @@ func GetOutsideReportListByConditionCount(condition string, pars []interface{})
|
|
|
sql += condition
|
|
|
|
|
|
err = o.Raw(sql, pars).QueryRow(&count)
|
|
|
- if err != nil {
|
|
|
+ if err != nil && err != orm.ErrNoRows {
|
|
|
return 0, err
|
|
|
}
|
|
|
|
|
|
- return count, err
|
|
|
+ return count, nil
|
|
|
}
|
|
|
|
|
|
// GetOutsideReportListByCondition 根据条件查询列表
|
|
@@ -75,11 +75,11 @@ t1.modify_time, t1.create_time, t1.report_code from outside_report t1
|
|
|
left join chart_permission_search_key_word_mapping t2 on t1.classify_id = t2.classify_id where 1 = 1 `
|
|
|
sql += condition
|
|
|
_, err = o.Raw(sql, pars).QueryRows(&list)
|
|
|
- if err != nil {
|
|
|
+ if err != nil && err != orm.ErrNoRows {
|
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
- return list, err
|
|
|
+ return list, nil
|
|
|
}
|
|
|
|
|
|
// SaveOutsideReport 保存报告
|