|
@@ -358,12 +358,7 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected void filterRequestAdList(RankRecommendRequestParam request, ScoreParam scoreParam) {
|
|
protected void filterRequestAdList(RankRecommendRequestParam request, ScoreParam scoreParam) {
|
|
|
- // adProfessionName 覆盖 profession(上游逐步废弃 profession,统一用 adProfessionName)
|
|
|
|
|
- for (AdPlatformCreativeDTO dto : request.getAdIdList()) {
|
|
|
|
|
- if (StringUtils.isNotBlank(dto.getAdProfessionName())) {
|
|
|
|
|
- dto.setProfession(dto.getAdProfessionName());
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ normalizeAdProfessionName(request);
|
|
|
Map<String, String> userLayer = this.getUserLayer(request.getMid());
|
|
Map<String, String> userLayer = this.getUserLayer(request.getMid());
|
|
|
String layer;
|
|
String layer;
|
|
|
String clazz;
|
|
String clazz;
|
|
@@ -437,6 +432,18 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ protected void normalizeAdProfessionName(RankRecommendRequestParam request) {
|
|
|
|
|
+ if (request == null || CollectionUtils.isEmpty(request.getAdIdList())) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ // adProfessionName 覆盖 profession(上游逐步废弃 profession,统一用 adProfessionName)
|
|
|
|
|
+ for (AdPlatformCreativeDTO dto : request.getAdIdList()) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(dto.getAdProfessionName())) {
|
|
|
|
|
+ dto.setProfession(dto.getAdProfessionName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
protected boolean getIsGuaranteedFlow(ScoreParam scoreParam) {
|
|
protected boolean getIsGuaranteedFlow(ScoreParam scoreParam) {
|
|
|
// 817实验不要保量
|
|
// 817实验不要保量
|
|
@@ -927,15 +934,7 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
adRankItem.setAdSkuId(dto.getAdSkuId());
|
|
adRankItem.setAdSkuId(dto.getAdSkuId());
|
|
|
adRankItem.setAdCategoryName(dto.getAdCategoryName());
|
|
adRankItem.setAdCategoryName(dto.getAdCategoryName());
|
|
|
adRankItem.setAdCategoryId(dto.getAdCategoryId() != null ? String.valueOf(dto.getAdCategoryId()) : null);
|
|
adRankItem.setAdCategoryId(dto.getAdCategoryId() != null ? String.valueOf(dto.getAdCategoryId()) : null);
|
|
|
- if (StringUtils.isNotBlank(dto.getAdSkuCode())) {
|
|
|
|
|
- try {
|
|
|
|
|
- Long adSkuCode = Long.valueOf(dto.getAdSkuCode());
|
|
|
|
|
- if (dto.getAdSkuCode().equals(String.valueOf(adSkuCode))) {
|
|
|
|
|
- adRankItem.setAdSkuCode(adSkuCode);
|
|
|
|
|
- }
|
|
|
|
|
- } catch (NumberFormatException ignored) {
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ adRankItem.setAdSkuCode(dto.getAdSkuCode());
|
|
|
adRankItem.setAdSkuName(dto.getAdSkuName());
|
|
adRankItem.setAdSkuName(dto.getAdSkuName());
|
|
|
adRankItem.getExt().put("categoryName", StringUtils.defaultString(dto.getCategoryName()));
|
|
adRankItem.getExt().put("categoryName", StringUtils.defaultString(dto.getCategoryName()));
|
|
|
adRankItem.getExt().put("adCategoryName", StringUtils.defaultString(dto.getAdCategoryName()));
|
|
adRankItem.getExt().put("adCategoryName", StringUtils.defaultString(dto.getAdCategoryName()));
|
|
@@ -1214,4 +1213,4 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|