This commit is contained in:
cjw 2024-10-15 15:47:17 +08:00
parent b5caf5fb15
commit 81bc8da7b9
1 changed files with 10 additions and 5 deletions

View File

@ -111,7 +111,7 @@ public class ReservationRefundServiceImpl implements IReservationRefundService {
@Override
public Boolean updateByBo(ReservationRefundBo bo) {
ReservationRefund update = MapstructUtils.convert(bo, ReservationRefund.class);
validEntityBeforeSave(update);
//validEntityBeforeSave(update);
return baseMapper.updateById(update) > 0;
}
@ -133,6 +133,11 @@ public class ReservationRefundServiceImpl implements IReservationRefundService {
if (orderStatus != 1) {
throw new ServiceException("订单数据异常,请确认后重试");
}
boolean exists = baseMapper.exists(new LambdaQueryWrapper<ReservationRefund>()
.eq(ReservationRefund::getOrderId, orderId));
if (exists) {
throw new ServiceException("此订单已提交退款申请,请勿重复提交");
}
}
}