当style为洛丽塔时无sketch和谷歌风控问题FIX

This commit is contained in:
litianxiang
2026-03-12 18:59:17 +08:00
parent 8bdb49d25c
commit aed338a6d7

View File

@@ -3997,6 +3997,9 @@ public class PythonService {
// throw new BusinessException("system.error"); // throw new BusinessException("system.error");
// } // }
//**********************end*********************************** //**********************end***********************************
if (category.split("_")[0].equals("male")&&style.toLowerCase().equals("lolita")){
style=null;
}
AuthPrincipalVo userHolder = UserContext.getUserHolder(); AuthPrincipalVo userHolder = UserContext.getUserHolder();
OkHttpClient client = new OkHttpClient().newBuilder() OkHttpClient client = new OkHttpClient().newBuilder()
@@ -4051,9 +4054,9 @@ public class PythonService {
String responseBody = response.body().string(); String responseBody = response.body().string();
List<String> imagePaths = JSON.parseArray(responseBody, String.class); List<String> imagePaths = JSON.parseArray(responseBody, String.class);
if (imagePaths == null || imagePaths.isEmpty()|| imagePaths.size() == 0) { if (imagePaths == null || imagePaths.isEmpty()) {
log.warn("Empty recommendation result for {}", category); log.warn("Empty recommendation result for {}", category);
return getSystemSketchByCategory(category,brandId,brandScale,null); return Collections.emptyList();
} }
log.info("Received {} recommended images", imagePaths.size()); log.info("Received {} recommended images", imagePaths.size());