|
@@ -40,7 +40,7 @@ type ReportList struct {
|
|
|
// GetReportDailyListCount 获得今日报告数量
|
|
|
func GetReportDailyListCount() (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
- sql := ` SELECT COUNT(*) AS count FROM report WHERE 1=1 AND (state=2 OR state=6) AND DATE(modify_time)=DATE(NOW()) `
|
|
|
+ sql := ` SELECT COUNT(*) AS count FROM report WHERE 1=1 AND (state=2 OR state=6) AND DATE(publish_time)=DATE(NOW()) `
|
|
|
err = o.Raw(sql).QueryRow(&count)
|
|
|
return
|
|
|
}
|
|
@@ -50,7 +50,7 @@ func GetReportDailyList(startSize, pageSize int) (items []*ReportList, err error
|
|
|
sql := ` SELECT a.id,a.add_type,a.classify_id_first,a.classify_name_first,a.classify_id_second,a.classify_name_second,a.title,a.abstract,a.author,a.frequency,
|
|
|
a.create_time,a.modify_time,a.state,a.publish_time,a.stage,a.msg_is_send,b.id AS classify_id,b.classify_name,b.descript,b.report_author,b.author_descript,
|
|
|
b.report_img_url,b.head_img_url,b.avatar_img_url,b.column_img_url,a.video_url,a.video_name,a.video_play_seconds,a.video_size,
|
|
|
- CASE WHEN DATE(a.modify_time)=DATE(NOW()) THEN 1 ELSE 0 END AS is_current_date
|
|
|
+ CASE WHEN DATE(a.publish_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 OR a.state=6) AND DATE(a.modify_time)=DATE(NOW()) AND a.classify_id_second IN (
|
|
@@ -62,7 +62,7 @@ func GetReportDailyList(startSize, pageSize int) (items []*ReportList, err error
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetReportDailyListCount 获得今日报告数量
|
|
|
+// GetReportRecentListCount 获得报告数量
|
|
|
func GetReportRecentListCount() (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
sql := ` SELECT COUNT(*) AS count FROM report
|
|
@@ -79,7 +79,7 @@ func GetReportRecentList(startSize, pageSize int) (items []*ReportList, err erro
|
|
|
sql := ` SELECT a.id,a.add_type,a.classify_id_first,a.classify_name_first,a.classify_id_second,a.classify_name_second,a.title,a.abstract,a.author,a.frequency,
|
|
|
a.create_time,a.modify_time,a.state,a.publish_time,a.stage,a.msg_is_send,b.id AS classify_id,b.classify_name,b.descript,b.report_author,b.author_descript,
|
|
|
b.report_img_url,b.head_img_url,b.avatar_img_url,b.column_img_url,a.video_url,a.video_name,a.video_play_seconds,a.video_size,
|
|
|
- CASE WHEN DATE(a.modify_time)=DATE(NOW()) THEN 1 ELSE 0 END AS is_current_date
|
|
|
+ CASE WHEN DATE(a.publish_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 OR a.state=6) AND a.classify_id_second IN (
|