分销充值修改

This commit is contained in:
张松 2025-10-28 14:56:11 +08:00
parent 9a99cc6e1d
commit 993b65caae
4 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ public class NotifyController {
payment.setPayTime(DateUtil.date().toLocalDateTime());
payment.setRespJson(plainTextJson.toJSONString());
paymentService.updateById(payment);
distributionUserService.rechargeCallBack(payment.getSourceId(), payment.getShopId(), payment.getAmount(), payment.getId());
distributionUserService.rechargeCallBack(payment.getShopId(), payment.getAmount(), payment.getId());
}catch (Exception e) {
log.error("充值回调失败", e);
return "SUCCESS";

View File

@ -103,7 +103,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
/**
* 分销商户运营余额充值回调
*/
void rechargeCallBack(Long userId, Long shopId, BigDecimal amount, Long paymentId);
void rechargeCallBack(Long shopId, BigDecimal amount, Long paymentId);
/**
* 发放分销奖励

View File

@ -453,7 +453,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
@Override
public void rechargeCallBack(Long userId, Long shopId, BigDecimal amount, Long paymentId) {
public void rechargeCallBack(Long shopId, BigDecimal amount, Long paymentId) {
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
BigDecimal finalAmount = shopInfoService.updateAmount(shopId, amount);
distributionAmountFlowService.save(new MkDistributionAmountFlow()

View File

@ -101,7 +101,7 @@ public class DistributionPayServiceImpl implements DistributionPayService {
@Override
public Map<String, String> mchRecharge(String clientIP, MkDistributionPayDTO payParam) {
InitInfo initInfo = initPayment(payParam.getUserId(), payParam, true);
InitInfo initInfo = initPayment(payParam.getUserId() == null ? payParam.getShopId() : payParam.getUserId(), payParam, true);
return wxService.v3Pay(initInfo.openId, payParam.getAmount(), "商户运营余额充值", initInfo.payment.getOrderNo(), initInfo.payment.getPayType());
}