BUGFIX:synthesis_url返回为空异常处理;

This commit is contained in:
shahaibo
2023-10-11 15:30:44 +08:00
parent 278ef4e9c8
commit e3309e9841

View File

@@ -455,7 +455,12 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
designPythonOutfit.setUserId(userInfo.getId());
designPythonOutfit.setDesignId(designId);
designPythonOutfit.setCollectionId(collectionId);
designPythonOutfit.setDesignUrl(outfit.getString("synthesis_url"));
String synthesisUrl = outfit.getString("synthesis_url");
if (!StringUtils.isEmpty(synthesisUrl)) {
designPythonOutfit.setDesignUrl(synthesisUrl);
}else {
throw new BusinessException("design python response synthesis_url is null");
}
designPythonOutfitService.save(designPythonOutfit);
JSONArray layers = outfit.getJSONArray("layers");
List<TDesignPythonOutfitDetail> list = new ArrayList<>();