mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 优化分账逻辑
This commit is contained in:
@@ -210,6 +210,34 @@ public class TempController extends BaseController {
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时 余额支付分账
|
||||
* http://localhost:8080/temp/doBalancePaymentTemp
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/doBalancePaymentTemp")
|
||||
public RestApiResponse<?> doBalancePaymentTemp(@RequestBody QueryOrderDTO dto) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getOrderCode());
|
||||
if (orderBasicInfo == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_INFO_IS_NULL);
|
||||
}
|
||||
String merchantId = orderBasicInfo.getMerchantId();
|
||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
|
||||
if (adapayMemberAccount == null) {
|
||||
throw new BusinessException("", "查询信息为空");
|
||||
}
|
||||
String appId = pileMerchantInfoService.queryAppIdByMerchantId(merchantId);
|
||||
orderBasicInfoService.doBalancePayment(orderBasicInfo, adapayMemberAccount, appId);
|
||||
} catch (Exception e) {
|
||||
logger.error("临时接口交易确认接口 error,", e);
|
||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_WEIXIN_REFUND_ERROR);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 运营商分账手动接口
|
||||
* http://localhost:8080/temp/orderSplittingOperations
|
||||
|
||||
@@ -153,7 +153,9 @@ public interface IOrderBasicInfoService {
|
||||
|
||||
void tempOrderSplittingOperations(String merchantId, String tradeDate);
|
||||
|
||||
List<BalanceDeductionAmountVO> calculateTheBalanceDeductionAmount(String memberId, BigDecimal amount);
|
||||
OrderSettleResult doBalancePayment(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
List<BalanceDeductionAmountVO> calculateTheBalanceDeductionAmount(String memberId, BigDecimal amount);
|
||||
|
||||
/**
|
||||
* 执行订单分账
|
||||
|
||||
@@ -1150,6 +1150,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
* @param adapayMemberAccount
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OrderSettleResult doBalancePayment(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException {
|
||||
BigDecimal settleAmount = orderBasicInfo.getSettleAmount();
|
||||
String orderCode = orderBasicInfo.getOrderCode();
|
||||
|
||||
Reference in New Issue
Block a user