修改我的模型库数据连表逻辑

模型广场新增空版本数据过滤
master
Diyu0904 2025-03-13 16:36:09 +08:00
parent c34fe50549
commit eaf4a778dd
2 changed files with 8 additions and 2 deletions

View File

@ -118,6 +118,12 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
ModelVersion modelVersion = modelVersionMapper.selectByProductId(responseModelProduct.getId());
if (modelVersion == null){
//跳出循环
continue;
}
if (userIdMax == 0){
//收藏为空
modelVersion.setIsCollect(0);

View File

@ -17,7 +17,7 @@
</select>
<select id="selectCollectWorkFlow" resultType="com.mcwl.resource.domain.response.ResponseCollect">
SELECT w.cover_path as file_path,v.file_name,w.workflow_name as product_name,u.nick_name,v.file_size,c.create_time
SELECT c.product_id as id,w.cover_path as file_path,v.file_name,w.workflow_name as product_name,u.nick_name,v.file_size,c.create_time
FROM collect as c
LEFT JOIN work_flow_version as v on c.product_id = v.id
LEFT JOIN work_flow as w on v.work_flow_id = w.id
@ -26,7 +26,7 @@
</select>
<select id="selectCollectModel" resultType="com.mcwl.resource.domain.response.ResponseCollect">
SELECT m.surface_url as file_path,v.file_name,m.model_name as product_name,u.nick_name,v.file_size,c.create_time,v.model_version_type as type
SELECT c.product_id as id,m.surface_url as file_path,v.file_name,m.model_name as product_name,u.nick_name,v.file_size,c.create_time,v.model_version_type as type
FROM collect as c
LEFT JOIN model_version as v on c.product_id = v.id
LEFT JOIN model as m on v.model_id = m.id