This commit is contained in:
Lemon
2023-07-20 16:04:03 +08:00
6 changed files with 24 additions and 29 deletions

View File

@@ -256,6 +256,10 @@ public class OrderService {
if (orderInfo == null) {
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_NULL_ERROR);
}
// 判断订单状态是不是已经结算了
if (StringUtils.equals(orderInfo.getOrderStatus(), OrderStatusEnum.ORDER_COMPLETE.getValue())) {
throw new BusinessException(ReturnCodeEnum.CODE_ORDER_COMPLETE_ERROR);
}
// 校验订单中的会员与操作会员是否一致
if (!StringUtils.equals(orderInfo.getMemberId(), dto.getMemberId())) {
throw new BusinessException(ReturnCodeEnum.CODE_ORDER_MEMBER_NOT_MATCH_ERROR);