mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 新增小程序关闭待支付订单接口
This commit is contained in:
@@ -14,6 +14,7 @@ import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.service.CarCouponRecordService;
|
||||
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.ChargeAlgorithmRecordVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||
@@ -50,6 +51,9 @@ public class OrderController extends BaseController {
|
||||
@Autowired
|
||||
private CarCouponRecordService carCouponRecordService;
|
||||
|
||||
@Autowired
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
/**
|
||||
* 生成订单/创建订单
|
||||
* http://localhost:8080/uniapp/order/generateOrder
|
||||
@@ -436,4 +440,23 @@ public class OrderController extends BaseController {
|
||||
logger.info("查询停车优免订单 memberId:{}, result:{}", memberId, response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭待支付的订单
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/closeUnPayOder/{orderCode}")
|
||||
public RestApiResponse<?> closeUnPayOder(@PathVariable("orderCode") String orderCode) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
orderBasicInfoService.closeUnPayOder(orderCode);
|
||||
response = new RestApiResponse<>();
|
||||
} catch (Exception e) {
|
||||
logger.error("关闭订单号:{} 的订单失败, error:", orderCode, e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("关闭订单:{}", orderCode);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -539,10 +539,10 @@ public class PaymentTestController {
|
||||
*/
|
||||
@Test
|
||||
public void createPaymentReverseRequestTest() {
|
||||
String paymentId = "002212025091910192610814936868000780288";
|
||||
BigDecimal refundAmount = new BigDecimal("0.02");
|
||||
String paymentId = "002212025092509265410817097978174926848";
|
||||
BigDecimal refundAmount = new BigDecimal("0.5");
|
||||
String memberId = "65622699";
|
||||
String orderCode = "C48996543963";
|
||||
String orderCode = "C23464104497";
|
||||
|
||||
// 延迟分账未确认调撤销调撤销接口退款
|
||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||
|
||||
Reference in New Issue
Block a user