|
@@ -49,7 +49,7 @@ func GetReportListCount(condition string, pars []interface{}) (count int, err er
|
|
|
// GetReportDailyListCount 获得今日报告数量
|
|
|
func GetReportDailyListCount() (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
- sql := ` SELECT COUNT(*) AS count FROM report WHERE 1=1 AND state=2 AND DATE(modify_time)=DATE(NOW()) `
|
|
|
+ sql := ` SELECT COUNT(*) AS count FROM report WHERE 1=1 AND (state=2 OR state=6) AND DATE(modify_time)=DATE(NOW()) `
|
|
|
err = o.Raw(sql).QueryRow(&count)
|
|
|
return
|
|
|
}
|
|
@@ -62,7 +62,7 @@ func GetReportDailyList(startSize, pageSize int) (items []*ReportList, err error
|
|
|
CASE WHEN DATE(a.modify_time)=DATE(NOW()) THEN 1 ELSE 0 END AS is_current_date
|
|
|
FROM report AS a
|
|
|
INNER JOIN classify AS b ON a.classify_id_second=b.id
|
|
|
- WHERE a.state=2 AND DATE(a.modify_time)=DATE(NOW())
|
|
|
+ WHERE (a.state=2 OR a.state=6) AND DATE(a.modify_time)=DATE(NOW())
|
|
|
ORDER BY a.publish_time DESC LIMIT ?,? `
|
|
|
_, err = o.Raw(sql, startSize, pageSize).QueryRows(&items)
|
|
|
return
|