防止因为二创导致的数据存在taskId相同导致报错问题

This commit is contained in:
litianxiang
2025-10-15 14:47:04 +08:00
parent c9f9ef0ce2
commit 1c32aaa46c

View File

@@ -2685,9 +2685,19 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
}
}
// 处理父ID逻辑
processParentId(vo, dbItem != null ? dbItem :
poseTransformationMapper.selectOne(new QueryWrapper<PoseTransformation>().eq("unique_id", taskId)));
AuthPrincipalVo userHolder = UserContext.getUserHolder();
Long userId = userHolder.getId();
if (userId != null){
// 处理父ID逻辑
processParentId(vo, dbItem != null ? dbItem :
poseTransformationMapper.selectOne(new QueryWrapper<PoseTransformation>().eq("unique_id", taskId).eq("account_id", userId)));
}else {
// 处理父ID逻辑
processParentId(vo, dbItem != null ? dbItem :
poseTransformationMapper.selectList(new QueryWrapper<PoseTransformation>().eq("unique_id", taskId)).get(0));
}
return vo;
}