update 计算订单会员折扣逻辑

This commit is contained in:
2024-01-11 16:14:35 +08:00
parent 2c50f827b1
commit e71ddfb2c8
8 changed files with 104 additions and 56 deletions

View File

@@ -2,6 +2,7 @@ package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
@@ -20,8 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
/**
* 远程控制controller
*/
@@ -67,7 +66,7 @@ public class PileRemoteController extends BaseController {
String transactionCode = null;
try {
transactionCode = IdUtils.generateTransactionCode(dto.getPileSn(), dto.getConnectorCode());
pileRemoteService.remoteStartCharging(dto.getPileSn(), dto.getConnectorCode(), transactionCode, new BigDecimal("500"));
pileRemoteService.remoteStartCharging(dto.getPileSn(), dto.getConnectorCode(), transactionCode, Constants.whitelistDefaultAmount);
// // 生成订单
// orderCode = orderService.generateOrder(dto);
// // 支付订单

View File

@@ -2636,7 +2636,7 @@ public class SpringBootTestController {
List<RefundableWxPayOrderData> recordList = Lists.newArrayList();
// recordList.add(RefundableWxPayOrderData.builder().outTradeNo("1").transactionId("1").payerAmount(new BigDecimal("1000")).refundableAmount(new BigDecimal("0")).build());
// recordList.add(RefundableWxPayOrderData.builder().outTradeNo("2").transactionId("2").payerAmount(new BigDecimal("1000")).refundableAmount(new BigDecimal("0")).build());
recordList.add(RefundableWxPayOrderData.builder().outTradeNo("3").transactionId("3").payerAmount(new BigDecimal("500")).refundableAmount(new BigDecimal("300")).build());
recordList.add(RefundableWxPayOrderData.builder().outTradeNo("3").transactionId("3").payerAmount(Constants.whitelistDefaultAmount).refundableAmount(new BigDecimal("300")).build());
// 也许需要多笔支付订单才够退款
List<WechatPayRefundRequest> requestList = com.google.common.collect.Lists.newArrayList();