|  |  |  | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.LoginDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.UpdatePwdDto; | 
|---|
|  |  |  | import com.doumee.service.system.SystemLoginService; | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("登录") | 
|---|
|  |  |  | @PostMapping("/login") | 
|---|
|  |  |  | public ApiResponse<String> login (@Validated @RequestBody LoginDTO dto, HttpServletRequest request) { | 
|---|
|  |  |  | return ApiResponse.success(systemLoginService.loginByPassword(dto, request)); | 
|---|
|  |  |  | return ApiResponse.success(systemLoginService.loginByPassword(dto, Constants.ONE, request)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("退出登录") | 
|---|
|  |  |  | 
|---|
|  |  |  | subject.logout(); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Trace(withRequestParameters = false) | 
|---|
|  |  |  | @ApiOperation("修改当前用户密码") | 
|---|
|  |  |  | @PostMapping("/updatePwd") | 
|---|
|  |  |  | 
|---|
|  |  |  | systemUserBiz.updatePwd(dto); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("获取当前登录的用户信息") | 
|---|
|  |  |  | @GetMapping("/getUserInfo") | 
|---|
|  |  |  | public ApiResponse<LoginUserInfo> getUserInfo () { | 
|---|