feat:完善项目
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
model2 "ArmedPolice/app/common/model"
|
||||
"ArmedPolice/app/controller/basic"
|
||||
"ArmedPolice/app/model"
|
||||
"ArmedPolice/app/service"
|
||||
@ -29,8 +30,20 @@ func (c *Instance) Info() *InstanceBasic {
|
||||
}
|
||||
|
||||
// List 列表信息
|
||||
func (c *Instance) List(name string, page, pageSize int) (*basic.PageDataResponse, error) {
|
||||
func (c *Instance) List(name, mobile string, tenantID uint64, page, pageSize int) (*basic.PageDataResponse, error) {
|
||||
mSysUser := model.NewSysUser()
|
||||
|
||||
where := make([]*model2.ModelWhere, 0)
|
||||
|
||||
if name != "" {
|
||||
where = append(where, model2.NewWhereLike("u.name", name))
|
||||
}
|
||||
if mobile != "" {
|
||||
where = append(where, model2.NewWhereLike("u.mobile", mobile))
|
||||
}
|
||||
if tenantID > 0 {
|
||||
where = append(where, model2.NewWhere("u.tenant_id", tenantID))
|
||||
}
|
||||
var count int64
|
||||
|
||||
out, err := mSysUser.Users(page, pageSize, &count)
|
||||
|
Reference in New Issue
Block a user