BUGFIX:获取模特信息

This commit is contained in:
xupei
2023-10-04 19:14:42 +08:00
parent a5a70884b8
commit abecb54b1d
4 changed files with 13 additions and 2 deletions

View File

@@ -30,4 +30,6 @@ public interface LibraryModelPointService extends IService<LibraryModelPoint> {
*/
String modelsDot( ModelsDotDTO modelsDotDTO );
LibraryModelPoint getByRelationId(Long relationId,String modelType);
}

View File

@@ -404,7 +404,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
high = libFile.getHigh();
width = libFile.getWidth();
}
LibraryModelPoint modelPoint = libraryModelPointService.getById(design.getTemplateId());
LibraryModelPoint modelPoint = libraryModelPointService.getByRelationId(design.getTemplateId(),design.getModelType());
Assert.notNull(modelPoint,"The model has not been tagged");
designLibraryModelPointVO = collectionElementService.calculateTemplatePoint(modelPoint,high,width,modelUrl);
@@ -413,6 +413,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
// 组装入参
DesignPythonObjects objects =pythonService.covertDesignSingleParam(
designSingleIncludeLayersDTO,design.getSingleOverall(),design.getSwitchCategory(),designLibraryModelPointVO);
// design
JSONObject jsonObject = pythonService.designNew(objects);
// preview -> 不存数据库 submit -> 存数据库
List<TDesignPythonOutfitDetail> tDesignPythonOutfitDetails;

View File

@@ -978,7 +978,6 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
}else {
designSinglePrintDTO.setIfSingle(Boolean.TRUE);
designSinglePrint.setLocation(JSONArray.parseArray(detailPrint.getPosition(),Double.class));
designSinglePrint.setScale(detailPrint.getScale());
designSinglePrint.setAngle(detailPrint.getAngle());
designSinglePrint.setPriority(detailPrint.getPriority());
}

View File

@@ -114,4 +114,13 @@ public class LibraryModelPointServiceImpl extends ServiceImpl<LibraryModelPointM
return objects.getObjects().get(0).getBasic().getSave_name();
}
@Override
public LibraryModelPoint getByRelationId(Long relationId,String modelType){
QueryWrapper<LibraryModelPoint> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("relation_id", relationId)
.eq("model_type",modelType);
return baseMapper.selectOne(queryWrapper);
}
}