BUGFIX: 上传元素删除;

This commit is contained in:
shahaibo
2025-06-13 14:07:38 +08:00
parent 942b5eb19b
commit b6c43e534b

View File

@@ -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;
}
}