hotime/example/admin/user.go

31 lines
572 B
Go
Raw Normal View History

2021-05-28 18:57:03 +00:00
package admin
import (
. "../../../hotime"
2021-05-29 16:01:15 +00:00
. "../../../hotime/common"
"fmt"
2021-05-28 18:57:03 +00:00
)
var UserCtr = Ctr{
"info": func(this *Context) {
2021-05-29 16:01:15 +00:00
user := this.Db.Get(this.RouterString[1], "*", Map{"uid": this.RouterString[2]})
2021-05-28 18:57:03 +00:00
2021-05-29 16:01:15 +00:00
fmt.Println(user.Get("utime"), user.GetFloat64("utime"), user.GetInt("utime"))
this.Display(0, user)
2021-05-28 18:57:03 +00:00
},
"add": func(this *Context) {
},
"update": func(this *Context) {
},
"remove": func(this *Context) {
},
"search": func(this *Context) {
2021-05-29 16:01:15 +00:00
user := this.Db.Select(this.RouterString[1], "*")
fmt.Println(user)
this.Display(0, user)
2021-05-28 18:57:03 +00:00
},
}