BUGFIX: 上传元素删除;
This commit is contained in:
@@ -2617,9 +2617,11 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
|
||||
@Override
|
||||
public Boolean toProductImageElementDelete(Long id) {
|
||||
ToProductElement toProductElement = toProductElementMapper.selectById(id);
|
||||
toProductElement.setProjectId(null);
|
||||
toProductElementMapper.updateById(toProductElement);
|
||||
UpdateWrapper<ToProductElement> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper
|
||||
.set("project_id", null) // 显式设置 NULL
|
||||
.eq("id", id); // 指定条件
|
||||
toProductElementMapper.update(null, updateWrapper);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user