TASK:模块化;
This commit is contained in:
@@ -1,13 +1,14 @@
|
|||||||
package com.ai.da.model.vo;
|
package com.ai.da.model.vo;
|
||||||
|
|
||||||
import com.ai.da.common.response.PageBaseResponse;
|
import com.ai.da.common.response.PageBaseResponse;
|
||||||
|
import com.ai.da.mapper.primary.entity.TDesignPythonOutfit;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CloudTaskResultVO {
|
public class CloudTaskResultVO {
|
||||||
private PageBaseResponse<DesignCollectionItemVO> design;
|
private List<DesignCollectionItemVO> design;
|
||||||
private List<MagicToolResultVO> toProductImage;
|
private List<MagicToolResultVO> toProductImage;
|
||||||
private List<MagicToolResultVO> relight;
|
private List<MagicToolResultVO> relight;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2501,25 +2501,34 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
if (null != collectionId) {
|
if (null != collectionId) {
|
||||||
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(TDesignPythonOutfit::getCollectionId, collectionId);
|
qw.lambda().eq(TDesignPythonOutfit::getCollectionId, collectionId);
|
||||||
Page<TDesignPythonOutfit> page = designPythonOutfitMapper.selectPage(new Page<>(query.getPage(), query.getSize()), qw);
|
List<TDesignPythonOutfit> list = designPythonOutfitMapper.selectList(qw);
|
||||||
IPage<DesignCollectionItemVO> convert = page.convert((Function<TDesignPythonOutfit, DesignCollectionItemVO>) outfit -> {
|
List<DesignCollectionItemVO> voList = new ArrayList<>();
|
||||||
if (outfit != null) {
|
for (TDesignPythonOutfit tDesignPythonOutfit : list) {
|
||||||
DesignCollectionItemVO vo = new DesignCollectionItemVO();
|
DesignCollectionItemVO vo = new DesignCollectionItemVO();
|
||||||
vo.setDesignOutfitId(outfit.getId());
|
vo.setDesignOutfitId(tDesignPythonOutfit.getId());
|
||||||
vo.setDesignOutfitUrl(minioUtil.getPreSignedUrl(outfit.getDesignUrl(), 24 * 60));
|
vo.setDesignOutfitUrl(minioUtil.getPreSignedUrl(tDesignPythonOutfit.getDesignUrl(), 24 * 60));
|
||||||
vo.setDesignItemId(outfit.getDesignItemId());
|
vo.setDesignItemId(tDesignPythonOutfit.getDesignItemId());
|
||||||
return vo;
|
voList.add(vo);
|
||||||
}
|
}
|
||||||
return null;
|
result.setDesign(voList);
|
||||||
});
|
// IPage<DesignCollectionItemVO> convert = page.convert((Function<TDesignPythonOutfit, DesignCollectionItemVO>) outfit -> {
|
||||||
result.setDesign(PageBaseResponse.success(convert));
|
// if (outfit != null) {
|
||||||
|
// DesignCollectionItemVO vo = new DesignCollectionItemVO();
|
||||||
|
// vo.setDesignOutfitId(outfit.getId());
|
||||||
|
// vo.setDesignOutfitUrl(minioUtil.getPreSignedUrl(outfit.getDesignUrl(), 24 * 60));
|
||||||
|
// vo.setDesignItemId(outfit.getDesignItemId());
|
||||||
|
// return vo;
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// });
|
||||||
|
// result.setDesign(PageBaseResponse.success(convert));
|
||||||
return result;
|
return result;
|
||||||
}else {
|
}else {
|
||||||
result.setDesign(PageBaseResponse.success(new Page<>()));
|
result.setDesign(new ArrayList<>());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.setDesign(PageBaseResponse.success(new Page<>()));
|
result.setDesign(new ArrayList<>());
|
||||||
return result;
|
return result;
|
||||||
} else if (query.getBuildType().equals(BuildType.TO_PRODUCT_IMAGE.getValue())) {
|
} else if (query.getBuildType().equals(BuildType.TO_PRODUCT_IMAGE.getValue())) {
|
||||||
List<MagicToolResultVO> results = new ArrayList<>();
|
List<MagicToolResultVO> results = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user