...
|
...
|
@@ -3,6 +3,7 @@ package com.yohoufo.product.controller; |
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -16,7 +17,6 @@ import com.yohoufo.common.ApiResponse; |
|
|
import com.yohoufo.common.annotation.IgnoreSession;
|
|
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
|
|
import com.yohoufo.common.cache.Cachable;
|
|
|
import com.yohoufo.common.cache.ControllerCacheAop;
|
|
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
|
|
import com.yohoufo.product.helper.SearchHelpService;
|
|
|
import com.yohoufo.product.request.ProductSearchReq;
|
...
|
...
|
@@ -38,8 +38,6 @@ public class ProductSearchController { |
|
|
private SearchHelpService searchHelpService;
|
|
|
@Autowired
|
|
|
private UfoServiceCaller ufoServiceCaller;
|
|
|
@Autowired
|
|
|
private ControllerCacheAop cacheAop;
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.search.list", desc="首页商品推荐")
|
|
|
@RequestMapping(params = "method=ufo.product.search.list")
|
...
|
...
|
@@ -156,6 +154,7 @@ public class ProductSearchController { |
|
|
@RequestMapping(params = "method=ufo.product.search.saleCalendar")
|
|
|
@IgnoreSession
|
|
|
public ApiResponse searchSaleCalendar(@RequestParam(value = "uid", required = false)Integer uid,
|
|
|
@RequestParam(value = "year_month", required = false)String yearMonth,
|
|
|
@RequestParam(value = "page", required = false)Integer page,
|
|
|
@RequestParam(value = "limit", required = false) Integer limit) {
|
|
|
if (page == null || page < 1) {
|
...
|
...
|
@@ -164,8 +163,11 @@ public class ProductSearchController { |
|
|
if (limit == null || limit < 1) {
|
|
|
limit = 10;
|
|
|
}
|
|
|
if (StringUtils.isBlank(yearMonth)) {
|
|
|
yearMonth = "";
|
|
|
}
|
|
|
LOG.info("in method=ufo.product.search.saleCalendar uid={}, page={}, limit={}", uid, page, limit);
|
|
|
JSONObject productJson = productSearchService.searchSaleCalendar(page, limit);
|
|
|
JSONObject productJson = productSearchService.searchSaleCalendar(yearMonth, page, limit);
|
|
|
productSearchService.processUserFavoriteProductList(productJson, uid);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.saleCalendar").data(productJson).build();
|
|
|
}
|
...
|
...
|
|