浏览代码

pci研报-未分类

gmy 3 月之前
父节点
当前提交
ccaa6c98a9
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      models/document_manage_model/outside_report.go

+ 1 - 3
models/document_manage_model/outside_report.go

@@ -52,13 +52,11 @@ func init() {
 // GetOutsideReportListByConditionCount 根据条件查询列表条数
 func GetOutsideReportListByConditionCount(condition string, pars []interface{}) (count int, err error) {
 	o := orm.NewOrmUsingDB("rddp")
-	sql := `select count(1) from ( 
-			SELECT COUNT( DISTINCT t1.outside_report_id ) 
+	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 += condition
-	sql += ` ) t`
 
 	err = o.Raw(sql, pars).QueryRow(&count)
 	if err != nil {