充值支付

This commit is contained in:
wangw 2025-09-29 15:04:18 +08:00
parent 699c3684dd
commit 524e3186ad
1 changed files with 4 additions and 4 deletions

View File

@ -267,12 +267,12 @@ public class PayServiceImpl implements PayService {
AssertUtil.isNull(shopUser, "支付失败 该店铺用户不存在");
AssertUtil.isBlank(payParam.getPayType(), "支付方式不能为空");
UserInfo userInfo = userInfoService.getById(shopUser.getUserId());
AssertUtil.isNull(payParam.getRechargeId(), "请选择充值配置后重试");
AssertUtil.isNull(payParam.getRechargeDetailId(), "请选择充值配置后重试");
//查询活动Id 获取金额字段
MkShopRecharge recharge = shopRechargeService.getById(payParam.getRechargeId());
AssertUtil.isNull(recharge, "充值配置不存在");
MkShopRechargeDetail rechargeDetail = shopRechargeDetailService.getOne(
new QueryWrapper().eq("shop_recharge_id", recharge.getId()));
new QueryWrapper().eq(MkShopRechargeDetail::getId, payParam.getRechargeDetailId())
.eq(MkShopRechargeDetail::getShopRechargeId, payParam.getRechargeId()));
AssertUtil.isNull(rechargeDetail, "充值配置不存在");
if (orderInfo.getOrderAmount().compareTo(rechargeDetail.getAmount()) < 0) {
return CzgResult.failure("支付失败 充值金额小于订单金额");