增加导出功能

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}
}
+1 -1
View File
@@ -70,7 +70,7 @@ var MailCtr = Ctr{
//sort:=that.Req.FormValue("sort")
where := Map{"state": 0}
where := Map{"state": 0, "show": 1}
//if keywords!=""{
// where["OR"]=Map{"title[~]":keywords,"description[~]":keywords,"author[~]":keywords,"sn[~]":keywords,"origin[~]":keywords,"url[~]":keywords}
+4
View File
@@ -8,6 +8,10 @@ import (
func main() {
appIns := Init("config/config.json")
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
return isFinished
})
appIns.Run(Router{"app": app.AppProj})
}