...
|
...
|
@@ -3,6 +3,7 @@ package com.yohoufo.product.controller; |
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
import com.yohoufo.product.response.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
...
|
...
|
@@ -22,10 +23,6 @@ import com.yohoufo.common.caller.UfoServiceCaller; |
|
|
import com.yohoufo.common.utils.UfoJsonUtil;
|
|
|
import com.yohoufo.dal.product.model.StoragePrice;
|
|
|
import com.yohoufo.product.request.StoragePriceBo;
|
|
|
import com.yohoufo.product.response.ProductDetailResp;
|
|
|
import com.yohoufo.product.response.ProductSeriesTemplateResp;
|
|
|
import com.yohoufo.product.response.StorageDataResp;
|
|
|
import com.yohoufo.product.response.StorageLeastPriceResp;
|
|
|
import com.yohoufo.product.service.ProductService;
|
|
|
|
|
|
|
...
|
...
|
@@ -46,7 +43,7 @@ public class ProductController { |
|
|
@RequestMapping(params = "method=ufo.product.data")
|
|
|
@Cachable(expire=600)
|
|
|
public ApiResponse queryProductDetailById(
|
|
|
@RequestParam(value = "product_id", required = true) Integer productId) {
|
|
|
@RequestParam(value = "product_id") Integer productId) {
|
|
|
|
|
|
if (null == productId) {
|
|
|
return new ApiResponse(400, "product_id Is Null", null);
|
...
|
...
|
@@ -57,19 +54,33 @@ public class ProductController { |
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.series.template", desc="商品系列列表")
|
|
|
@IgnoreSignature
|
|
|
@IgnoreSession
|
|
|
@RequestMapping(params = "method=ufo.product.series.template")
|
|
|
//@Cachable(expire=600)
|
|
|
public ApiResponse querySeriesTemplateData(
|
|
|
@RequestParam(value = "product_ids") String productIds) {
|
|
|
|
|
|
if (StringUtils.isBlank(productIds)) {
|
|
|
return new ApiResponse(400, "productIds Is Null", null);
|
|
|
}
|
|
|
ProductSeriesTemplateResp resp = productService.querySeriesTemplateData(productIds);
|
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.sort.template", desc="商品列表")
|
|
|
@IgnoreSignature
|
|
|
@IgnoreSession
|
|
|
@RequestMapping(params = "method=ufo.product.sort.template")
|
|
|
//@Cachable(expire=600)
|
|
|
public ApiResponse querySortTemplateData(
|
|
|
@RequestParam(value = "skns", required = false) String skns) {
|
|
|
@RequestParam(value = "product_ids") String productIds) {
|
|
|
|
|
|
if (StringUtils.isBlank(skns)) {
|
|
|
return new ApiResponse(500, "skns Is Null", null);
|
|
|
if (StringUtils.isBlank(productIds)) {
|
|
|
return new ApiResponse(400, "productIds Is Null", null);
|
|
|
}
|
|
|
|
|
|
ProductSeriesTemplateResp resp = productService.querySortTemplateData(skns);
|
|
|
ProductSortTemplateResp resp = productService.querySortTemplateData(productIds);
|
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
|
|
|
}
|
|
|
|
...
|
...
|
|