|
@@ -18,6 +18,19 @@ import java.util.function.BinaryOperator; |
|
@@ -18,6 +18,19 @@ import java.util.function.BinaryOperator; |
18
|
import java.util.function.Function;
|
18
|
import java.util.function.Function;
|
19
|
import java.util.stream.Collectors;
|
19
|
import java.util.stream.Collectors;
|
20
|
|
20
|
|
|
|
21
|
+import com.alibaba.fastjson.JSON;
|
|
|
22
|
+import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
23
|
+import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
|
|
24
|
+import com.yohobuy.ufo.model.response.StorageCheckResp;
|
|
|
25
|
+import com.yohobuy.ufo.model.response.store.StoreInfoBo;
|
|
|
26
|
+import com.yohoufo.common.ApiResponse;
|
|
|
27
|
+import com.yohoufo.common.constant.BusinessClientEnum;
|
|
|
28
|
+import com.yohoufo.common.exception.UfoServiceException;
|
|
|
29
|
+import com.yohoufo.common.utils.OrikaUtils;
|
|
|
30
|
+import com.yohoufo.dal.product.*;
|
|
|
31
|
+import com.yohoufo.dal.product.model.*;
|
|
|
32
|
+import com.yohoufo.product.service.cache.BrandCacheService;
|
|
|
33
|
+import com.yohoufo.product.service.cache.SizeCacheService;
|
21
|
import org.apache.commons.collections.MapUtils;
|
34
|
import org.apache.commons.collections.MapUtils;
|
22
|
import org.apache.commons.lang.ArrayUtils;
|
35
|
import org.apache.commons.lang.ArrayUtils;
|
23
|
import org.apache.commons.lang3.StringUtils;
|
36
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -138,6 +151,9 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -138,6 +151,9 @@ public class ProductServiceImpl implements ProductService { |
138
|
private BrandMapper brandMapper;
|
151
|
private BrandMapper brandMapper;
|
139
|
|
152
|
|
140
|
@Autowired
|
153
|
@Autowired
|
|
|
154
|
+ private BrandCacheService brandCacheService;
|
|
|
155
|
+
|
|
|
156
|
+ @Autowired
|
141
|
private BrandSeriesMapper brandSeriesMapper;
|
157
|
private BrandSeriesMapper brandSeriesMapper;
|
142
|
|
158
|
|
143
|
@Autowired
|
159
|
@Autowired
|
|
@@ -216,6 +232,9 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -216,6 +232,9 @@ public class ProductServiceImpl implements ProductService { |
216
|
private BidProductService bidProductService;
|
232
|
private BidProductService bidProductService;
|
217
|
|
233
|
|
218
|
@Autowired
|
234
|
@Autowired
|
|
|
235
|
+ private SizeCacheService sizeCacheService;
|
|
|
236
|
+
|
|
|
237
|
+ @Autowired
|
219
|
private SizePoolMapper sizePoolMapper;
|
238
|
private SizePoolMapper sizePoolMapper;
|
220
|
|
239
|
|
221
|
@Autowired
|
240
|
@Autowired
|
|
@@ -1665,10 +1684,15 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1665,10 +1684,15 @@ public class ProductServiceImpl implements ProductService { |
1665
|
|
1684
|
|
1666
|
@Override
|
1685
|
@Override
|
1667
|
public JSONObject querySecondHandProductListFilter(Integer storageId) {
|
1686
|
public JSONObject querySecondHandProductListFilter(Integer storageId) {
|
1668
|
- Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
|
1669
|
- Size size = sizeMapper.selectByPrimaryKey(storage.getSizeId());
|
|
|
1670
|
- Product product = productMapper.selectByPrimaryKey(storage.getProductId());
|
|
|
1671
|
- Brand brand = brandMapper.selectByPrimaryKey(product.getBrandId());
|
1687
|
+ Storage storage = storageService.selectStorageByCache(storageId);
|
|
|
1688
|
+ //Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
|
1689
|
+ // Size size = sizeMapper.selectByPrimaryKey(storage.getSizeId());
|
|
|
1690
|
+ String sizeName = sizeCacheService.queryNameBySizeId(storage.getSizeId());
|
|
|
1691
|
+ Product product = productHelpService.selectByIdCache(storage.getProductId());
|
|
|
1692
|
+ //Product product = productMapper.selectByPrimaryKey(storage.getProductId());
|
|
|
1693
|
+ //Brand brand = brandMapper.selectByPrimaryKey(product.getBrandId());
|
|
|
1694
|
+ Brand brand = brandCacheService.queryByBrandId(product.getBrandId());
|
|
|
1695
|
+
|
1672
|
List<Integer> type = storagePriceMapper.selectSecondHandType(storageId);
|
1696
|
List<Integer> type = storagePriceMapper.selectSecondHandType(storageId);
|
1673
|
|
1697
|
|
1674
|
JSONObject jo = new JSONObject();
|
1698
|
JSONObject jo = new JSONObject();
|
|
@@ -1699,7 +1723,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1699,7 +1723,7 @@ public class ProductServiceImpl implements ProductService { |
1699
|
JSONArray filterSizeItemArray = new JSONArray();
|
1723
|
JSONArray filterSizeItemArray = new JSONArray();
|
1700
|
JSONObject filterSizeItem = new JSONObject();
|
1724
|
JSONObject filterSizeItem = new JSONObject();
|
1701
|
filterSizeItem.put("itemId", storageId);
|
1725
|
filterSizeItem.put("itemId", storageId);
|
1702
|
- filterSizeItem.put("itemName", size.getSizeName());
|
1726
|
+ filterSizeItem.put("itemName", sizeName);
|
1703
|
filterSizeItemArray.add(filterSizeItem);
|
1727
|
filterSizeItemArray.add(filterSizeItem);
|
1704
|
filterSize.put("itemList", filterSizeItemArray);
|
1728
|
filterSize.put("itemList", filterSizeItemArray);
|
1705
|
filterArray.add(filterSize);
|
1729
|
filterArray.add(filterSize);
|
|
@@ -1712,7 +1736,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1712,7 +1736,7 @@ public class ProductServiceImpl implements ProductService { |
1712
|
JSONObject filterBrandItem = new JSONObject();
|
1736
|
JSONObject filterBrandItem = new JSONObject();
|
1713
|
filterBrandItem.put("itemId", brand.getId());
|
1737
|
filterBrandItem.put("itemId", brand.getId());
|
1714
|
filterBrandItem.put("itemName", brand.getBrandName());
|
1738
|
filterBrandItem.put("itemName", brand.getBrandName());
|
1715
|
- filterBrandItem.put("itemUrl", ImageUrlAssist.getAllProductPicUrl(brand.getBrandLogo(), "brandLogo", "center", "d2hpdGU="));
|
1739
|
+ filterBrandItem.put("itemUrl", brand.getBrandLogo());
|
1716
|
filterBrandItemArray.add(filterBrandItem);
|
1740
|
filterBrandItemArray.add(filterBrandItem);
|
1717
|
filterBrand.put("itemList", filterBrandItemArray);
|
1741
|
filterBrand.put("itemList", filterBrandItemArray);
|
1718
|
filterArray.add(filterBrand);
|
1742
|
filterArray.add(filterBrand);
|