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-06-02 21:31:09 +00:00
|
|
|
user := this.Db.Get(this.RouterString[1], "*", Map{"id": this.RouterString[2]})
|
2021-05-29 16:01:15 +00:00
|
|
|
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], "*")
|
2021-05-29 16:10:07 +00:00
|
|
|
fmt.Println(user, user[0].GetFloat64("age"))
|
2021-05-29 16:01:15 +00:00
|
|
|
this.Display(0, user)
|
2021-05-28 18:57:03 +00:00
|
|
|
},
|
|
|
|
}
|