|
|
@@ -1049,13 +1049,17 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
|
|
|
// h5 权重
|
|
|
protected double getH5SuppressWeight(AdRankItem item) {
|
|
|
+ if (org.springframework.util.CollectionUtils.isEmpty(h5ScoreSuppress) || Objects.isNull(item)) {
|
|
|
+ return 1.0;
|
|
|
+ }
|
|
|
try {
|
|
|
- if (null != h5ScoreSuppress && null != item) {
|
|
|
- Integer landingPageType = item.getLandingPageType();
|
|
|
- String profession = item.getProfession();
|
|
|
- if (null != landingPageType && landingPageType.equals(2) && h5ScoreSuppress.containsKey(profession)) {
|
|
|
- return h5ScoreSuppress.get(profession);
|
|
|
- }
|
|
|
+ Integer landingPageType = item.getLandingPageType();
|
|
|
+ String profession = item.getProfession();
|
|
|
+ if (StringUtils.isBlank(profession) || Objects.isNull(landingPageType)) {
|
|
|
+ return 1.0;
|
|
|
+ }
|
|
|
+ if (Objects.equals(2, landingPageType) && h5ScoreSuppress.containsKey(profession)) {
|
|
|
+ return h5ScoreSuppress.get(profession);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("获取h5权重失败", e);
|