| | |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | |
| | | |
| | | /** |
| | | * 修改密码 |
| | | * @param userOid 用户主键 |
| | | * @param userName 用户名 |
| | | * @param password 新密码 |
| | | * @param confirmPassword 确认密码 |
| | | */ |
| | | @RequestMapping(value = "/changePassword",method = RequestMethod.POST) |
| | | public BaseResult changePassword(String userOid,String oldPassword, String password, String confirmPassword) throws PLException { |
| | | @VciUnCheckRight |
| | | public BaseResult changePassword(String userName,String oldPassword, String password, String confirmPassword) throws PLException { |
| | | try { |
| | | return userQueryService.changePassword(userOid, oldPassword, password, confirmPassword) ? BaseResult.success("用户修改成功!"):BaseResult.fail("用户修改失败!"); |
| | | return userQueryService.changePassword(userName, oldPassword, password, confirmPassword) ? BaseResult.success(true,"用户修改成功!"):BaseResult.fail("用户修改失败!"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "修改密码时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | |
| | | //老的项目依然是添加try catch,方法里不抛出异常 |
| | | //BaseResult.fail("这里返回前端的错误信息"); |
| | | } |
| | | |
| | | |
| | | } |