当style为洛丽塔时无sketch和谷歌风控问题FIX
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user