...
|
...
|
@@ -44,13 +44,12 @@ public class ProductController { |
|
|
@Cachable(expire = 300)
|
|
|
public ApiResponse queryProductDetailById(
|
|
|
@RequestParam(value = "product_id") Integer productId) {
|
|
|
|
|
|
if (null == productId) {
|
|
|
LOG.info("in method=ufo.product.data product_id Is Null");
|
|
|
return new ApiResponse(400, "product_id Is Null", null);
|
|
|
}
|
|
|
|
|
|
LOG.info("in method=ufo.product.data product_id={}", productId);
|
|
|
ProductDetailResp resp = productService.queryProductDetailById(productId);
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -63,8 +62,10 @@ public class ProductController { |
|
|
@RequestParam(value = "product_ids") String productIds) {
|
|
|
|
|
|
if (StringUtils.isBlank(productIds)) {
|
|
|
LOG.info("in method=ufo.product.series.template product_ids Is Null or empty");
|
|
|
return new ApiResponse(400, "productIds Is Null", null);
|
|
|
}
|
|
|
LOG.info("in method=ufo.product.series.template product_ids={}", productIds);
|
|
|
ProductSeriesTemplateResp resp = productService.querySeriesTemplateData(productIds);
|
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
|
|
|
}
|
...
|
...
|
@@ -78,8 +79,10 @@ public class ProductController { |
|
|
@RequestParam(value = "product_ids") String productIds) {
|
|
|
|
|
|
if (StringUtils.isBlank(productIds)) {
|
|
|
LOG.info("in method=ufo.product.sort.template product_ids Is Null or empty");
|
|
|
return new ApiResponse(400, "productIds Is Null", null);
|
|
|
}
|
|
|
LOG.info("in method=ufo.product.sort.template product_ids={}", productIds);
|
|
|
ProductSortTemplateResp resp = productService.querySortTemplateData(productIds);
|
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
|
|
|
}
|
...
|
...
|
@@ -88,11 +91,13 @@ public class ProductController { |
|
|
@RequestMapping(params = "method=ufo.product.storage.leastprice")
|
|
|
@Cachable(expire = 300)
|
|
|
public StorageLeastPriceResp queryStorageLeastprice(
|
|
|
@RequestParam(value = "storage_id", required = true) Integer storageId) {
|
|
|
@RequestParam(value = "storage_id") Integer storageId) {
|
|
|
|
|
|
if (storageId == null) {
|
|
|
LOG.info("in method=ufo.product.storage.leastprice storage_id Is Null");
|
|
|
return null;
|
|
|
}
|
|
|
LOG.info("in method=ufo.product.storage.leastprice storage_id={}", storageId);
|
|
|
return productService.queryStorageLeastPrice(storageId);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -101,11 +106,13 @@ public class ProductController { |
|
|
@RequestMapping(params = "method=ufo.product.storage.data")
|
|
|
@Cachable(expire = 300)
|
|
|
public StorageDataResp queryStorageInfo(
|
|
|
@RequestParam(value = "storage_id", required = true) Integer storageId) {
|
|
|
@RequestParam(value = "storage_id") Integer storageId) {
|
|
|
|
|
|
if (storageId == null) {
|
|
|
LOG.info("in method=ufo.product.storage.data storage_id Is Null");
|
|
|
return null;
|
|
|
}
|
|
|
LOG.info("in method=ufo.product.storage.data storage_id={}", storageId);
|
|
|
return productService.queryStorageInfo(storageId);
|
|
|
}
|
|
|
|
...
|
...
|
|