| | |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.config.annotation.EncryptionReq; |
| | | import com.doumee.config.annotation.EncryptionResp; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("登录") |
| | | @EncryptionReq |
| | | @EncryptionResp |
| | | @PostMapping("/login") |
| | | public ApiResponse<String> login (@Validated @RequestBody LoginDTO dto, HttpServletRequest request) { |
| | | return ApiResponse.success(systemLoginService.loginByPassword(dto, request)); |
| | |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @ApiOperation("修改当前用户密码") |
| | | @EncryptionReq |
| | | @EncryptionResp |
| | | @PostMapping("/updatePwd") |
| | | public ApiResponse updatePwd (@Validated @RequestBody UpdatePwdDto dto) { |
| | | dto.setUserId(this.getLoginUser().getId()); |
| | |
| | | |
| | | @ApiOperation("获取当前登录的用户信息") |
| | | @GetMapping("/getUserInfo") |
| | | @EncryptionResp |
| | | public ApiResponse<LoginUserInfo> getUserInfo () { |
| | | return ApiResponse.success(this.getLoginUser()); |
| | | } |