系统优化

This commit is contained in:
hoteas 2022-03-29 05:31:02 +08:00
parent 5d8227d8bb
commit 48042ecce4
3 changed files with 25 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ {
"id": "f4067d842b0f724d7e322e544ad7506b", "id": "6e69f3da6cbb90c7361be89f0933362a",
"label": "HoTime管理平台", "label": "HoTime管理平台",
"menus": [ "menus": [
{ {
@ -215,6 +215,22 @@
"label": "权限", "label": "权限",
"name": "auth", "name": "auth",
"type": "text" "type": "text"
},
{
"label": "QQ号",
"name": "qq",
"type": "text"
},
{
"label": "邮箱",
"list": false,
"name": "email",
"type": "text"
},
{
"label": "微信号",
"name": "wechat",
"type": "text"
} }
], ],
"label": "人员管理", "label": "人员管理",

View File

@ -85,9 +85,11 @@ func main() {
//查询详情插入 //查询详情插入
if that.HandlerStr == "/app/task_admin/time" && that.Req.Method == "GET" { if that.HandlerStr == "/app/task_admin/time" && that.Req.Method == "GET" {
adminId := that.Session("admin_id").ToCeilInt() adminId := that.Session("admin_id").ToCeilInt()
todayTime, _ := time.Parse("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:05") loc, _ := time.LoadLocation("Asia/Shanghai")
taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime, "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"}) 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) that.Display(0, taskAdmin)
@ -96,7 +98,10 @@ func main() {
} }
//查询列表插入 //查询列表插入
if that.HandlerStr == "/app/task_admin" && that.Req.Method == "GET" { 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() { that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 { if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
taskAdmin := that.RespData.GetMap("result").GetSlice("data") taskAdmin := that.RespData.GetMap("result").GetSlice("data")

Binary file not shown.