src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
@@ -330,4 +330,17 @@ return Result.ok(saleDetail); } @Override public void cancelOrder(Long id) { OtcOrder otcOrder = this.baseMapper.selectById(id); if (otcOrder == null) { throw new GlobalException("订单不存在"); } if (!OtcOrder.STATUS_SUBMIT.equals(otcOrder.getStatus())) { throw new GlobalException("不能取消"); } this.baseMapper.updateOrderStatusByOrderNo(OtcOrder.STATUS_CANCEL, null, otcOrder.getOrderNo()); } }