diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 4538c4d4..d94198d2 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -683,9 +683,6 @@ public class PythonService { // 其他所有情况,都回退到使用系统推荐 String categoryParam = elementVO.getModelSex().toLowerCase() + "_" + styleCategory.toLowerCase(); List recommentdUrlList = getSystemSketchByCategory(categoryParam, elementVO.getBrandId(), elementVO.getBrandScale(), elementVO.getStyle()); - if (recommentdUrlList.size() == 0) { - recommentdUrlList = getSystemSketchByCategory(categoryParam, elementVO.getBrandId(), elementVO.getBrandScale(), null); - } if (CollectionUtils.isEmpty(recommentdUrlList)) { throw new BusinessException("failed.to.obtain.system.sketch.recommendation"); } @@ -4056,7 +4053,7 @@ public class PythonService { if (imagePaths == null || imagePaths.isEmpty()) { log.warn("Empty recommendation result for {}", category); - return Collections.emptyList(); + return getSystemSketchByCategory(category,brandId,brandScale,null); } log.info("Received {} recommended images", imagePaths.size());