🐛 修复根据状态查询用户失败的bug

This commit is contained in:
2025-09-17 20:10:47 +08:00
parent 81e1661380
commit ebfdf0dcd7

View File

@@ -70,8 +70,13 @@ func (u *UserService) GetUserList(p request.GetUserListReq) (userList []user.Use
if p.UserLabel != "" {
db = db.Where("user_label = ?", p.UserLabel)
}
if p.Status != 0 {
db = db.Where("status = ?", p.Status)
if p.Status == 1 {
db = db.Where("status = 1")
}
if p.Status == 2 {
db = db.Where("status = 0")
}
if p.Name != "" {