显式更新预约图片快照字段
This commit is contained in:
+6
-2
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user