|
@@ -140,23 +140,28 @@ public class ContentScreenJob {
|
|
|
if (Objects.isNull(jsonObject) || jsonObject.isEmpty() || Objects.isNull(strategyConfigs) || strategyConfigs.isEmpty()) {
|
|
if (Objects.isNull(jsonObject) || jsonObject.isEmpty() || Objects.isNull(strategyConfigs) || strategyConfigs.isEmpty()) {
|
|
|
return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
}
|
|
}
|
|
|
- //全部满足
|
|
|
|
|
- for (TitleAnalyseConfigDTO.StrategyConfig strategyConfig : strategyConfigs) {
|
|
|
|
|
- String strategyName = strategyConfig.getStrategyName();
|
|
|
|
|
- Double minScore = strategyConfig.getMinScore();
|
|
|
|
|
- if (Objects.isNull(strategyName) || strategyName.isEmpty()) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- JSONObject resultJson = jsonObject.getJSONObject(strategyName);
|
|
|
|
|
- if (Objects.isNull(resultJson) || resultJson.isEmpty()) {
|
|
|
|
|
- return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
- }
|
|
|
|
|
- Double score = resultJson.getDouble("用户画像匹配分(Persona_Score)");
|
|
|
|
|
- if (Objects.isNull(score) || score < minScore) {
|
|
|
|
|
- return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ //全部满足
|
|
|
|
|
+ for (TitleAnalyseConfigDTO.StrategyConfig strategyConfig : strategyConfigs) {
|
|
|
|
|
+ String strategyName = strategyConfig.getStrategyName();
|
|
|
|
|
+ Double minScore = strategyConfig.getMinScore();
|
|
|
|
|
+ if (Objects.isNull(strategyName) || strategyName.isEmpty()) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ JSONObject resultJson = jsonObject.getJSONObject(strategyName);
|
|
|
|
|
+ if (Objects.isNull(resultJson) || resultJson.isEmpty()) {
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
+ }
|
|
|
|
|
+ Double score = resultJson.getDouble("用户画像匹配分(Persona_Score)");
|
|
|
|
|
+ if (Objects.isNull(score) || score < minScore) {
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.PASSED.getCode();
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("judgeRoughScreenStatus error", e);
|
|
|
}
|
|
}
|
|
|
- return SpiderContentScreenStatusEnum.PASSED.getCode();
|
|
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private List<SpiderContent> getRoughScreenSpiderContent() {
|
|
private List<SpiderContent> getRoughScreenSpiderContent() {
|
|
@@ -240,26 +245,31 @@ public class ContentScreenJob {
|
|
|
if (Objects.isNull(jsonObject) || jsonObject.isEmpty() || Objects.isNull(strategyConfigs) || strategyConfigs.isEmpty()) {
|
|
if (Objects.isNull(jsonObject) || jsonObject.isEmpty() || Objects.isNull(strategyConfigs) || strategyConfigs.isEmpty()) {
|
|
|
return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
}
|
|
}
|
|
|
- for (ArticleAnalyseConfigDTO.StrategyConfig strategyConfig : strategyConfigs) {
|
|
|
|
|
- String strategyName = strategyConfig.getStrategyName();
|
|
|
|
|
- Double minScore = strategyConfig.getMinScore();
|
|
|
|
|
- if (Objects.isNull(strategyName) || strategyName.isEmpty()) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- JSONObject resultJson = jsonObject.getJSONObject(strategyName);
|
|
|
|
|
- if (Objects.isNull(resultJson) || resultJson.isEmpty()) {
|
|
|
|
|
- return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
- }
|
|
|
|
|
- JSONObject finalJson = resultJson.getJSONObject("综合判定");
|
|
|
|
|
- if (Objects.isNull(finalJson) || finalJson.isEmpty()) {
|
|
|
|
|
- return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
- }
|
|
|
|
|
- Double score = finalJson.getDouble("最终综合得分");
|
|
|
|
|
- if (Objects.isNull(score) || score < minScore) {
|
|
|
|
|
- return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ for (ArticleAnalyseConfigDTO.StrategyConfig strategyConfig : strategyConfigs) {
|
|
|
|
|
+ String strategyName = strategyConfig.getStrategyName();
|
|
|
|
|
+ Double minScore = strategyConfig.getMinScore();
|
|
|
|
|
+ if (Objects.isNull(strategyName) || strategyName.isEmpty()) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ JSONObject resultJson = jsonObject.getJSONObject(strategyName);
|
|
|
|
|
+ if (Objects.isNull(resultJson) || resultJson.isEmpty()) {
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
+ }
|
|
|
|
|
+ JSONObject finalJson = resultJson.getJSONObject("综合判定");
|
|
|
|
|
+ if (Objects.isNull(finalJson) || finalJson.isEmpty()) {
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
+ }
|
|
|
|
|
+ Double score = finalJson.getDouble("最终综合得分");
|
|
|
|
|
+ if (Objects.isNull(score) || score < minScore) {
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.PASSED.getCode();
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("judgePrecisionScreenStatus error", e);
|
|
|
}
|
|
}
|
|
|
- return SpiderContentScreenStatusEnum.PASSED.getCode();
|
|
|
|
|
|
|
+ return SpiderContentScreenStatusEnum.ABANDONED.getCode();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|