iedc-go/example/admin/user.go

29 lines
516 B
Go

package admin
import (
. "../../../hotime"
. "../../../hotime/common"
"fmt"
)
var UserCtr = Ctr{
"info": func(this *Context) {
user := this.Db.Get(this.RouterString[1], "*", Map{"id": this.RouterString[2]})
this.Display(0, user)
},
"add": func(this *Context) {
},
"update": func(this *Context) {
},
"remove": func(this *Context) {
},
"search": func(this *Context) {
user := this.Db.Select(this.RouterString[1], "*")
fmt.Println(user, user[0].GetFloat64("age"))
this.Display(0, user)
},
}