| | |
| | | import com.dy.common.util.MD5; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pmsGlobal.aop.OperationDescription; |
| | | import com.dy.pmsGlobal.aop.Log; |
| | | import com.dy.pmsGlobal.pojoBa.BaUser; |
| | | import com.mysql.cj.util.StringUtils; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | |
| | | * @return 登录用户值对象 |
| | | */ |
| | | @PostMapping(path = "login", consumes = MediaType.APPLICATION_JSON_VALUE)//前端提交json数据 |
| | | @OperationDescription("用户登录(json)") |
| | | @Log("用户登录(json)") |
| | | public BaseResponse<UserVo> login(@RequestBody @Valid LoginVo vo, BindingResult bindingResult) { |
| | | try { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | |
| | | * @return 登录用户值对象 |
| | | */ |
| | | @PostMapping(path = "loginForm", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)//前端提交form表单数据 |
| | | @OperationDescription("用户登录(form)") |
| | | @Log("用户登录(form)") |
| | | public BaseResponse<UserVo> loginForm(@RequestBody @Valid LoginVo vo, BindingResult bindingResult){ |
| | | try{ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | |
| | | * @return 正常退出登录返回true,否则返回false |
| | | */ |
| | | @GetMapping(path = "logout") |
| | | @OperationDescription("退出登录") |
| | | @Log("退出登录") |
| | | public BaseResponse<Boolean> logout(HttpServletRequest hr){ |
| | | try{ |
| | | String token = hr.getHeader("token") ; |