显式更新预约图片快照字段

This commit is contained in:
2026-07-23 11:30:46 +08:00
parent a8112d95a8
commit 3e7b40fe3c
3 changed files with 20 additions and 4 deletions
@@ -2,6 +2,7 @@ package com.xiaowang.jayucloud.core.modules.planning.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.xiaowang.jayucloud.core.modules.planning.dto.PlanningAppointmentCreateDTO;
import com.xiaowang.jayucloud.core.modules.planning.dto.PlanningAppointmentImageDTO;
import com.xiaowang.jayucloud.core.modules.planning.dto.PlanningAppointmentMoveDTO;
@@ -368,8 +369,11 @@ public class PlanningServiceImpl implements PlanningService {
}
OrderDO order = requireAccessibleOrder(currentUser, item.getOrderId());
requireEditableAppointment(order);
item.setAppointmentProductImageFileIds(normalizeUpdatedImageFileIds(dto.getImageFileIds()));
orderItemMapper.updateById(item);
String imageFileIds = normalizeUpdatedImageFileIds(dto.getImageFileIds());
item.setAppointmentProductImageFileIds(imageFileIds);
orderItemMapper.update(null, new UpdateWrapper<OrderItemDO>()
.eq("id", item.getId())
.set("appointment_product_image_file_ids", imageFileIds));
return getAppointment(currentUser, item.getId());
}