|
|
package com.yoho.search.service.scene;
|
|
|
|
|
|
import com.yoho.search.base.utils.SearchPageIdDefine;
|
|
|
import com.yoho.search.common.utils.SearchApiResultUtils;
|
|
|
import com.yoho.search.models.SearchApiResult;
|
|
|
import com.yoho.search.service.base.SearchRequestParams;
|
|
|
import com.yoho.search.service.scene.common.AbstractSceneService;
|
|
|
import com.yoho.search.service.scene.common.CommonSceneProductListService;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* Created by wangnan on 2017/11/21.
|
|
|
*/
|
|
|
@Service
|
|
|
public class FreeShippingOrderSceneService extends AbstractSceneService {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
@Autowired
|
|
|
private CommonSceneProductListService sceneProductListService;
|
|
|
|
|
|
@Override
|
|
|
public void addParamsToParamMap(Map<String, String> paramMap) {
|
|
|
super.addDefaultParamsToParamMap(paramMap);
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITED, "N");// 不支持限定
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL, "N");// 不支持秒杀
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISADVANCE, "N");// 不支持预售
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_BUNDLETYPE, "0");// 不支持套餐
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITEDBUY, "N");// 不支持限购
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE, "N");// 不支持定金预售
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE, "N");// 不支持定金促销
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public String pageId() {
|
|
|
return SearchPageIdDefine.PAGE_ID_DEFAULT;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SearchApiResult productList(Map<String, String> paramMap) {
|
|
|
try {
|
|
|
// 1、添加默认参数
|
|
|
this.addParamsToParamMap(paramMap);
|
|
|
// 2、返回商品列表
|
|
|
return sceneProductListService.productList(paramMap);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("[func=FreeShippingOrderSceneProductList][params=" + paramMap + "]", e);
|
|
|
return SearchApiResultUtils.errorSearchApiResult("FreeShippingOrderSceneProductList", paramMap, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SearchApiResult aggregations(Map<String, String> paramMap) {
|
|
|
return null;
|
|
|
}
|
|
|
} |
...
|
...
|
|