fix: 添加支付截至时间

pull/16/head
tangqian 2023-05-24 10:35:54 +08:00
parent fc9922c264
commit 9c626bcbbc
1 changed files with 6 additions and 4 deletions

View File

@ -62,6 +62,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
RechargeOrderDO updateObj = RechargeOrderConvert.INSTANCE.convert(updateReqVO); RechargeOrderDO updateObj = RechargeOrderConvert.INSTANCE.convert(updateReqVO);
rechargeOrderMapper.updateById(updateObj); rechargeOrderMapper.updateById(updateObj);
} }
@Override @Override
public void updateRechargeOrderStatus(RechargeOrderUpdateReqVO updateReqVO) { public void updateRechargeOrderStatus(RechargeOrderUpdateReqVO updateReqVO) {
// 校验存在 // 校验存在
@ -70,6 +71,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
RechargeOrderDO updateObj = RechargeOrderConvert.INSTANCE.convert(updateReqVO); RechargeOrderDO updateObj = RechargeOrderConvert.INSTANCE.convert(updateReqVO);
rechargeOrderMapper.updateById(updateObj); rechargeOrderMapper.updateById(updateObj);
} }
@Override @Override
public void deleteRechargeOrder(Long id) { public void deleteRechargeOrder(Long id) {
// 校验存在 // 校验存在
@ -149,7 +151,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
MemberHeadResponse response = new MemberHeadResponse(); MemberHeadResponse response = new MemberHeadResponse();
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Assert.notNull(loginUser, "登录失效,请重新登录!"); Assert.notNull(loginUser, "登录失效,请重新登录!");
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUid, loginUser.getId())); List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUid, loginUser.getId()).eq(RechargeOrderDO::getPaid, 1));
if (!CollectionUtils.isEmpty(orderDOS)) { if (!CollectionUtils.isEmpty(orderDOS)) {
BigDecimal amount = new BigDecimal("0"); BigDecimal amount = new BigDecimal("0");
for (RechargeOrderDO orderDO : orderDOS) { for (RechargeOrderDO orderDO : orderDOS) {
@ -158,7 +160,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
if (amount.compareTo(new BigDecimal("640")) < 0) { if (amount.compareTo(new BigDecimal("640")) < 0) {
response.setGrade("普通会员"); response.setGrade("普通会员");
response.setIntegral(amount.stripTrailingZeros().toPlainString() + "/" + "640"); response.setIntegral(amount.stripTrailingZeros().toPlainString() + "/" + "640");
} else if (amount.compareTo(new BigDecimal("640")) >= 0) { } else if (amount.compareTo(new BigDecimal("1040")) >= 0) {
response.setGrade("高级会员"); response.setGrade("高级会员");
response.setIntegral(amount.stripTrailingZeros().toPlainString() + "/" + "1040"); response.setIntegral(amount.stripTrailingZeros().toPlainString() + "/" + "1040");
} else { } else {