提交 f6a63137 作者: 张小凤

NotRepeatSubmit(update)

上级 14c2a65c
......@@ -53,7 +53,7 @@ public class DemandReleaseOrderController extends BaseController {
@ApiOperation(value = "订单支付")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("/orderPayment")
@NotRepeatSubmit(value = 4000L)
@NotRepeatSubmit(value = 3000L)
public ResultBody orderPayment(@RequestBody @Validated CommonPaymentVO commonPaymentVO, HttpServletRequest request) {
return releaseOrderService.orderPayment(commonPaymentVO, request,this.getCurrentAccount(request).getUserAccountId());
}
......
......@@ -36,6 +36,7 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @Author small
......@@ -146,6 +147,11 @@ public class DemandReleaseOrderServiceImpl implements DemandReleaseOrderService
private ResultBody publishServicePay(CommonPaymentVO commonPaymentVO, String token,Integer userAccountId, HttpServletRequest request) {
if ("4".equals(commonPaymentVO.getOrderPort().toString())){
try {
TimeUnit.MINUTES.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
String orderNumber = commonPaymentVO.getOrderNumber();
String json = stringRedisTemplate.opsForValue().get(orderNumber);
GetOrderNumberDTO getOrderNumberDTO = JSONObject.parseObject(json, GetOrderNumberDTO.class);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论