Authored by hugufei

添加召回配置日志

... ... @@ -11,7 +11,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
... ... @@ -19,7 +18,8 @@ import java.util.Set;
@Service
public class RecallConfigService {
private static final Logger RECALL_LOGGE = LoggerFactory.getLogger("RECALL");
private static final Logger RECALL_LOGGER = LoggerFactory.getLogger("RECALL");
@Autowired
private RecallConfigProductService recallConfigProductService;
@Autowired
... ... @@ -44,7 +44,7 @@ public class RecallConfigService {
String configKey = getStrategyConfigKey(strategyEnum);
int size = recallConfigCommonService.queryConfigSize(pageId, configKey, 0);
size = this.legallValue(size, 0, 100);
RECALL_LOGGE.info("queryStrategyConfigSize,pageId is [{}],strategyEnum is [{}],size is[{}]", pageId, strategyEnum.name(), size);
RECALL_LOGGER.info("queryStrategyConfigSize,pageId is [{}],strategyEnum is [{}],size is[{}]", pageId, strategyEnum.name(), size);
return size;
}
... ... @@ -59,7 +59,7 @@ public class RecallConfigService {
String configKey = getStrategyConfigKey(strategyEnum);
int interval = recallConfigCommonService.queryConfigInterval(pageId, configKey, 10);
interval = this.legallValue(interval, 2, 40);
RECALL_LOGGE.info("queryStrategyConfigInterval,pageId is [{}],strategyEnum is [{}],interval is[{}]", pageId, strategyEnum.name(), interval);
RECALL_LOGGER.info("queryStrategyConfigInterval,pageId is [{}],strategyEnum is [{}],interval is[{}]", pageId, strategyEnum.name(), interval);
return interval;
}
... ... @@ -92,7 +92,7 @@ public class RecallConfigService {
String sortBrandConfigKey = this.getSortBrandConfigKey(sortBrandType);
int size = recallConfigCommonService.queryConfigSize(pageId, sortBrandConfigKey, defaultSize);
size = this.legallValue(size, 0, 30);
RECALL_LOGGE.info("querySortBrandConfigCount,pageId is [{}],sortBrandType is [{}],size is[{}]", pageId, sortBrandType.name(), size);
RECALL_LOGGER.info("querySortBrandConfigCount,pageId is [{}],sortBrandType is [{}],size is[{}]", pageId, sortBrandType.name(), size);
return size;
}
... ... @@ -107,7 +107,7 @@ public class RecallConfigService {
String sortBrandConfigKey = this.getSortBrandConfigKey(sortBrandType);
RecallSknCount recallSknCount = recallConfigProductService.queryRecallSknCount(pageId, sortBrandConfigKey, sortBrand);
if (recallSknCount == null) {
RECALL_LOGGE.info("queryRecallSknCount,pageId is [{}],sortBrandType is [{}],RecallSknCount is[{}]", pageId, sortBrandType.name(), "null");
RECALL_LOGGER.info("queryRecallSknCount,pageId is [{}],sortBrandType is [{}],RecallSknCount is[{}]", pageId, sortBrandType.name(), "null");
return null;
}
recallSknCount.setNewShelve(this.legallValue(recallSknCount.getNewShelve(), 0, 20));
... ... @@ -116,7 +116,7 @@ public class RecallConfigService {
recallSknCount.setHeatValue(this.legallValue(recallSknCount.getHeatValue(), 0, 20));
recallSknCount.setReducePrice(this.legallValue(recallSknCount.getReducePrice(), 0, 20));
recallSknCount.setRandom(this.legallValue(recallSknCount.getRandom(), 0, 20));
RECALL_LOGGE.info("queryRecallSknCount,pageId is [{}],sortBrandType is [{}],RecallSknCount is[{}]", pageId, sortBrandType.name(), JSON.toJSONString(recallSknCount));
RECALL_LOGGER.info("queryRecallSknCount,pageId is [{}],sortBrandType is [{}],RecallSknCount is[{}]", pageId, sortBrandType.name(), JSON.toJSONString(recallSknCount));
return recallSknCount;
}
... ...