|
@@ -188,6 +188,47 @@ public class PayServiceImpl implements PayService {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //如果是乐队指导培训的订单,由武汉学校收款
|
|
|
|
+ if(studentPaymentOrder != null && studentPaymentOrder.getType() == OrderTypeEnum.DIRECTOR_TRAINING_CAMP) {
|
|
|
|
+
|
|
|
|
+ Integer routeOrganId = 50;
|
|
|
|
+ HfMember receiverMember = hfMemberDao.getByOrganId(routeOrganId, paymentChannelStr);
|
|
|
|
+
|
|
|
|
+ if(receiverMember == null) {
|
|
|
|
+ throw new BizException("分部[{}]收款账户查询失败", routeOrganId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String merNo = receiverMember.getMemberId();
|
|
|
|
+ if(StringUtils.isBlank(merNo)){
|
|
|
|
+ throw new BizException("平台收款账户查询失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ StudentPaymentRouteOrder studentPaymentRouteOrder = new StudentPaymentRouteOrder();
|
|
|
|
+ studentPaymentRouteOrder.setOrderNo(orderNo);
|
|
|
|
+ studentPaymentRouteOrder.setRouteOrganId(routeOrganId);
|
|
|
|
+ studentPaymentRouteOrder.setFeeFlag("Y");
|
|
|
|
+ studentPaymentRouteOrder.setRouteAmount(amount);
|
|
|
|
+ studentPaymentRouteOrder.setRouteBalanceAmount(balanceAmount);
|
|
|
|
+ studentPaymentRouteOrder.setMerNo(merNo);
|
|
|
|
+ studentPaymentRouteOrder.setSaleAmount(BigDecimal.ZERO);
|
|
|
|
+ studentPaymentRouteOrder.setServiceAmount(amount);
|
|
|
|
+ studentPaymentRouteOrder.setTenantId(tenantId);
|
|
|
|
+ studentPaymentRouteOrder.setCreateTime(date);
|
|
|
|
+ studentPaymentRouteOrder.setUpdateTime(date);
|
|
|
|
+ studentPaymentRouteOrderDao.insert(studentPaymentRouteOrder);
|
|
|
|
+
|
|
|
|
+ Map<String, Object> unionPay = new HashMap<>();
|
|
|
|
+ Map<String, Object> payMap = null;
|
|
|
|
+
|
|
|
|
+ payMap = Payment.getPayMap(hfMerchantConfig, amount, orderNo, returnUrl, orderSubject, orderBody);
|
|
|
|
+
|
|
|
|
+ unionPay.put("orderNo", orderNo);
|
|
|
|
+ unionPay.put("type", paymentChannel.getCode());
|
|
|
|
+ unionPay.put("payMap", payMap);
|
|
|
|
+ unionPay.put("routingMerNos", merNo);
|
|
|
|
+ return unionPay;
|
|
|
|
+ }
|
|
|
|
|
|
BigDecimal subBalance = BigDecimal.ZERO;
|
|
BigDecimal subBalance = BigDecimal.ZERO;
|
|
|
|
|