提交 d17b8c57 authored 作者: hzh's avatar hzh

代码优化

上级 607cea7d
...@@ -2,6 +2,7 @@ package org.dromara.server.controller; ...@@ -2,6 +2,7 @@ package org.dromara.server.controller;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R; import org.dromara.common.core.domain.R;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.order.api.domain.OrderPay; import org.dromara.order.api.domain.OrderPay;
import org.dromara.order.api.domain.RemoteOrder; import org.dromara.order.api.domain.RemoteOrder;
import org.dromara.order.api.domain.RemoteSaveOrder; import org.dromara.order.api.domain.RemoteSaveOrder;
...@@ -33,6 +34,7 @@ public class OrderController { ...@@ -33,6 +34,7 @@ public class OrderController {
/** /**
* 下单支付接口 * 下单支付接口
*/ */
@RepeatSubmit()
@PostMapping("/pay") @PostMapping("/pay")
public R<OrderPay> pay(@Validated @RequestBody OrderPayVo vo) throws Exception { public R<OrderPay> pay(@Validated @RequestBody OrderPayVo vo) throws Exception {
OrderType ot = OrderType.getEnum(vo.getOrderType()); OrderType ot = OrderType.getEnum(vo.getOrderType());
...@@ -46,6 +48,7 @@ public class OrderController { ...@@ -46,6 +48,7 @@ public class OrderController {
* @return 退款结果 * @return 退款结果
* @throws Exception * @throws Exception
*/ */
@RepeatSubmit()
@PostMapping("/refund") @PostMapping("/refund")
public R<Boolean> refund(@Validated @RequestBody OrderPayVo vo) throws Exception { public R<Boolean> refund(@Validated @RequestBody OrderPayVo vo) throws Exception {
OrderType ot = OrderType.getEnum(vo.getOrderType()); OrderType ot = OrderType.getEnum(vo.getOrderType());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论