订单取消 返回状态码

This commit is contained in:
wangw 2025-04-15 09:26:39 +08:00
parent 9e44696ce7
commit 0f0527a4d7
1 changed files with 2 additions and 2 deletions

View File

@ -1027,10 +1027,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
public Boolean cancelledPlaceOrder(Long shopId, Long orderId, Integer placeNum) {
OrderInfo orderInfo = getById(orderId);
if (orderInfo == null) {
throw new ApiNotPrintException("订单不存在");
throw new OrderCancelException("订单不存在");
}
if (!OrderStatusEnums.UNPAID.getCode().equals(orderInfo.getStatus())) {
throw new ApiNotPrintException("订单不可取消");
throw new OrderCancelException("订单不可取消");
}
if (orderInfo.getPlaceNum().equals(1)) {
updateChain()