TASK:getDetail添加返回字段priority

This commit is contained in:
2023-12-13 14:20:13 +08:00
parent 483eea66b9
commit 4512fb3268
2 changed files with 7 additions and 3 deletions

View File

@@ -42,6 +42,9 @@ public class DesignItemClothesDetailVO {
@ApiModelProperty("对应图层信息") @ApiModelProperty("对应图层信息")
private List<DesignPythonOutfitVO> layersObject; private List<DesignPythonOutfitVO> layersObject;
@ApiModelProperty("衣服所在图层")
private Integer priority;
public DesignItemClothesDetailVO() { public DesignItemClothesDetailVO() {
} }

View File

@@ -1140,9 +1140,10 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
designItemDetailVO.setDesignItemUrl(minioUtil.getPresignedUrl(designPythonOutfit.getDesignUrl(), 24 * 60)); designItemDetailVO.setDesignItemUrl(minioUtil.getPresignedUrl(designPythonOutfit.getDesignUrl(), 24 * 60));
// 2.1 填充clothes // 2.1 填充clothes
designItemDetailVO.getClothes().forEach(c -> { designItemDetailVO.getClothes().forEach(c -> {
String type = c.getType().toLowerCase(); // String type = c.getType().toLowerCase();
List<DesignPythonOutfitVO> outfitVOS = detailsVO.stream().filter(detail -> detail.getImageCategory().equals(type + "_back") || // List<DesignPythonOutfitVO> outfitVOS = detailsVO.stream().filter((detail -> detail.getImageCategory().equals(type + "_back") ||
detail.getImageCategory().equals(type + "_front")).collect(Collectors.toList()); // detail.getImageCategory().equals(type + "_front"))).collect(Collectors.toList());
List<DesignPythonOutfitVO> outfitVOS = detailsVO.stream().filter(detail -> detail.getPriority().equals(c.getPriority())).collect(Collectors.toList());
c.setLayersObject(outfitVOS); c.setLayersObject(outfitVOS);
}); });