liurunyu
2024-04-24 e430bfca38cdae9dd230f951e108a75caebccb61
pms-parent/pms-web-sso/src/main/java/com/dy/sso/busi/SsoCtrl.java
@@ -4,6 +4,7 @@
import com.dy.common.util.MD5;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.pmsGlobal.aop.Log;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.mysql.cj.util.StringUtils;
import jakarta.servlet.http.HttpServletRequest;
@@ -45,6 +46,7 @@
     * @return 登录用户值对象
     */
    @PostMapping(path = "login", consumes = MediaType.APPLICATION_JSON_VALUE)//前端提交json数据
    @Log("用户登录(json)")
    public BaseResponse<UserVo> login(@RequestBody  @Valid LoginVo vo, BindingResult bindingResult) {
        try {
            if(bindingResult != null && bindingResult.hasErrors()){
@@ -63,6 +65,7 @@
     * @return 登录用户值对象
     */
    @PostMapping(path = "loginForm", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)//前端提交form表单数据
    @Log("用户登录(form)")
    public BaseResponse<UserVo> loginForm(@RequestBody @Valid LoginVo vo, BindingResult bindingResult){
        try{
            if(bindingResult != null && bindingResult.hasErrors()){
@@ -82,6 +85,7 @@
     * @return 正常退出登录返回true,否则返回false
     */
    @GetMapping(path = "logout")
    @Log("退出登录")
    public BaseResponse<Boolean> logout(HttpServletRequest hr){
        try{
            String token = hr.getHeader("token") ;