mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
用户搜索 手机号,状态 查询条件的添加
This commit is contained in:
@@ -131,6 +131,13 @@ func (e *SysUser) GetPage(pageSize int, pageIndex int) ([]SysUserPage, int, erro
|
||||
if e.Username != "" {
|
||||
table = table.Where("username = ?", e.Username)
|
||||
}
|
||||
if e.Status != "" {
|
||||
table = table.Where("sys_user.status = ?", e.Status)
|
||||
}
|
||||
|
||||
if e.Phone != "" {
|
||||
table = table.Where("sys_user.phone = ?", e.Phone)
|
||||
}
|
||||
|
||||
if e.DeptId != 0 {
|
||||
table = table.Where("sys_user.dept_id in (select dept_id from sys_dept where dept_path like ? )", "%"+tools.IntToString(e.DeptId)+"%")
|
||||
|
||||
Reference in New Issue
Block a user