diff --git a/src/main/java/com/glxp/api/controller/auth/AuthUserController.java b/src/main/java/com/glxp/api/controller/auth/AuthUserController.java index 87d725e2..4f5fc287 100644 --- a/src/main/java/com/glxp/api/controller/auth/AuthUserController.java +++ b/src/main/java/com/glxp/api/controller/auth/AuthUserController.java @@ -12,6 +12,7 @@ import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.service.auth.*; +import com.glxp.api.util.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; @@ -130,6 +131,12 @@ public class AuthUserController extends BaseController { public BaseResponse updateUser(@RequestBody UpdateUserRequset updateUserRequset) { AuthAdmin authAdmin=customerService.getUserBean(); System.out.println(updateUserRequset.toString()); + if (StringUtils.isBlank(updateUserRequset.getNewPassword())){ + return ResultVOUtils.error(500,"请输入新密码!"); + } + if (StringUtils.isBlank(updateUserRequset.getConfirmPassword())){ + return ResultVOUtils.error(500,"请输入确认密码!"); + } if (!updateUserRequset.getPassWord().equals(authAdmin.getPassWord())){ return ResultVOUtils.error(500,"当前密码输入错误!请重新输入!"); }