|  |  |  | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemUserBiz; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.UpdatePwdDto; | 
|---|
|  |  |  | import com.doumee.service.system.SystemLoginService; | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse updatePwd (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdatePwdDto dto) { | 
|---|
|  |  |  | LoginUserInfo userInfo = this.getLoginUser(token); | 
|---|
|  |  |  | dto.setUserId(userInfo.getId()); | 
|---|
|  |  |  | dto.setToken(token); | 
|---|
|  |  |  | dto.setLoginUserInfo(userInfo); | 
|---|
|  |  |  | systemUserBiz.updatePwd(dto); | 
|---|
|  |  |  | userInfo.setNeedChangePwd(Constants.ONE); | 
|---|
|  |  |  | updateLoginUser(token,userInfo);//更新登录token中绑定的用户信息为已更新密码 | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|