update 优化分账逻辑

This commit is contained in:
2023-08-23 09:30:57 +08:00
parent e7c2a0f92f
commit 8db69750cb
3 changed files with 32 additions and 1 deletions

View File

@@ -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