mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 12:05:07 +08:00
✨ Member:增加获取单个社交用户的接口
This commit is contained in:
@ -236,7 +236,7 @@ public class AdminAuthServiceImplTest extends BaseDbUnitTest {
|
||||
AuthSocialLoginReqVO reqVO = randomPojo(AuthSocialLoginReqVO.class);
|
||||
// mock 方法(绑定的用户编号)
|
||||
Long userId = 1L;
|
||||
when(socialUserService.getSocialUser(eq(UserTypeEnum.ADMIN.getValue()), eq(reqVO.getType()),
|
||||
when(socialUserService.getSocialUserByCode(eq(UserTypeEnum.ADMIN.getValue()), eq(reqVO.getType()),
|
||||
eq(reqVO.getCode()), eq(reqVO.getState()))).thenReturn(new SocialUserRespDTO(randomString(), userId));
|
||||
// mock(用户)
|
||||
AdminUserDO user = randomPojo(AdminUserDO.class, o -> o.setId(userId));
|
||||
|
@ -147,7 +147,7 @@ public class SocialUserServiceImplTest extends BaseDbUnitTest {
|
||||
socialUserBindMapper.insert(socialUserBind);
|
||||
|
||||
// 调用
|
||||
SocialUserRespDTO socialUser = socialUserService.getSocialUser(userType, type, code, state);
|
||||
SocialUserRespDTO socialUser = socialUserService.getSocialUserByCode(userType, type, code, state);
|
||||
// 断言
|
||||
assertEquals(userId, socialUser.getUserId());
|
||||
assertEquals(socialUserDO.getOpenid(), socialUser.getOpenid());
|
||||
|
Reference in New Issue
Block a user