From 41bcb2c9ea798439f0efcea62d3f2d8a77659676 Mon Sep 17 00:00:00 2001 From: khy <2908249413@qq.com> Date: Wed, 23 Oct 2024 21:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BD=99=E9=A2=9D=E6=94=AF?= =?UTF-8?q?=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/app/user/AppMemberUserController.java | 3 +++ .../module/member/service/user/PaidMemberUserServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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; -- 2.45.2