会员支付 userId问题

This commit is contained in:
2025-03-17 16:35:50 +08:00
parent 7f77a3187d
commit 658248cb7e

View File

@@ -190,8 +190,6 @@ public class PayServiceImpl implements PayService {
@Override
@Transactional(noRollbackFor = PaySuccessException.class)
public CzgResult<Object> vipPayOrder(OrderPayParamDTO payParam) {
AssertUtil.isNull(payParam.getCheckOrderPay().getUserId(), "会员支付,订单用户不能为空");
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
ShopUser shopUser = new ShopUser();
if ("scanCode".equals(payParam.getPayType())) {
AssertUtil.isBlank(payParam.getAuthCode(), "会员码不能为空");
@@ -221,6 +219,8 @@ public class PayServiceImpl implements PayService {
if (shopUser == null || shopUser.getId() == null) {
AssertUtil.isNull(shopUser, "会员不存在");
}
payParam.getCheckOrderPay().setUserId(shopUser.getUserId());
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
if (!shopUser.getShopId().equals(orderInfo.getShopId())) {
return CzgResult.failure("违规操作,请确认店铺后重试");
}