diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppMemberUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppMemberUserController.java index ded14dd..a8284a2 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppMemberUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppMemberUserController.java @@ -89,6 +89,9 @@ public class AppMemberUserController { MemberUserDO user = userService.getUser(getLoginUserId()); MemberLevelDO level = levelService.getLevel(user.getLevelId()); PaidMemberUserDO paidMemberUserDO = paidMemberUserService.getPaidMemberUserByUid(getLoginUserId()); + if (paidMemberUserDO == null) { + return success(MemberUserConvert.INSTANCE.convert(user, level,null,null)); + } return success(MemberUserConvert.INSTANCE.convert(user, level,paidMemberUserDO.getPayMemberType(),paidMemberUserDO.getCardExpirationTime())); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java index 8c6f45b..6e2c121 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java @@ -159,7 +159,7 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService { new LambdaQueryWrapperX().eq(PaidMemberUserDO::getUid,uid) .orderByDesc(PaidMemberUserDO::getId)); if(list.isEmpty()){ - throw exception(MEMBER_USER_NOT_EXISTS); + return null; } PaidMemberUserDO paidMemberUserDO = list.get(0); return paidMemberUserDO;