瀏覽代碼

fix:增加日报显示报告列

zqbao 9 月之前
父節點
當前提交
0b836fc95c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/report.go

+ 2 - 2
models/report.go

@@ -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