2021-11-02 10:02:52 +08:00
|
|
|
package role
|
|
|
|
|
|
|
|
import (
|
2021-11-03 18:04:12 +08:00
|
|
|
model2 "ArmedPolice/app/common/model"
|
2021-11-02 16:22:07 +08:00
|
|
|
"ArmedPolice/app/controller/basic"
|
2021-11-03 18:04:12 +08:00
|
|
|
"ArmedPolice/app/model"
|
2021-11-02 10:02:52 +08:00
|
|
|
"ArmedPolice/app/service"
|
|
|
|
)
|
|
|
|
|
2021-11-02 16:22:07 +08:00
|
|
|
type Instance struct{ *service.Session }
|
2021-11-02 10:02:52 +08:00
|
|
|
|
|
|
|
type InstanceHandle func(session *service.Session) *Instance
|
|
|
|
|
2021-11-03 18:04:12 +08:00
|
|
|
func (c *Instance) List() (*basic.PageDataResponse, error) {
|
|
|
|
mSysRole := model.NewSysRole()
|
|
|
|
|
|
|
|
where := make([]*model2.ModelWhereOrder, 0)
|
|
|
|
|
|
|
|
//if {
|
|
|
|
//
|
|
|
|
//}
|
|
|
|
|
|
|
|
out := make([]*model2.SysRole, 0)
|
|
|
|
|
|
|
|
model2.Find(mSysRole.SysRole, &out, where...)
|
|
|
|
|
|
|
|
return &basic.PageDataResponse{Data: nil, Count: 0}, nil
|
2021-11-02 10:02:52 +08:00
|
|
|
}
|
|
|
|
|
2021-11-02 16:22:07 +08:00
|
|
|
func (c *Instance) Form() error {
|
2021-11-02 10:02:52 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-11-02 16:22:07 +08:00
|
|
|
func (c *Instance) Delete() error {
|
2021-11-02 10:02:52 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewInstance() InstanceHandle {
|
|
|
|
return func(session *service.Session) *Instance {
|
2021-11-02 16:22:07 +08:00
|
|
|
return &Instance{session}
|
2021-11-02 10:02:52 +08:00
|
|
|
}
|
|
|
|
}
|