系统优化
This commit is contained in:
+8
-3
@@ -85,9 +85,11 @@ func main() {
|
||||
//查询详情插入
|
||||
if that.HandlerStr == "/app/task_admin/time" && that.Req.Method == "GET" {
|
||||
adminId := that.Session("admin_id").ToCeilInt()
|
||||
todayTime, _ := time.Parse("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:05")
|
||||
taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime, "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"})
|
||||
loc, _ := time.LoadLocation("Asia/Shanghai")
|
||||
todayTime, _ := time.ParseInLocation("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:00", loc)
|
||||
|
||||
taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime.Unix(), "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"})
|
||||
fmt.Println(todayTime.Format("2006-01-02 15:04:05"))
|
||||
//如果当天还未签到
|
||||
|
||||
that.Display(0, taskAdmin)
|
||||
@@ -96,7 +98,10 @@ func main() {
|
||||
}
|
||||
//查询列表插入
|
||||
if that.HandlerStr == "/app/task_admin" && that.Req.Method == "GET" {
|
||||
that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr())
|
||||
if that.Req.FormValue("admin_id") == "" {
|
||||
|
||||
that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr())
|
||||
}
|
||||
that.RespFunc = func() {
|
||||
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
|
||||
taskAdmin := that.RespData.GetMap("result").GetSlice("data")
|
||||
|
||||
Reference in New Issue
Block a user