diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java index 0e45547..8b27852 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java @@ -17,6 +17,7 @@ import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.util.DigestUtils; +import org.springframework.util.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -209,6 +210,9 @@ public class UserContoller { // } public BaseResponse sltUser(UserroleInfo user, int current, int size){ BaseResponse baseResponse=new BaseResponse(); + if (StringUtils.isEmpty(user.getUname())){ + user.setUname(null); + } Page page=new Page<>(current,size); Page userIPage= userroleInfoService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); baseResponse.setObject(userIPage);