提交 310b015d 作者: zhenjie

下单打印数据

上级 dde1d539
package com.mmc.oms.service.uav.impl; package com.mmc.oms.service.uav.impl;
import com.alibaba.fastjson2.JSONObject;
import com.mmc.oms.client.PmsClient; import com.mmc.oms.client.PmsClient;
import com.mmc.oms.common.ResultEnum; import com.mmc.oms.common.ResultEnum;
import com.mmc.oms.common.constant.UavOrderProportion; import com.mmc.oms.common.constant.UavOrderProportion;
...@@ -27,6 +28,7 @@ import com.mmc.oms.model.vo.uav.*; ...@@ -27,6 +28,7 @@ import com.mmc.oms.model.vo.uav.*;
import com.mmc.oms.model.vo.wallet.TopUpOrderVO; import com.mmc.oms.model.vo.wallet.TopUpOrderVO;
import com.mmc.oms.service.demand.DemandReleaseOrderService; import com.mmc.oms.service.demand.DemandReleaseOrderService;
import com.mmc.oms.service.uav.UavOrderService; import com.mmc.oms.service.uav.UavOrderService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -43,6 +45,7 @@ import java.util.stream.Collectors; ...@@ -43,6 +45,7 @@ import java.util.stream.Collectors;
* @Date: 2023/9/4 15:31 * @Date: 2023/9/4 15:31
*/ */
@Service @Service
@Slf4j
public class UavOrderServiceImpl implements UavOrderService { public class UavOrderServiceImpl implements UavOrderService {
@Autowired @Autowired
private UavOrderDao uavOrderDao; private UavOrderDao uavOrderDao;
...@@ -110,10 +113,12 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -110,10 +113,12 @@ public class UavOrderServiceImpl implements UavOrderService {
BigDecimal shareAmount = BigDecimal.ZERO; BigDecimal shareAmount = BigDecimal.ZERO;
BigDecimal salaryAmount = BigDecimal.ZERO; BigDecimal salaryAmount = BigDecimal.ZERO;
ResultBody<PayWalletDTO> payResInfo = userAppApi.getCurrentUserPayWalletInfo(currentAccount.getToken()); ResultBody<PayWalletDTO> payResInfo = userAppApi.getCurrentUserPayWalletInfo(currentAccount.getToken());
if (!payResInfo.getCode().equals(ResultEnum.SUCCESS.getResultCode()) || payResInfo.getResult() == null){ if (!payResInfo.getCode().equals(ResultEnum.SUCCESS.getResultCode()) || payResInfo.getResult() == null){
return payResInfo; return payResInfo;
} }
PayWalletDTO payWalletDTO = payResInfo.getResult(); PayWalletDTO payWalletDTO = payResInfo.getResult();
log.info("payWalletDTO:{}", JSONObject.toJSONString(payWalletDTO));
if (param.getDeductShareAmount().equals(1)){ if (param.getDeductShareAmount().equals(1)){
if (otherAmount.compareTo(payWalletDTO.getCashAmt()) >= 0) { if (otherAmount.compareTo(payWalletDTO.getCashAmt()) >= 0) {
// 抵扣云享金小于等于订单总额时,直接使用云享金 // 抵扣云享金小于等于订单总额时,直接使用云享金
...@@ -125,6 +130,7 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -125,6 +130,7 @@ public class UavOrderServiceImpl implements UavOrderService {
} }
otherAmount = otherAmount.subtract(shareAmount); otherAmount = otherAmount.subtract(shareAmount);
Integer statusCode = null; Integer statusCode = null;
log.info("otherAmount:{},shareAmount:{}", otherAmount,shareAmount);
// 支付完成 // 支付完成
if (otherAmount.compareTo(BigDecimal.ZERO) ==0 ){ if (otherAmount.compareTo(BigDecimal.ZERO) ==0 ){
statusCode = UavOrderStatus.WAITING_DELIVER_GOODS.getCode(); statusCode = UavOrderStatus.WAITING_DELIVER_GOODS.getCode();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论