this is 3.29 update

This commit is contained in:
chen-xin-zhi 2025-03-29 10:29:25 +08:00
parent f3c39590ef
commit 4259afc4e8

View File

@ -103,7 +103,14 @@ public class AppointmentDateController {
// 删除服务类商品待处理记录
QueryWrapper<PendingServiceGood> goodQueryWrapper = new QueryWrapper<>();
goodQueryWrapper.eq("appointmentDateId", id);
boolean result = pendingServiceGoodService.remove(goodQueryWrapper);
List<PendingServiceGood> pendingServiceGoodList = pendingServiceGoodService.list(goodQueryWrapper);
List<PendingServiceOrder> pendingServiceOrderList = pendingServiceOrderService.list();
Map<Long, Integer> map = new HashMap<>();
for (PendingServiceOrder pendingServiceOrder : pendingServiceOrderList) {
map.put(pendingServiceOrder.getPendingId(), 1);
}
pendingServiceGoodList = pendingServiceGoodList.stream().filter(pendingServiceGood -> map.get(pendingServiceGood.getId()) == null).toList();
boolean result = pendingServiceGoodService.removeBatchByIds(pendingServiceGoodList);
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR, "服务类商品待处理记录删除失败");
return ResultUtils.success(true);