增加导出功能

This commit is contained in:
hoteas
2022-08-01 03:40:09 +08:00
parent 4e24a913c6
commit 3da135e3cb
6 changed files with 168 additions and 12 deletions
+11 -1
View File
@@ -58,7 +58,7 @@ var ArticleCtr = Ctr{
sort := that.Req.FormValue("sort")
where := Map{"article.push_time[<=]": time.Now().Format("2006-01-02 15:04"), "article.state": 0}
where := Map{"article.push_time[<]": time.Now().Format("2006-01-02 15:04"), "article.state": 0}
if sn != "" {
ctg := that.Db.Get("ctg", "id", Map{"sn": sn})
if ctg != nil {
@@ -66,10 +66,20 @@ var ArticleCtr = Ctr{
}
}
startTime := that.Req.FormValue("start_time") //ctgsn
finishTime := that.Req.FormValue("finish_time") //ctgsn
if lunbo != 0 {
where["article.lunbo"] = lunbo
}
if len(startTime) > 5 {
where["article.push_time[>=]"] = startTime
}
if len(finishTime) > 5 {
where["article.push_time[<=]"] = finishTime
}
if keywords != "" {
where["OR"] = Map{"article.title[~]": keywords, "article.description[~]": keywords, "article.author[~]": keywords, "article.sn[~]": keywords, "article.origin[~]": keywords, "article.url[~]": keywords}
}