|
@@ -52,8 +52,9 @@ func init() {
|
|
|
// GetOutsideReportListByConditionCount 根据条件查询列表条数
|
|
|
func GetOutsideReportListByConditionCount(condition string, pars []interface{}) (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
- sql := `select count(distinct t1.outside_report_id) from outside_report t1 left join chart_permission_search_key_word_mapping t2 on t1.classify_id = t2.classify_id where 1 = 1 `
|
|
|
+ sql := `select count(t1.outside_report_id) 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
|
|
|
+ sql += ` group by t1.outside_report_id `
|
|
|
err = o.Raw(sql, pars).QueryRow(&count)
|
|
|
if err != nil {
|
|
|
return 0, err
|