提交 adc9a752 作者: zhenjie

商城订单支付修改

上级 c987e596
...@@ -25,6 +25,7 @@ import com.mmc.oms.model.vo.demand.DemandReleaseOrderVO; ...@@ -25,6 +25,7 @@ import com.mmc.oms.model.vo.demand.DemandReleaseOrderVO;
import com.mmc.oms.model.vo.demand.OrderRequestParamsVO; import com.mmc.oms.model.vo.demand.OrderRequestParamsVO;
import com.mmc.oms.model.vo.demand.UserPayInfoVO; import com.mmc.oms.model.vo.demand.UserPayInfoVO;
import com.mmc.oms.service.demand.DemandReleaseOrderService; import com.mmc.oms.service.demand.DemandReleaseOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
...@@ -49,6 +50,7 @@ import java.util.concurrent.TimeUnit; ...@@ -49,6 +50,7 @@ import java.util.concurrent.TimeUnit;
* @Date 2023/7/25 15:49 * @Date 2023/7/25 15:49
* @Version 1.0 * @Version 1.0
*/ */
@Slf4j
@Service @Service
public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService { public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService {
...@@ -109,7 +111,9 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService ...@@ -109,7 +111,9 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
public ResultBody payUavOrder(CommonPaymentVO commonPaymentVO, String token) { public ResultBody payUavOrder(CommonPaymentVO commonPaymentVO, String token) {
UavOrderDO uavOrderDO = uavOrderDao.detailByNo(commonPaymentVO.getOrderNumber()); UavOrderDO uavOrderDO = uavOrderDao.detailByNo(commonPaymentVO.getOrderNumber());
if (!uavOrderDO.getOtherAmount().multiply(BigDecimal.valueOf(100)).equals(commonPaymentVO.getAmount())){ log.info("CommonPaymentVO param:{}", com.alibaba.fastjson2.JSONObject.toJSONString(commonPaymentVO));
log.info("uavOrderDO param:{}", com.alibaba.fastjson2.JSONObject.toJSONString(uavOrderDO));
if (uavOrderDO.getOtherAmount().multiply(BigDecimal.valueOf(100)).compareTo(BigDecimal.valueOf(commonPaymentVO.getAmount())) !=0 ){
return ResultBody.error("发起支付金额不正确"); return ResultBody.error("发起支付金额不正确");
} }
OrderRequestParamsVO orderRequestParamsVO = new OrderRequestParamsVO(); OrderRequestParamsVO orderRequestParamsVO = new OrderRequestParamsVO();
......
...@@ -118,7 +118,6 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -118,7 +118,6 @@ public class UavOrderServiceImpl implements UavOrderService {
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) {
// 抵扣云享金小于等于订单总额时,直接使用云享金 // 抵扣云享金小于等于订单总额时,直接使用云享金
...@@ -130,7 +129,6 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -130,7 +129,6 @@ 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论