张天森
2022-09-29 0bb281c1b7453140f0939236e023db8677d07c34
update
2个文件已修改
20 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/handel/UserAuthenticationProvider.java
@@ -36,6 +36,8 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.user.UserService;
import static java.util.Objects.nonNull;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 登录认证
@@ -102,9 +104,11 @@
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            //是否为专家登陆
            R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
            if (r1.getCode()== Constants.SUCCESS){
                loginUserInfoVO.setType(13);
            if (nonNull(loginUserInfoVO.getPhone())){
                R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
                if (r1.getCode()== Constants.SUCCESS){
                    loginUserInfoVO.setType(13);
                }
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
        }
@@ -136,9 +140,11 @@
            // 维护最后登录时间
            userService.putUserLastLoginTime(loginUserInfoVO.getUserId());
            //是否为专家登陆
            R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
            if (r1.getCode()== Constants.SUCCESS){
                loginUserInfoVO.setType(13);
            if (nonNull(loginUserInfoVO.getPhone())){
                R r1 = communityService.isExpert(loginUserInfoVO.getPhone());
                if (r1.getCode()== Constants.SUCCESS){
                    loginUserInfoVO.setType(13);
                }
            }
            return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList);
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -10532,5 +10532,5 @@
     * 是否有绑定手机号码的专家账号
     * */
    @GetMapping("/sanshuo/expert/checkExpert")
    R isExpert(@RequestParam("number") String number);
    R isExpert(@RequestParam(value = "number",required = false) String number);
}