|
@@ -69,15 +69,18 @@ public class SocialUserServiceImpl implements SocialUserService {
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String bindSocialUser(SocialUserBindReqDTO reqDTO) {
|
|
|
+ log.info("开始获取社交用户:{}", reqDTO);
|
|
|
// 获得社交用户
|
|
|
SocialUserDO socialUser = authSocialUser(reqDTO.getSocialType(), reqDTO.getUserType(),
|
|
|
reqDTO.getCode(), reqDTO.getState());
|
|
|
+ log.info("拿到用户信息:{}", socialUser);
|
|
|
Assert.notNull(socialUser, "社交用户不能为空");
|
|
|
|
|
|
// 社交用户可能之前绑定过别的用户,需要进行解绑
|
|
|
// socialUserBindMapper.deleteByUserTypeAndSocialUserId(reqDTO.getUserType(), socialUser.getId());
|
|
|
|
|
|
// 用户可能之前已经绑定过该社交类型,需要进行解绑
|
|
|
+ log.info("解绑用户信息");
|
|
|
socialUserBindMapper.deleteByUserTypeAndUserIdAndSocialType(reqDTO.getUserType(), reqDTO.getUserId(),
|
|
|
socialUser.getType());
|
|
|
|