|
@@ -37,6 +37,7 @@ import static com.zjugis.framework.common.util.collection.CollectionUtils.conver
|
|
|
import static com.zjugis.framework.common.util.json.JsonUtils.toJsonString;
|
|
|
import static com.zjugis.module.system.enums.ErrorCodeConstants.SOCIAL_USER_AUTH_FAILURE;
|
|
|
import static com.zjugis.module.system.enums.ErrorCodeConstants.SOCIAL_USER_NOT_FOUND;
|
|
|
+import static com.zjugis.module.system.enums.ErrorCodeConstants.SOCIAL_USER_MOBILE_NOT_FOUND;
|
|
|
|
|
|
/**
|
|
|
* 社交用户 Service 实现类
|
|
@@ -158,6 +159,9 @@ public class SocialUserServiceImpl implements SocialUserService {
|
|
|
String mobile = JSONObject.parseObject(rawUserInfo).get("mobile").toString();
|
|
|
Object avatarUrl = JSONObject.parseObject(rawUserInfo).get("avatarUrl");
|
|
|
AdminUserDO user = adminUserMapper.selectByMobile(mobile);
|
|
|
+ if(user == null){
|
|
|
+ throw exception(SOCIAL_USER_MOBILE_NOT_FOUND);
|
|
|
+ }
|
|
|
bindSocialUser(new SocialUserBindReqDTO(user.getId(), userType,
|
|
|
type, code, state));
|
|
|
userId = user.getId();
|