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