会员余额支付

This commit is contained in:
khy 2024-10-23 21:34:18 +08:00
parent a35f333ec2
commit 41bcb2c9ea
2 changed files with 4 additions and 1 deletions

View File

@ -89,6 +89,9 @@ public class AppMemberUserController {
MemberUserDO user = userService.getUser(getLoginUserId()); MemberUserDO user = userService.getUser(getLoginUserId());
MemberLevelDO level = levelService.getLevel(user.getLevelId()); MemberLevelDO level = levelService.getLevel(user.getLevelId());
PaidMemberUserDO paidMemberUserDO = paidMemberUserService.getPaidMemberUserByUid(getLoginUserId()); 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())); return success(MemberUserConvert.INSTANCE.convert(user, level,paidMemberUserDO.getPayMemberType(),paidMemberUserDO.getCardExpirationTime()));
} }

View File

@ -159,7 +159,7 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService {
new LambdaQueryWrapperX<PaidMemberUserDO>().eq(PaidMemberUserDO::getUid,uid) new LambdaQueryWrapperX<PaidMemberUserDO>().eq(PaidMemberUserDO::getUid,uid)
.orderByDesc(PaidMemberUserDO::getId)); .orderByDesc(PaidMemberUserDO::getId));
if(list.isEmpty()){ if(list.isEmpty()){
throw exception(MEMBER_USER_NOT_EXISTS); return null;
} }
PaidMemberUserDO paidMemberUserDO = list.get(0); PaidMemberUserDO paidMemberUserDO = list.get(0);
return paidMemberUserDO; return paidMemberUserDO;