...
|
...
|
@@ -179,6 +179,36 @@ public class ProductSearchController { |
|
|
return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.saleCalendar").data(timeJson).build();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.search.newSaleCalendar", desc="销售日历列表")
|
|
|
@RequestMapping(params = "method=ufo.product.search.newSaleCalendar")
|
|
|
@IgnoreSession
|
|
|
public ApiResponse searchNewSaleCalendar(@RequestParam(value = "uid", required = false)Integer uid,
|
|
|
@RequestParam(value = "start_time", required = false)String startTime,
|
|
|
@RequestParam(value = "end_time", required = false)String endTime) {
|
|
|
if (StringUtils.isBlank(startTime) || StringUtils.isBlank(endTime)) {
|
|
|
return new ApiResponse.ApiResponseBuilder().code(400).message("参数错误!").data(null).build();
|
|
|
}
|
|
|
LOG.info("in method=ufo.product.search.newSaleCalendar uid={}, start_time={}, end_time={}", uid, startTime, endTime);
|
|
|
Integer start = getValidTimestamp(startTime, true);
|
|
|
Integer end = getValidTimestamp(endTime, false);
|
|
|
if (start == null || end == null) {
|
|
|
return new ApiResponse.ApiResponseBuilder().code(400).message("参数错误!").data(null).build();
|
|
|
}
|
|
|
JSONObject productJson = productSearchService.searchNewSaleCalendar(start, end);
|
|
|
productSearchService.processUserFavoriteProductList(productJson, uid);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.newSaleCalendar").data(productJson).build();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.search.newSaleCalendarCount", desc="销售日历列汇总数量")
|
|
|
@RequestMapping(params = "method=ufo.product.search.newSaleCalendarCount")
|
|
|
@IgnoreSession
|
|
|
@Cachable(expire=180)
|
|
|
public ApiResponse searchNewSaleCalendarCount() {
|
|
|
LOG.info("in method=ufo.product.search.newSaleCalendarCount");
|
|
|
JSONObject timeJson = productSearchService.getNewSaleCalendarCountData();
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.newSaleCalendarCount").data(timeJson).build();
|
|
|
}
|
|
|
|
|
|
@IgnoreSignature
|
|
|
@ApiOperation(name = "ufo.product.search.hotSale", desc="热销列表")
|
|
|
@RequestMapping(params = "method=ufo.product.search.hotSale")
|
...
|
...
|
|