Sfoglia il codice sorgente

1、优化社交客户端模块

rayson 3 mesi fa
parent
commit
654baf817f

+ 0 - 7
citu-module-system/citu-module-system-api/src/main/java/com/citu/module/system/api/social/dto/SocialUserBindReqDTO.java

@@ -42,11 +42,4 @@ public class SocialUserBindReqDTO {
     @Schema(description = "社交应用标识")
     private String application;
 
-    public SocialUserBindReqDTO(Long userId, Integer userType, Integer socialType, String socialCode, String socialState) {
-        this.userId = userId;
-        this.userType = userType;
-        this.socialType = socialType;
-        this.code = socialCode;
-        this.state = socialState;
-    }
 }

+ 5 - 4
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/auth/MdeAuthServiceImpl.java

@@ -136,7 +136,7 @@ public class MdeAuthServiceImpl implements MdeAuthService {
             String openid = null;
             if (reqVO.getSocialType() != null) {
                 openid = socialUserApi.bindSocialUser(new SocialUserBindReqDTO(user.getId(), getUserType().getValue(),
-                        reqVO.getSocialType(), reqVO.getSocialCode(), reqVO.getSocialState())).getCheckedData();
+                        reqVO.getSocialType(), reqVO.getSocialCode(), reqVO.getSocialState(),SOCIAL_WX_PROGRAM_JOBHUNT_APPLICATION )).getCheckedData();
             }
             // 创建 Token 令牌,记录登录日志
             return createTokenAfterLoginSuccess(user, reqVO.getAccount(), logTypeEnum, openid);
@@ -288,7 +288,8 @@ public class MdeAuthServiceImpl implements MdeAuthService {
         String openid = null;
         if (reqVO.getSocialType() != null) {
             openid = socialUserApi.bindSocialUser(new SocialUserBindReqDTO(user.getId(), getUserType().getValue(),
-                    reqVO.getSocialType(), reqVO.getSocialCode(), reqVO.getSocialState())).getCheckedData();
+                    reqVO.getSocialType(), reqVO.getSocialCode(), reqVO.getSocialState(), SOCIAL_WX_PROGRAM_JOBHUNT_APPLICATION
+            )).getCheckedData();
         }
         // 登录成功就清理
         redisTemplate.delete(String.format(MDE_AUTH_USER_SMS_CODE_LOCK, user.getId()));
@@ -353,7 +354,7 @@ public class MdeAuthServiceImpl implements MdeAuthService {
         } else {
             user = userService.createUser(socialUser.getAvatar(), getClientIP(), getTerminal().toString());
             socialUserApi.bindSocialUser(new SocialUserBindReqDTO(user.getId(), getUserType().getValue(),
-                    reqVO.getType(), reqVO.getCode(), reqVO.getState()));
+                    reqVO.getType(), reqVO.getCode(), reqVO.getState(),SOCIAL_WX_PROGRAM_JOBHUNT_APPLICATION));
         }
         if (user == null) {
             throw exception(MDE_USER_NOT_EXISTS);
@@ -379,7 +380,7 @@ public class MdeAuthServiceImpl implements MdeAuthService {
 
         // 绑定社交用户
         String openid = socialUserApi.bindSocialUser(new SocialUserBindReqDTO(user.getId(), getUserType().getValue(),
-                SocialTypeEnum.WECHAT_MINI_APP.getType(), reqVO.getLoginCode(), reqVO.getState())).getCheckedData();
+                SocialTypeEnum.WECHAT_MINI_APP.getType(), reqVO.getLoginCode(), reqVO.getState(),SOCIAL_WX_PROGRAM_JOBHUNT_APPLICATION)).getCheckedData();
 
         // 创建 Token 令牌,记录登录日志
         return createTokenAfterLoginSuccess(user, user.getPhone(), LoginLogTypeEnum.LOGIN_SOCIAL, openid);