mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-27 01:13:52 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -128,12 +128,10 @@ public interface OrderBasicInfoService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据交易记录结算订单
|
* 根据交易记录结算订单
|
||||||
* @param data 交易记录数据
|
|
||||||
* @param orderBasicInfo
|
|
||||||
* @deprecated 该方法废弃 {@link AbstractProgramLogic#settleOrder(TransactionRecordsData, OrderBasicInfo)} instead.
|
* @deprecated 该方法废弃 {@link AbstractProgramLogic#settleOrder(TransactionRecordsData, OrderBasicInfo)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo);
|
// void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭15分钟未支付订单
|
* 关闭15分钟未支付订单
|
||||||
|
|||||||
@@ -729,61 +729,6 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
return queryChargingByPileSnAndConnectorCode(pileSn, connectorCode);
|
return queryChargingByPileSnAndConnectorCode(pileSn, connectorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 结算订单逻辑/订单结算逻辑
|
|
||||||
*
|
|
||||||
* @param data 交易记录数据
|
|
||||||
* @param orderBasicInfo 订单主表信息,由调用方传过来
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo) {
|
|
||||||
logger.info("结算订单start data:{}, orderBasicInfo:{}", data.toString(), orderBasicInfo.toString());
|
|
||||||
// 判断订单状态
|
|
||||||
if (StringUtils.equals(orderBasicInfo.getOrderStatus(), OrderStatusEnum.ORDER_COMPLETE.getValue())) {
|
|
||||||
logger.info("结算订单:{}, 是订单完成状态", orderBasicInfo.getOrderCode());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 获取更新数据后的orderBasicInfo对象
|
|
||||||
returnUpdateOrderBasicInfo(orderBasicInfo, data);
|
|
||||||
// 获取更新数据后的orderDetail对象/更新订单详情 查询订单详情 修改订单数据
|
|
||||||
OrderDetail orderDetail = returnUpdateOrderDetail(orderBasicInfo, data);
|
|
||||||
// 更新数据库
|
|
||||||
OrderTransactionDTO dto = new OrderTransactionDTO();
|
|
||||||
dto.setOrderBasicInfo(orderBasicInfo);
|
|
||||||
dto.setOrderDetail(orderDetail);
|
|
||||||
transactionService.doUpdateOrder(dto);
|
|
||||||
|
|
||||||
// 订单支付结算and退款, delay商户部分解冻并退款, 非delay商户全部解冻并退款
|
|
||||||
orderPaymentSettlementAndRefund(orderBasicInfo);
|
|
||||||
|
|
||||||
// 将卡/vin状态解锁
|
|
||||||
if (!StringUtils.equals("0000000000000000", data.getLogicCard())) {
|
|
||||||
cardStatusUnlocked(orderBasicInfo.getLogicCard());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果是vin启动,将启动锁定状态改为正常
|
|
||||||
if (StringUtils.equals(data.getTransactionIdentifier(), "05")) {
|
|
||||||
vinStatusUnlocked(data.getVinCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 发送停止充电订阅消息
|
|
||||||
sendMsg(orderBasicInfo);
|
|
||||||
|
|
||||||
// 从redis中取出实时记录保存到表中
|
|
||||||
realTimeMonitorDataRedis2DB(orderBasicInfo.getTransactionCode(), orderBasicInfo.getOrderCode());
|
|
||||||
|
|
||||||
// TODO 如果该站点的停车场优惠券信息配置不为空,则需绑定一张优惠券
|
|
||||||
|
|
||||||
logger.info("结算订单end:{} OrderTransactionDTO:{}", orderBasicInfo.getOrderCode(), JSONObject.toJSONString(dto));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 记账
|
|
||||||
*/
|
|
||||||
// private void doUpdateClearingBill(OrderSettleResult orderSettleResult) {
|
|
||||||
// logger.info("orderSettleResult:{}", JSON.toJSONString(orderSettleResult));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单分账逻辑
|
* 订单分账逻辑
|
||||||
* 订单结算完成,就执行清分and退款
|
* 订单结算完成,就执行清分and退款
|
||||||
@@ -3085,6 +3030,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算启动金额
|
* 计算启动金额
|
||||||
|
* 2024年1月9日10点24分 下发金额不变,由结算时计算优惠金额
|
||||||
*/
|
*/
|
||||||
private BigDecimal computeChargeAmount(String merchantId, String stationId, String memberId, BigDecimal payAmount) {
|
private BigDecimal computeChargeAmount(String merchantId, String stationId, String memberId, BigDecimal payAmount) {
|
||||||
// 默认折扣100%
|
// 默认折扣100%
|
||||||
|
|||||||
@@ -23,10 +23,7 @@ import com.jsowell.pile.service.*;
|
|||||||
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
||||||
import com.jsowell.pile.transaction.service.TransactionService;
|
import com.jsowell.pile.transaction.service.TransactionService;
|
||||||
import com.jsowell.pile.vo.uniapp.PileConnectorDetailVO;
|
import com.jsowell.pile.vo.uniapp.PileConnectorDetailVO;
|
||||||
import com.jsowell.pile.vo.web.BalanceDeductionAmountVO;
|
import com.jsowell.pile.vo.web.*;
|
||||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
|
||||||
import com.jsowell.pile.vo.web.OrderDetailInfoVO;
|
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
|
||||||
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -105,6 +102,9 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
|||||||
@Autowired
|
@Autowired
|
||||||
protected MemberWalletInfoService memberWalletInfoService;
|
protected MemberWalletInfoService memberWalletInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected MemberGroupService memberGroupService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected RedisCache redisCache;
|
protected RedisCache redisCache;
|
||||||
|
|
||||||
@@ -424,30 +424,46 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected Map<String, BigDecimal> calculateReturnAmount(BigDecimal principalPay, BigDecimal giftPay, BigDecimal orderAmount) {
|
protected Map<String, BigDecimal> calculateReturnAmount(BigDecimal principalPay, BigDecimal giftPay, BigDecimal orderAmount) {
|
||||||
|
return calculateReturnAmount(principalPay, giftPay, orderAmount, BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额支付 计算需要退回的金额
|
||||||
|
* 【公共方法】
|
||||||
|
* @param principalPay 本金支付金额
|
||||||
|
* @param giftPay 赠送金额支付的金额
|
||||||
|
* @param orderAmount 订单消费金额
|
||||||
|
* @param discountAmount 订单折扣金额
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected Map<String, BigDecimal> calculateReturnAmount(BigDecimal principalPay, BigDecimal giftPay, BigDecimal orderAmount, BigDecimal discountAmount) {
|
||||||
Map<String, BigDecimal> resultMap = Maps.newHashMap();
|
Map<String, BigDecimal> resultMap = Maps.newHashMap();
|
||||||
|
|
||||||
// 消费金额优先使用本金
|
// 消费金额优先使用本金
|
||||||
BigDecimal returnPrincipal = null; // 退回本金金额
|
BigDecimal returnPrincipal = null; // 退回本金金额
|
||||||
BigDecimal returnGift = null; // 退回赠送金额
|
BigDecimal returnGift = null; // 退回赠送金额
|
||||||
|
|
||||||
|
// 实际消费金额 = 订单消费金额 - 订单折扣金额
|
||||||
|
BigDecimal amountDue = orderAmount.subtract(discountAmount);
|
||||||
|
|
||||||
// 余额支付 有3种情况
|
// 余额支付 有3种情况
|
||||||
if (principalPay != null && giftPay == null) {
|
if (principalPay != null && giftPay == null) {
|
||||||
// 只有本金支付
|
// 只有本金支付
|
||||||
BigDecimal subtract = principalPay.subtract(orderAmount);
|
BigDecimal subtract = principalPay.subtract(amountDue);
|
||||||
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
returnPrincipal = subtract;
|
returnPrincipal = subtract;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (principalPay == null && giftPay != null) {
|
if (principalPay == null && giftPay != null) {
|
||||||
// 只有赠送金额支付
|
// 只有赠送金额支付
|
||||||
BigDecimal subtract = giftPay.subtract(orderAmount);
|
BigDecimal subtract = giftPay.subtract(amountDue);
|
||||||
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
returnGift = subtract;
|
returnGift = subtract;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (principalPay != null && giftPay != null) {
|
if (principalPay != null && giftPay != null) {
|
||||||
// 本金+赠送支付
|
// 本金+赠送支付
|
||||||
BigDecimal subtract = principalPay.subtract(orderAmount);
|
BigDecimal subtract = principalPay.subtract(amountDue);
|
||||||
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
// 本金减掉订单金额后还有剩余,那就把剩余的退回,赠送原封不动退回
|
// 本金减掉订单金额后还有剩余,那就把剩余的退回,赠送原封不动退回
|
||||||
returnPrincipal = subtract;
|
returnPrincipal = subtract;
|
||||||
@@ -732,4 +748,49 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
|||||||
transactionService.doCreateOrder(createOrderTransactionDTO);
|
transactionService.doCreateOrder(createOrderTransactionDTO);
|
||||||
return orderBasicInfo;
|
return orderBasicInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算订单折扣
|
||||||
|
* @param orderBasicInfo 订单主表
|
||||||
|
* @param orderDetail 订单详情
|
||||||
|
*/
|
||||||
|
protected void calculateOrderDiscounts(OrderBasicInfo orderBasicInfo, OrderDetail orderDetail) {
|
||||||
|
String memberId = orderBasicInfo.getMemberId(); // 会员id
|
||||||
|
String merchantId = orderBasicInfo.getMerchantId(); // 运营商id
|
||||||
|
String stationId = orderBasicInfo.getStationId(); // 站点id
|
||||||
|
|
||||||
|
// 电费折扣金额
|
||||||
|
BigDecimal discountElectricityAmount = BigDecimal.ZERO;
|
||||||
|
// 服务费折扣金额
|
||||||
|
BigDecimal discountServiceAmount = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
// 查询会员在此站点会员折扣
|
||||||
|
MemberDiscountVO memberDiscountVO = memberGroupService.queryMemberDiscount(merchantId, stationId, memberId);
|
||||||
|
if (memberDiscountVO != null) {
|
||||||
|
BigDecimal discount = memberDiscountVO.getDiscount(); // 折扣率
|
||||||
|
String groupType = memberDiscountVO.getGroupType(); // 类型(1-服务费折扣,2-电费折扣 ,3-电费和服务费一起折扣)
|
||||||
|
BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount(); // 电费
|
||||||
|
BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount(); // 服务费
|
||||||
|
|
||||||
|
BigDecimal afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
||||||
|
BigDecimal afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
||||||
|
if (Constants.ONE.equals(groupType)) {
|
||||||
|
discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
||||||
|
} else if (Constants.TWO.equals(groupType)) {
|
||||||
|
discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
||||||
|
} else {
|
||||||
|
// BigDecimal afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
||||||
|
discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
||||||
|
// BigDecimal afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
||||||
|
discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单折扣金额
|
||||||
|
BigDecimal discountAmount = discountServiceAmount.add(discountElectricityAmount);
|
||||||
|
orderBasicInfo.setDiscountAmount(discountAmount);
|
||||||
|
// 更新退款金额 = 退款金额 - 折扣金额
|
||||||
|
orderBasicInfo.setRefundAmount(orderBasicInfo.getRefundAmount().subtract(discountAmount));
|
||||||
|
orderDetail.setDiscountElectricityAmount(discountElectricityAmount);
|
||||||
|
orderDetail.setDiscountServiceAmount(discountServiceAmount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,119 +77,6 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
|
|||||||
return saveOrder2Database(dto);
|
return saveOrder2Database(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成订单编号
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
// private String generateNewOrderCode() {
|
|
||||||
// while (true) {
|
|
||||||
// String orderCode = "C" + IdUtils.getOrderCode();
|
|
||||||
// // 通过orderCode查询是否已经存在
|
|
||||||
// OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
|
||||||
// if (orderBasicInfo == null) {
|
|
||||||
// return orderCode;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存订单信息到数据库
|
|
||||||
*
|
|
||||||
* @param dto
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
// protected OrderBasicInfo saveOrder2Database(GenerateOrderDTO dto) throws ParseException {
|
|
||||||
// String orderCode = generateNewOrderCode();
|
|
||||||
// String transactionCode = IdUtils.generateTransactionCode(dto.getPileSn(), dto.getConnectorCode());
|
|
||||||
//
|
|
||||||
// if (StringUtils.isBlank(dto.getStartType())) {
|
|
||||||
// dto.setStartType(StartTypeEnum.NOW.getValue());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// String stationId = dto.getPileConnector().getStationId();
|
|
||||||
// // 查询站点信息
|
|
||||||
// PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.valueOf(stationId));
|
|
||||||
// String merchantId = pileStationInfo != null ? String.valueOf(pileStationInfo.getMerchantId()) : "";
|
|
||||||
// String plateNumber = dto.getPlateNumber() != null ? dto.getPlateNumber() : "";
|
|
||||||
// // 订单基本信息
|
|
||||||
// OrderBasicInfo orderBasicInfo = OrderBasicInfo.builder()
|
|
||||||
// .orderCode(orderCode)
|
|
||||||
// .transactionCode(transactionCode)
|
|
||||||
// .orderStatus(OrderStatusEnum.NOT_START.getValue())
|
|
||||||
// .memberId(dto.getMemberId())
|
|
||||||
// .stationId(stationId)
|
|
||||||
// .merchantId(merchantId)
|
|
||||||
// .pileSn(dto.getPileSn())
|
|
||||||
// .connectorCode(dto.getConnectorCode())
|
|
||||||
// .pileConnectorCode(dto.getPileSn() + dto.getConnectorCode())
|
|
||||||
// .startMode(dto.getStartMode())
|
|
||||||
// .payStatus(Constants.ZERO)
|
|
||||||
// .payAmount(dto.getChargeAmount())
|
|
||||||
// .payMode(dto.getPayMode())
|
|
||||||
// .plateNumber(plateNumber)
|
|
||||||
// .orderAmount(BigDecimal.ZERO)
|
|
||||||
// .virtualAmount(BigDecimal.ZERO)
|
|
||||||
// .settleAmount(BigDecimal.ZERO)
|
|
||||||
// .startType(dto.getStartType())
|
|
||||||
// .build();
|
|
||||||
// if (StringUtils.equals(dto.getStartMode(), StartModeEnum.AUTH_CARD.getValue())) {
|
|
||||||
// // 鉴权卡启动
|
|
||||||
// orderBasicInfo.setLogicCard(dto.getPileAuthCardInfo().getLogicCard());
|
|
||||||
// }
|
|
||||||
// if (StringUtils.equals(dto.getStartMode(), StartModeEnum.VIN_CODE.getValue())) {
|
|
||||||
// // vin启动
|
|
||||||
// MemberPlateNumberRelation memberPlateNumberRelation = dto.getMemberPlateNumberRelation();
|
|
||||||
// if (memberPlateNumberRelation != null) {
|
|
||||||
// if (StringUtils.isNotBlank(memberPlateNumberRelation.getVinCode())) {
|
|
||||||
// orderBasicInfo.setVinCode(memberPlateNumberRelation.getVinCode());
|
|
||||||
// }
|
|
||||||
// if (StringUtils.isNotBlank(memberPlateNumberRelation.getLicensePlateNumber())) {
|
|
||||||
// orderBasicInfo.setPlateNumber(memberPlateNumberRelation.getLicensePlateNumber());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (StringUtils.equals(dto.getStartType(), StartTypeEnum.APPOINTMENT.getValue())) {
|
|
||||||
// orderBasicInfo.setAppointmentTime(DateUtils.parseDate(dto.getAppointmentTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 订单详情
|
|
||||||
// BillingTemplateVO billingTemplate = dto.getBillingTemplate();
|
|
||||||
// logger.info("订单使用的计费模板-orderCode:{}, billingTemplate:{}", orderCode, JSONObject.toJSONString(billingTemplate));
|
|
||||||
// BigDecimal sharpElectricityPrice = billingTemplate.getSharpElectricityPrice() != null ? billingTemplate.getSharpElectricityPrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal sharpServicePrice = billingTemplate.getSharpServicePrice() != null ? billingTemplate.getSharpServicePrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal peakElectricityPrice = billingTemplate.getPeakElectricityPrice() != null ? billingTemplate.getPeakElectricityPrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal peakServicePrice = billingTemplate.getPeakServicePrice() != null ? billingTemplate.getPeakServicePrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal flatElectricityPrice = billingTemplate.getFlatElectricityPrice() != null ? billingTemplate.getFlatElectricityPrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal flatServicePrice = billingTemplate.getFlatServicePrice() != null ? billingTemplate.getFlatServicePrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal valleyElectricityPrice = billingTemplate.getValleyElectricityPrice() != null ? billingTemplate.getValleyElectricityPrice() : BigDecimal.ZERO;
|
|
||||||
// BigDecimal valleyServicePrice = billingTemplate.getValleyServicePrice() != null ? billingTemplate.getValleyServicePrice() : BigDecimal.ZERO;
|
|
||||||
//
|
|
||||||
// OrderDetail orderDetail = OrderDetail.builder()
|
|
||||||
// .orderCode(orderCode)
|
|
||||||
// .sharpPrice(sharpElectricityPrice.add(sharpServicePrice))
|
|
||||||
// .sharpElectricityPrice(sharpElectricityPrice)
|
|
||||||
// .sharpServicePrice(sharpServicePrice)
|
|
||||||
// .peakPrice(peakElectricityPrice.add(peakServicePrice))
|
|
||||||
// .peakElectricityPrice(peakElectricityPrice)
|
|
||||||
// .peakServicePrice(peakServicePrice)
|
|
||||||
// .flatPrice(flatElectricityPrice.add(flatServicePrice))
|
|
||||||
// .flatElectricityPrice(flatElectricityPrice)
|
|
||||||
// .flatServicePrice(flatServicePrice)
|
|
||||||
// .valleyPrice(valleyElectricityPrice.add(valleyServicePrice))
|
|
||||||
// .valleyElectricityPrice(valleyElectricityPrice)
|
|
||||||
// .valleyServicePrice(valleyServicePrice)
|
|
||||||
// .build();
|
|
||||||
//
|
|
||||||
// OrderTransactionDTO createOrderTransactionDTO = OrderTransactionDTO.builder()
|
|
||||||
// .orderBasicInfo(orderBasicInfo)
|
|
||||||
// .orderDetail(orderDetail)
|
|
||||||
// .build();
|
|
||||||
// transactionService.doCreateOrder(createOrderTransactionDTO);
|
|
||||||
// return orderBasicInfo;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> payOrder(PayOrderDTO dto) {
|
public Map<String, Object> payOrder(PayOrderDTO dto) {
|
||||||
logger.info("【{}】-支付订单start, param:{}", this.getClass().getSimpleName(), JSON.toJSONString(dto));
|
logger.info("【{}】-支付订单start, param:{}", this.getClass().getSimpleName(), JSON.toJSONString(dto));
|
||||||
@@ -438,7 +325,7 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单结算
|
* 订单结算/结算订单逻辑/订单结算逻辑
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo) {
|
public void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo) {
|
||||||
@@ -452,6 +339,8 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
|
|||||||
returnUpdateOrderBasicInfo(orderBasicInfo, data);
|
returnUpdateOrderBasicInfo(orderBasicInfo, data);
|
||||||
// 获取更新数据后的orderDetail对象/更新订单详情 查询订单详情 修改订单数据
|
// 获取更新数据后的orderDetail对象/更新订单详情 查询订单详情 修改订单数据
|
||||||
OrderDetail orderDetail = returnUpdateOrderDetail(orderBasicInfo, data);
|
OrderDetail orderDetail = returnUpdateOrderDetail(orderBasicInfo, data);
|
||||||
|
// 计算订单折扣 calculateOrderDiscounts
|
||||||
|
calculateOrderDiscounts(orderBasicInfo, orderDetail);
|
||||||
// 更新数据库
|
// 更新数据库
|
||||||
OrderTransactionDTO dto = new OrderTransactionDTO();
|
OrderTransactionDTO dto = new OrderTransactionDTO();
|
||||||
dto.setOrderBasicInfo(orderBasicInfo);
|
dto.setOrderBasicInfo(orderBasicInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user