印花坐标修改
This commit is contained in:
@@ -316,7 +316,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
designItemDetail.setPrintJson(JSON.toJSONString(printObject));
|
||||
designItemDetails.add(designItemDetail);
|
||||
});
|
||||
// todo businessId
|
||||
// todo businessId来源
|
||||
designItemDetailService.saveBatch(designItemDetails);
|
||||
|
||||
// 覆盖designPythonOutfit表中的模特全身图
|
||||
@@ -376,6 +376,8 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
Assert.notNull(designItem,"design item does not exists!");
|
||||
Design design = designService.getById(designItem.getDesignId());
|
||||
Assert.notNull(design,"design does not exists!");
|
||||
TDesignPythonOutfit designPythonOutfit = designPythonOutfitService.getByDesignItemId(designSingleIncludeLayersDTO.getDesignItemId());
|
||||
Assert.notNull(designItem,"design item detail layers does not exists!");
|
||||
DesignLibraryModelPointVO designLibraryModelPointVO = null;
|
||||
// 设置模特
|
||||
if (Objects.nonNull(design.getTemplateId())){
|
||||
@@ -386,13 +388,16 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
designLibraryModelPointVO = collectionElementService.calculateTemplatePoint(modelPoint,library.getHigh(),library.getWidth(),library.getUrl());
|
||||
}
|
||||
|
||||
// 组装入参
|
||||
DesignPythonObjects objects =pythonService.covertDesignSingleParam(
|
||||
designSingleIncludeLayersDTO,design.getSingleOverall(),design.getSwitchCategory(),designLibraryModelPointVO);
|
||||
JSONObject jsonObject = pythonService.designNew(objects);
|
||||
// preview -> 不存数据库 submit -> 存数据库
|
||||
List<TDesignPythonOutfitDetail> tDesignPythonOutfitDetails;
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
// todo 空指针
|
||||
if (data == null) {
|
||||
throw new BusinessException("python response data is null");
|
||||
}
|
||||
JSONObject outfit = data.getJSONObject("0");
|
||||
if (!designSingleIncludeLayersDTO.getIsPreview()){
|
||||
// 更新及保存图层信息
|
||||
@@ -409,8 +414,6 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
detailsVO.add(designPythonOutfitDetailService.convertToDesignPythonOutfitVO(detail));
|
||||
});
|
||||
|
||||
TDesignPythonOutfit designPythonOutfit = designPythonOutfitService.getByDesignItemId(designSingleIncludeLayersDTO.getDesignItemId());
|
||||
// todo designPythonOutFit 空指针
|
||||
return assembleDesignSingleResponse(designItem.getId(),minioUtil.splitThenGetPreviewUrl(designPythonOutfit.getDesignUrl(),480),
|
||||
designSingleIncludeLayersDTO.getDesignSingleItemDTOList(),detailsVO);
|
||||
}
|
||||
|
||||
@@ -808,7 +808,6 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
List<DesignItemDetail> filterDetail = designItemDetails.stream()
|
||||
.filter(f -> OUTWEAR_DRESS_BLOUSE.contains(f.getType()) || SKIRT_TROUSERS.contains(f.getType()))
|
||||
.collect(Collectors.toList());
|
||||
// todo 填充图层需要筛选已经被删除的图层
|
||||
response.setClothes(CopyUtil.copyList(filterDetail,DesignItemClothesDetailVO.class,(o,d)->{
|
||||
d.setId(o.getBusinessId());
|
||||
d.setLevel1Type(converTypeToLevel1(o.getType()));
|
||||
|
||||
Reference in New Issue
Block a user