feat:完善项目信息
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/admin/controller"
|
||||
"SciencesServer/app/api/admin/model"
|
||||
"SciencesServer/app/basic/controller"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
@ -138,7 +138,7 @@ func (c *Instance) Info() (*InstanceUserInfo, error) {
|
||||
}
|
||||
|
||||
// Index 列表信息
|
||||
func (c *Instance) Index(name, mobile string, status, page, pageSize int) (*controller.ReturnPages, error) {
|
||||
func (c *Instance) Index(name, mobile string, departmentIDs []uint64, status, page, pageSize int) (*controller.ReturnPages, error) {
|
||||
where := []*model2.ModelWhere{model2.NewWhere("u.tenant_id", c.TenantID)}
|
||||
|
||||
if name != "" {
|
||||
@ -147,6 +147,9 @@ func (c *Instance) Index(name, mobile string, status, page, pageSize int) (*cont
|
||||
if mobile != "" {
|
||||
where = append(where, model2.NewWhereLike("u.mobile", mobile))
|
||||
}
|
||||
if len(departmentIDs) > 0 {
|
||||
where = append(where, model2.NewWhereIn("d.id", departmentIDs))
|
||||
}
|
||||
if status > 0 {
|
||||
where = append(where, model2.NewWhere("u.status", status))
|
||||
}
|
||||
|
Reference in New Issue
Block a user