ソースを参照

取消订单优化

xiongzhu 3 年 前
コミット
eec82c8a45

+ 3 - 2
src/main/java/com/izouma/nineth/aspect/RedisLockAspect.java

@@ -37,6 +37,7 @@ public class RedisLockAspect {
 
     @Around(value = "redisLockPointCut() && @annotation(redisLock)")
     public Object redisLock(ProceedingJoinPoint joinPoint, RedisLock redisLock) {
+        log.info("enter redisLock aspect");
         ExpressionParser parser = new SpelExpressionParser();
         EvaluationContext context = new StandardEvaluationContext(joinPoint.getSignature());
         MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
@@ -53,8 +54,10 @@ public class RedisLockAspect {
                     .orElse("default");
         } catch (Exception e) {
         }
+        log.info("redisLock aspect key: {}", key);
         BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(key);
         Boolean success = ops.setIfAbsent(1, redisLock.expire(), redisLock.unit());
+        log.info("redisLock aspect lock success: {}", success);
         if (Boolean.TRUE.equals(success)) {
             Object res = null;
             try {
@@ -68,8 +71,6 @@ public class RedisLockAspect {
             }
             redisTemplate.delete(key);
             return res;
-        } else {
-            log.info("redis locked, key:{}", key);
         }
         throw new BusinessException("发生错误,请稍后再试");
     }

+ 1 - 0
src/main/java/com/izouma/nineth/event/OrderNotifyEvent.java

@@ -14,6 +14,7 @@ public class OrderNotifyEvent implements Serializable {
     public static final String TYPE_ORDER      = "order";
     public static final String TYPE_MINT_ORDER = "mint_order";
     public static final String TYPE_GIFT_ORDER = "gift_order";
+    public static final String TYPE_RECHARGE   = "recharge";
 
     private Long      orderId;
     private PayMethod payMethod;

+ 11 - 3
src/main/java/com/izouma/nineth/listener/OrderNotifyListener.java

@@ -5,6 +5,7 @@ import com.izouma.nineth.event.OrderNotifyEvent;
 import com.izouma.nineth.service.GiftOrderService;
 import com.izouma.nineth.service.MintOrderService;
 import com.izouma.nineth.service.OrderService;
+import com.izouma.nineth.service.UserBalanceService;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.rocketmq.spring.annotation.ConsumeMode;
@@ -22,9 +23,10 @@ import org.springframework.stereotype.Service;
         consumeMode = ConsumeMode.ORDERLY)
 @ConditionalOnProperty(value = "general.notify-server", havingValue = "true")
 public class OrderNotifyListener implements RocketMQListener<OrderNotifyEvent> {
-    private OrderService     orderService;
-    private MintOrderService mintOrderService;
-    private GiftOrderService giftOrderService;
+    private OrderService       orderService;
+    private MintOrderService   mintOrderService;
+    private GiftOrderService   giftOrderService;
+    private UserBalanceService userBalanceService;
 
     @Override
     public void onMessage(OrderNotifyEvent e) {
@@ -35,6 +37,12 @@ public class OrderNotifyListener implements RocketMQListener<OrderNotifyEvent> {
             case OrderNotifyEvent.TYPE_MINT_ORDER:
                 mintOrderService.mintNotify(e.getOrderId(), e.getPayMethod(), e.getTransactionId());
                 break;
+            case OrderNotifyEvent.TYPE_GIFT_ORDER:
+                giftOrderService.giftNotify(e.getOrderId(), e.getPayMethod(), e.getTransactionId());
+                break;
+            case OrderNotifyEvent.TYPE_RECHARGE:
+                userBalanceService.recharge(e.getOrderId(), e.getPayMethod(), e.getTransactionId());
+                break;
             case OrderNotifyEvent.TYPE_ORDER:
             default:
                 orderService.notifyOrder(e.getOrderId(), e.getPayMethod(), e.getTransactionId());

+ 0 - 17
src/main/java/com/izouma/nineth/service/GiftOrderService.java

@@ -350,23 +350,6 @@ public class GiftOrderService {
         }
     }
 
-    @Scheduled(fixedRate = 60000)
-    public void batchCancel() {
-        if (generalProperties.isNotifyServer()) {
-            return;
-        }
-        if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
-            return;
-        }
-        List<GiftOrder> orders = giftOrderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(OrderStatus.NOT_PAID,
-                LocalDateTime.now().minusMinutes(5));
-        orders.forEach(o -> {
-            try {
-                cancel(o);
-            } catch (Exception ignored) {
-            }
-        });
-    }
 
     public void cancel(GiftOrder order) {
         if (order.getStatus() != OrderStatus.NOT_PAID) {

+ 0 - 18
src/main/java/com/izouma/nineth/service/MintOrderService.java

@@ -580,24 +580,6 @@ public class MintOrderService {
         }
     }
 
-    @Scheduled(fixedRate = 60000)
-    public void batchCancel() {
-        if (generalProperties.isNotifyServer()) {
-            return;
-        }
-        if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
-            return;
-        }
-        List<MintOrder> orders = mintOrderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(MintOrderStatus.NOT_PAID,
-                LocalDateTime.now().minusMinutes(5));
-        orders.forEach(o -> {
-            try {
-                cancel(o, false);
-            } catch (Exception ignored) {
-            }
-        });
-    }
-
     public void cancel(MintOrder order, boolean refund) {
         if (!getOrderLock(order.getId())) {
             log.error("订单取消失败 {}, redis锁了", order.getId());

+ 74 - 3
src/main/java/com/izouma/nineth/service/OrderCancelService.java

@@ -1,10 +1,18 @@
 package com.izouma.nineth.service;
 
+import com.izouma.nineth.annotations.RedisLock;
 import com.izouma.nineth.config.GeneralProperties;
+import com.izouma.nineth.domain.GiftOrder;
+import com.izouma.nineth.domain.MintOrder;
 import com.izouma.nineth.domain.Order;
 import com.izouma.nineth.domain.SysConfig;
+import com.izouma.nineth.dto.PayQuery;
+import com.izouma.nineth.enums.MintOrderStatus;
 import com.izouma.nineth.enums.OrderStatus;
+import com.izouma.nineth.enums.PayStatus;
 import com.izouma.nineth.exception.BusinessException;
+import com.izouma.nineth.repo.GiftOrderRepo;
+import com.izouma.nineth.repo.MintOrderRepo;
 import com.izouma.nineth.repo.OrderRepo;
 import com.izouma.nineth.repo.SysConfigRepo;
 import lombok.AllArgsConstructor;
@@ -15,7 +23,9 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
 import java.time.LocalDateTime;
+import java.util.Arrays;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 @Service
 @ConditionalOnProperty(value = "general.notify-server", havingValue = "true")
@@ -26,27 +36,34 @@ public class OrderCancelService {
     private final OrderRepo         orderRepo;
     private final OrderService      orderService;
     private final SysConfigRepo     sysConfigRepo;
+    private final MintOrderRepo     mintOrderRepo;
+    private final MintOrderService  mintOrderService;
+    private final GiftOrderRepo     giftOrderRepo;
+    private final GiftOrderService  giftOrderService;
+    private final OrderPayService   orderPayService;
 
     private static int orderCancelInterval = 210;
 
     public static void setOrderCancelInterval(int orderCancelInterval) {
+        log.info("设置订单取消时间间隔为 {}S", orderCancelInterval);
         OrderCancelService.orderCancelInterval = orderCancelInterval;
     }
 
     @PostConstruct
     public void init() {
-        orderCancelInterval = sysConfigRepo.findByName("order_cancel_interval")
+        orderCancelInterval = sysConfigRepo.findByName("order_cancel_time")
                 .map(SysConfig::getValue).map(Integer::parseInt).orElse(210);
     }
 
-    @Scheduled(fixedRate = 30000)
+    @Scheduled(fixedRate = 30000, initialDelay = 10000)
+    @RedisLock(value = "order_batch_cancel_lock", expire = 3, unit = TimeUnit.MINUTES)
     public void batchCancel() {
         List<Order> orders = orderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(OrderStatus.NOT_PAID,
                 LocalDateTime.now().minusSeconds(orderCancelInterval));
         orders.parallelStream().forEach(o -> {
             try {
                 Order order = orderRepo.findById(o.getId()).orElseThrow(new BusinessException("订单不存在"));
-                if (order.getStatus() == OrderStatus.NOT_PAID) {
+                if (order.getStatus() == OrderStatus.NOT_PAID && canCancel(order.getId().toString())) {
                     orderService.cancel(order);
                 }
             } catch (Exception e) {
@@ -54,4 +71,58 @@ public class OrderCancelService {
             }
         });
     }
+
+    @Scheduled(fixedRate = 30000, initialDelay = 20000)
+    @RedisLock(value = "gift_order_batch_cancel_lock", expire = 3, unit = TimeUnit.MINUTES)
+    public void batchCancelMintOrder() {
+        List<MintOrder> orders = mintOrderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(MintOrderStatus.NOT_PAID,
+                LocalDateTime.now().minusSeconds(orderCancelInterval));
+        orders.forEach(o -> {
+            try {
+                MintOrder order = mintOrderRepo.findById(o.getId()).orElseThrow(new BusinessException("订单不存在"));
+                if (order.getStatus() == MintOrderStatus.NOT_PAID && canCancel(order.getId().toString())) {
+                    mintOrderService.cancel(order, false);
+                }
+            } catch (Exception ignored) {
+            }
+        });
+    }
+
+    @Scheduled(fixedRate = 30000, initialDelay = 30000)
+    public void batchCancelGiftOrder() {
+        List<GiftOrder> orders = giftOrderRepo.findByStatusAndCreatedAtBeforeAndDelFalse(OrderStatus.NOT_PAID,
+                LocalDateTime.now().minusSeconds(orderCancelInterval));
+        orders.forEach(o -> {
+            try {
+                GiftOrder order = giftOrderRepo.findById(o.getId()).orElseThrow(new BusinessException("订单不存在"));
+                if (order.getStatus() == OrderStatus.NOT_PAID && canCancel(order.getId().toString())) {
+                    giftOrderService.cancel(order);
+                }
+            } catch (Exception ignored) {
+            }
+        });
+    }
+
+    private boolean canCancel(String id) {
+        PayQuery query = new PayQuery();
+        try {
+            query = orderPayService.query(id);
+        } catch (Exception e) {
+            query.setExist(false);
+        }
+        if (query.isExist()) {
+            if (query.getStatus() != null) {
+                switch (query.getStatus()) {
+                    case SUCCESS:
+                    case PENDING:
+                        log.info("订单 {}, 状态 {}, 不能取消", id, query.getStatus().name());
+                        return false;
+                    default:
+                        log.info("订单 {}, 状态 {}, 可以取消", id, query.getStatus().name());
+                        return true;
+                }
+            }
+        }
+        return true;
+    }
 }

+ 1 - 0
src/main/java/com/izouma/nineth/service/OrderPayService.java

@@ -54,6 +54,7 @@ public class OrderPayService {
     private final UserBankCardRepo   userBankCardRepo;
 
     public static void setPayChannel(String payChannel) {
+        log.info("set pay channel {}", payChannel);
         if (Constants.PayChannel.HM.equals(payChannel) || Constants.PayChannel.SAND.equals(payChannel)) {
             PAY_CHANNEL = payChannel;
         }

+ 1 - 56
src/main/java/com/izouma/nineth/service/OrderService.java

@@ -805,63 +805,8 @@ public class OrderService {
         }
 
         try {
-            PayQuery payQuery;
-            try {
-                payQuery = orderPayService.query(order.getId().toString());
-            } catch (Exception e) {
-                payQuery = new PayQuery();
-                payQuery.setExist(false);
-            }
-            if (payQuery.isExist()) {
-                if (PayStatus.SUCCESS == payQuery.getStatus() || PayStatus.PENDING == payQuery.getStatus()) {
-                    log.info("订单 {} 已经支付无法取消, transactionId={}, channel={}", order.getId(), payQuery.getTransactionId(), payQuery.getChannel());
-                    throw new BusinessException("已支付订单无法取消");
-                }
-            }
-
             if (order.getStatus() != OrderStatus.NOT_PAID) {
-                throw new BusinessException("已支付订单无法取消");
-            }
-
-            // 查询adapay支付记录,如果已经支付,则不能取消
-            Set<Object> transactionIds = redisTemplate.opsForSet().members(RedisKeys.PAY_RECORD + order.getId());
-            if (transactionIds != null && transactionIds.size() > 0) {
-                AtomicInteger succeeded = new AtomicInteger();
-                AtomicInteger pending = new AtomicInteger();
-                transactionIds.parallelStream().forEach(s -> {
-                    String transactionIdStr = Optional.ofNullable(s).map(Object::toString).orElse("");
-                    String transactionId = null;
-                    String merchant = null;
-                    if (transactionIdStr.contains("#")) {
-                        String[] arr = transactionIdStr.split("#");
-                        merchant = arr[0];
-                        transactionId = arr[1];
-                    } else {
-                        merchant = Adapay.defaultMerchantKey;
-                        transactionId = transactionIdStr;
-                    }
-                    try {
-                        Map<String, Object> map = Payment.query(transactionId, merchant);
-                        if ("succeeded".equalsIgnoreCase(MapUtils.getString(map, "status"))) {
-                            succeeded.getAndIncrement();
-                        }
-                        if ("pending".equalsIgnoreCase(MapUtils.getString(map, "status"))) {
-                            pending.getAndIncrement();
-                            // 未支付的订单调用关单接口
-                            Map<String, Object> closeParams = new HashMap<>();
-                            closeParams.put("payment_id", transactionId);
-                            Payment.close(closeParams, merchant);
-                        }
-                    } catch (BaseAdaPayException e) {
-                        log.error("adapay error", e);
-                    }
-                });
-//                if (succeeded.get() + pending.get() > 0) {
-                if (succeeded.get() > 0) {
-                    if (ChronoUnit.MINUTES.between(order.getCreatedAt(), LocalDateTime.now()) < 10) {
-                        throw new BusinessException("订单已经支付成功或待支付,不能取消 " + order.getId());
-                    }
-                }
+                throw new BusinessException("当前订单状态无法取消[" + order.getStatus().name() + "]");
             }
 
             CollectionSource source = Optional.ofNullable(order.getSource()).orElseGet(() ->

+ 1 - 0
src/main/java/com/izouma/nineth/utils/JpaUtils.java

@@ -31,6 +31,7 @@ public class JpaUtils {
     private static SearchMode defaultSearchMode = SearchMode.PREFIX;
 
     public static void setDefaultSearchMode(SearchMode defaultSearchMode) {
+        log.info("set default search mode to {}", defaultSearchMode.name());
         JpaUtils.defaultSearchMode = defaultSearchMode;
     }
 

+ 9 - 9
src/main/java/com/izouma/nineth/web/HmPayController.java

@@ -7,7 +7,6 @@ import com.izouma.nineth.config.GeneralProperties;
 import com.izouma.nineth.config.HmPayProperties;
 import com.izouma.nineth.enums.PayMethod;
 import com.izouma.nineth.event.OrderNotifyEvent;
-import com.izouma.nineth.service.*;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -27,14 +26,9 @@ import java.util.stream.Collectors;
 @Slf4j
 @AllArgsConstructor
 public class HmPayController extends BaseController {
-    private final HMPayService       hmPayService;
     private final HmPayProperties    hmPayProperties;
     private final RocketMQTemplate   rocketMQTemplate;
-    private final OrderService       orderService;
-    private final MintOrderService   mintOrderService;
-    private final GiftOrderService   giftOrderService;
     private final GeneralProperties  generalProperties;
-    private final UserBalanceService userBalanceService;
 
     @GetMapping("/notify/{type}/{id}")
     public String orderNotify(@PathVariable String type, @PathVariable Long id, HttpServletRequest req) throws AlipayApiException {
@@ -60,13 +54,19 @@ public class HmPayController extends BaseController {
                             new OrderNotifyEvent(id, PayMethod.HMPAY, plat_trx_no, System.currentTimeMillis()));
                     break;
                 case "gift":
-                    giftOrderService.giftNotify(id, PayMethod.HMPAY, plat_trx_no);
+                    rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                            new OrderNotifyEvent(id, PayMethod.SANDPAY, plat_trx_no,
+                                    System.currentTimeMillis(), OrderNotifyEvent.TYPE_GIFT_ORDER));
                     break;
                 case "mintOrder":
-                    mintOrderService.mintNotify(id, PayMethod.HMPAY, plat_trx_no);
+                    rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                            new OrderNotifyEvent(id, PayMethod.SANDPAY, plat_trx_no,
+                                    System.currentTimeMillis(), OrderNotifyEvent.TYPE_MINT_ORDER));
                     break;
                 case "recharge":
-                    userBalanceService.recharge(id, PayMethod.HMPAY, plat_trx_no);
+                    rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                            new OrderNotifyEvent(id, PayMethod.SANDPAY, plat_trx_no,
+                                    System.currentTimeMillis(), OrderNotifyEvent.TYPE_RECHARGE));
                     break;
             }
         }

+ 11 - 12
src/main/java/com/izouma/nineth/web/PayEaseController.java

@@ -5,15 +5,11 @@ import com.alibaba.fastjson15.JSONObject;
 import com.izouma.nineth.config.GeneralProperties;
 import com.izouma.nineth.enums.PayMethod;
 import com.izouma.nineth.event.OrderNotifyEvent;
-import com.izouma.nineth.service.GiftOrderService;
-import com.izouma.nineth.service.MintOrderService;
-import com.izouma.nineth.service.UserBalanceService;
 import com.upay.sdk.CipherWrapper;
 import com.upay.sdk.onlinepay.executer.OnlinePayOrderExecuter;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.rocketmq.spring.core.RocketMQTemplate;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.bind.annotation.*;
 
 @RestController
@@ -21,11 +17,8 @@ import org.springframework.web.bind.annotation.*;
 @Slf4j
 @AllArgsConstructor
 public class PayEaseController {
-    private final GeneralProperties             generalProperties;
-    private final RocketMQTemplate              rocketMQTemplate;
-    private final GiftOrderService              giftOrderService;
-    private final MintOrderService              mintOrderService;
-    private final UserBalanceService            userBalanceService;
+    private final GeneralProperties generalProperties;
+    private final RocketMQTemplate  rocketMQTemplate;
 
     @PostMapping("/notify/{type}/{id}")
     public String notify(@PathVariable String type, @PathVariable Long id, @RequestHeader String encryptKey,
@@ -46,13 +39,19 @@ public class PayEaseController {
                             new OrderNotifyEvent(id, PayMethod.PAYEASE, serialNumber, System.currentTimeMillis()));
                     break;
                 case "gift":
-                    giftOrderService.giftNotify(id, PayMethod.PAYEASE, serialNumber);
+                    rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                            new OrderNotifyEvent(id, PayMethod.SANDPAY, serialNumber,
+                                    System.currentTimeMillis(), OrderNotifyEvent.TYPE_GIFT_ORDER));
                     break;
                 case "mintOrder":
-                    mintOrderService.mintNotify(id, PayMethod.PAYEASE, serialNumber);
+                    rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                            new OrderNotifyEvent(id, PayMethod.SANDPAY, serialNumber,
+                                    System.currentTimeMillis(), OrderNotifyEvent.TYPE_MINT_ORDER));
                     break;
                 case "recharge":
-                    userBalanceService.recharge(id, PayMethod.PAYEASE, serialNumber);
+                    rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                            new OrderNotifyEvent(id, PayMethod.SANDPAY, serialNumber,
+                                    System.currentTimeMillis(), OrderNotifyEvent.TYPE_RECHARGE));
                     break;
             }
         }

+ 16 - 19
src/main/java/com/izouma/nineth/web/SandPayController.java

@@ -6,21 +6,16 @@ import com.alibaba.fastjson.JSONObject;
 import com.izouma.nineth.config.GeneralProperties;
 import com.izouma.nineth.enums.PayMethod;
 import com.izouma.nineth.event.OrderNotifyEvent;
-import com.izouma.nineth.exception.BusinessException;
-import com.izouma.nineth.service.GiftOrderService;
-import com.izouma.nineth.service.MintOrderService;
-import com.izouma.nineth.service.SandPayService;
-import com.izouma.nineth.service.UserBalanceService;
-import com.izouma.nineth.utils.SnowflakeIdWorker;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.rocketmq.spring.core.RocketMQTemplate;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.math.BigDecimal;
 import java.nio.charset.StandardCharsets;
 
 @RestController
@@ -29,13 +24,8 @@ import java.nio.charset.StandardCharsets;
 @AllArgsConstructor
 public class SandPayController {
 
-    private SandPayService     sandPayService;
-    private SnowflakeIdWorker  snowflakeIdWorker;
-    private GeneralProperties  generalProperties;
-    private RocketMQTemplate   rocketMQTemplate;
-    private GiftOrderService   giftOrderService;
-    private MintOrderService   mintOrderService;
-    private UserBalanceService userBalanceService;
+    private GeneralProperties generalProperties;
+    private RocketMQTemplate  rocketMQTemplate;
 
     @PostMapping("/notify")
     public Object notifyOrder(HttpServletRequest req, HttpServletResponse resp) {
@@ -67,16 +57,23 @@ public class SandPayController {
                         switch (type) {
                             case "order":
                                 rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
-                                        new OrderNotifyEvent(id, PayMethod.SANDPAY, payOrderCode, System.currentTimeMillis()));
+                                        new OrderNotifyEvent(id, PayMethod.SANDPAY,
+                                                payOrderCode, System.currentTimeMillis()));
                                 break;
                             case "gift":
-                                giftOrderService.giftNotify(id, PayMethod.SANDPAY, payOrderCode);
+                                rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                                        new OrderNotifyEvent(id, PayMethod.SANDPAY, payOrderCode,
+                                                System.currentTimeMillis(), OrderNotifyEvent.TYPE_GIFT_ORDER));
                                 break;
                             case "mintOrder":
-                                mintOrderService.mintNotify(id, PayMethod.SANDPAY, payOrderCode);
+                                rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                                        new OrderNotifyEvent(id, PayMethod.SANDPAY, payOrderCode,
+                                                System.currentTimeMillis(), OrderNotifyEvent.TYPE_MINT_ORDER));
                                 break;
                             case "recharge":
-                                userBalanceService.recharge(id, PayMethod.SANDPAY, payOrderCode);
+                                rocketMQTemplate.syncSend(generalProperties.getOrderNotifyTopic(),
+                                        new OrderNotifyEvent(id, PayMethod.SANDPAY, payOrderCode,
+                                                System.currentTimeMillis(), OrderNotifyEvent.TYPE_RECHARGE));
                                 break;
                         }
                     }

+ 0 - 5
src/test/java/com/izouma/nineth/service/MintOrderServiceTest.java

@@ -49,11 +49,6 @@ class MintOrderServiceTest extends ApplicationTests {
         Thread.sleep(1000);
     }
 
-    @Test
-    void test() {
-        mintOrderService.batchCancel();
-    }
-
     @Test
     public void test1() {
         User user = userRepo.findByIdAndDelFalse(9972L).orElse(null);