分销充值修改
This commit is contained in:
@@ -97,7 +97,7 @@ public class NotifyController {
|
|||||||
payment.setPayTime(DateUtil.date().toLocalDateTime());
|
payment.setPayTime(DateUtil.date().toLocalDateTime());
|
||||||
payment.setRespJson(plainTextJson.toJSONString());
|
payment.setRespJson(plainTextJson.toJSONString());
|
||||||
paymentService.updateById(payment);
|
paymentService.updateById(payment);
|
||||||
distributionUserService.rechargeCallBack(payment.getSourceId(), payment.getShopId(), payment.getAmount(), payment.getId());
|
distributionUserService.rechargeCallBack(payment.getShopId(), payment.getAmount(), payment.getId());
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
log.error("充值回调失败", e);
|
log.error("充值回调失败", e);
|
||||||
return "SUCCESS";
|
return "SUCCESS";
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发放分销奖励
|
* 发放分销奖励
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@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);
|
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||||
BigDecimal finalAmount = shopInfoService.updateAmount(shopId, amount);
|
BigDecimal finalAmount = shopInfoService.updateAmount(shopId, amount);
|
||||||
distributionAmountFlowService.save(new MkDistributionAmountFlow()
|
distributionAmountFlowService.save(new MkDistributionAmountFlow()
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class DistributionPayServiceImpl implements DistributionPayService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> mchRecharge(String clientIP, MkDistributionPayDTO payParam) {
|
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());
|
return wxService.v3Pay(initInfo.openId, payParam.getAmount(), "商户运营余额充值", initInfo.payment.getOrderNo(), initInfo.payment.getPayType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user