|
@@ -596,7 +596,7 @@ func GetAllReportChapter() (items []*ReportChapter, err error) {
|
|
|
// @return err error
|
|
|
func GetCountReportChapterByCondition(condition string, pars []interface{}) (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
- sql := ` SELECT * FROM report_chapter WHERE 1=1 `
|
|
|
+ sql := ` SELECT COUNT(1) AS count FROM report_chapter WHERE 1=1 `
|
|
|
if condition != "" {
|
|
|
sql += condition
|
|
|
}
|