feat:完善项目

This commit is contained in:
henry
2021-11-02 17:28:19 +08:00
parent 0fa2630933
commit 09ef8a7885
8 changed files with 76 additions and 96 deletions

View File

@ -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)