Authored by caoyan

storagePrice

... ... @@ -423,4 +423,18 @@ public class ProductController {
List<SaleCategoryBo> resp = productService.querySaleCategoryDetail(id);
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("saleCategoryDetail data").build();
}
@ApiOperation(name = "ufo.product.storagePrice", desc="sku建议价")
@RequestMapping(params = "method=ufo.product.storagePrice")
@Cachable(expire = 180)
public ApiResponse queryStoragePrice(@RequestParam(value = "skuList", required = true) List<Integer> skuList) {
if (CollectionUtils.isEmpty(skuList)) {
LOG.info("in method=ufo.product.storagePrice skuList Is Null");
return null;
}
LOG.info("in method=ufo.product.storagePrice skuList={}", skuList);
List<StoragePrice> storagePriceList = productService.queryStoragePriceBySkuList(skuList);
return new ApiResponse.ApiResponseBuilder().data(storagePriceList).code(200).message("storagePrice data").build();
}
}
\ No newline at end of file
... ...
... ... @@ -72,4 +72,6 @@ public interface ProductService {
List<SaleCategoryBo> querySaleCategory();
List<SaleCategoryBo> querySaleCategoryDetail(Integer id);
List<StoragePrice> queryStoragePriceBySkuList(List<Integer> skuList);
}
... ...
... ... @@ -199,6 +199,11 @@ public class ProductServiceImpl implements ProductService{
resp.setLeastPrice(null == storagePrice ? null : storagePrice.getPrice());
return resp;
}
@Override
public List<StoragePrice> queryStoragePriceBySkuList(List<Integer> skuList){
return storagePriceMapper.selectByStorageIds(skuList);
}
@Override
public StoragePrice getStoragePriceBySkup(Integer skup) {
... ...