|
@@ -18,6 +18,8 @@ import com.yohoufo.common.exception.UfoServiceException; |
|
@@ -18,6 +18,8 @@ import com.yohoufo.common.exception.UfoServiceException; |
18
|
import com.yohoufo.common.utils.OrikaUtils;
|
18
|
import com.yohoufo.common.utils.OrikaUtils;
|
19
|
import com.yohoufo.dal.product.*;
|
19
|
import com.yohoufo.dal.product.*;
|
20
|
import com.yohoufo.dal.product.model.*;
|
20
|
import com.yohoufo.dal.product.model.*;
|
|
|
21
|
+import com.yohoufo.product.service.cache.BrandCacheService;
|
|
|
22
|
+import com.yohoufo.product.service.cache.SizeCacheService;
|
21
|
import org.apache.commons.collections.MapUtils;
|
23
|
import org.apache.commons.collections.MapUtils;
|
22
|
import org.apache.commons.lang.ArrayUtils;
|
24
|
import org.apache.commons.lang.ArrayUtils;
|
23
|
import org.apache.commons.lang3.StringUtils;
|
25
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -89,6 +91,9 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -89,6 +91,9 @@ public class ProductServiceImpl implements ProductService { |
89
|
private BrandMapper brandMapper;
|
91
|
private BrandMapper brandMapper;
|
90
|
|
92
|
|
91
|
@Autowired
|
93
|
@Autowired
|
|
|
94
|
+ private BrandCacheService brandCacheService;
|
|
|
95
|
+
|
|
|
96
|
+ @Autowired
|
92
|
private BrandSeriesMapper brandSeriesMapper;
|
97
|
private BrandSeriesMapper brandSeriesMapper;
|
93
|
|
98
|
|
94
|
@Autowired
|
99
|
@Autowired
|
|
@@ -166,6 +171,9 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -166,6 +171,9 @@ public class ProductServiceImpl implements ProductService { |
166
|
@Autowired
|
171
|
@Autowired
|
167
|
private BidProductService bidProductService;
|
172
|
private BidProductService bidProductService;
|
168
|
|
173
|
|
|
|
174
|
+ @Autowired
|
|
|
175
|
+ private SizeCacheService sizeCacheService;
|
|
|
176
|
+
|
169
|
@Override
|
177
|
@Override
|
170
|
public ProductDetailResp queryProductDetailById(Integer productId) {
|
178
|
public ProductDetailResp queryProductDetailById(Integer productId) {
|
171
|
ProductDetailResp productDetailResp = new ProductDetailResp();
|
179
|
ProductDetailResp productDetailResp = new ProductDetailResp();
|
|
@@ -1610,10 +1618,15 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1610,10 +1618,15 @@ public class ProductServiceImpl implements ProductService { |
1610
|
|
1618
|
|
1611
|
@Override
|
1619
|
@Override
|
1612
|
public JSONObject querySecondHandProductListFilter(Integer storageId) {
|
1620
|
public JSONObject querySecondHandProductListFilter(Integer storageId) {
|
1613
|
- Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
|
1614
|
- Size size = sizeMapper.selectByPrimaryKey(storage.getSizeId());
|
|
|
1615
|
- Product product = productMapper.selectByPrimaryKey(storage.getProductId());
|
|
|
1616
|
- Brand brand = brandMapper.selectByPrimaryKey(product.getBrandId());
|
1621
|
+ Storage storage = storageService.selectStorageByCache(storageId);
|
|
|
1622
|
+ //Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
|
1623
|
+ // Size size = sizeMapper.selectByPrimaryKey(storage.getSizeId());
|
|
|
1624
|
+ String sizeName = sizeCacheService.queryNameBySizeId(storage.getSizeId());
|
|
|
1625
|
+ Product product = productHelpService.selectByIdCache(storage.getProductId());
|
|
|
1626
|
+ //Product product = productMapper.selectByPrimaryKey(storage.getProductId());
|
|
|
1627
|
+ //Brand brand = brandMapper.selectByPrimaryKey(product.getBrandId());
|
|
|
1628
|
+ Brand brand = brandCacheService.queryByBrandId(product.getBrandId());
|
|
|
1629
|
+
|
1617
|
List<Integer> type = storagePriceMapper.selectSecondHandType(storageId);
|
1630
|
List<Integer> type = storagePriceMapper.selectSecondHandType(storageId);
|
1618
|
|
1631
|
|
1619
|
JSONObject jo = new JSONObject();
|
1632
|
JSONObject jo = new JSONObject();
|
|
@@ -1644,7 +1657,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1644,7 +1657,7 @@ public class ProductServiceImpl implements ProductService { |
1644
|
JSONArray filterSizeItemArray = new JSONArray();
|
1657
|
JSONArray filterSizeItemArray = new JSONArray();
|
1645
|
JSONObject filterSizeItem = new JSONObject();
|
1658
|
JSONObject filterSizeItem = new JSONObject();
|
1646
|
filterSizeItem.put("itemId", storageId);
|
1659
|
filterSizeItem.put("itemId", storageId);
|
1647
|
- filterSizeItem.put("itemName", size.getSizeName());
|
1660
|
+ filterSizeItem.put("itemName", sizeName);
|
1648
|
filterSizeItemArray.add(filterSizeItem);
|
1661
|
filterSizeItemArray.add(filterSizeItem);
|
1649
|
filterSize.put("itemList", filterSizeItemArray);
|
1662
|
filterSize.put("itemList", filterSizeItemArray);
|
1650
|
filterArray.add(filterSize);
|
1663
|
filterArray.add(filterSize);
|
|
@@ -1657,7 +1670,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1657,7 +1670,7 @@ public class ProductServiceImpl implements ProductService { |
1657
|
JSONObject filterBrandItem = new JSONObject();
|
1670
|
JSONObject filterBrandItem = new JSONObject();
|
1658
|
filterBrandItem.put("itemId", brand.getId());
|
1671
|
filterBrandItem.put("itemId", brand.getId());
|
1659
|
filterBrandItem.put("itemName", brand.getBrandName());
|
1672
|
filterBrandItem.put("itemName", brand.getBrandName());
|
1660
|
- filterBrandItem.put("itemUrl", ImageUrlAssist.getAllProductPicUrl(brand.getBrandLogo(), "brandLogo", "center", "d2hpdGU="));
|
1673
|
+ filterBrandItem.put("itemUrl", brand.getBrandLogo());
|
1661
|
filterBrandItemArray.add(filterBrandItem);
|
1674
|
filterBrandItemArray.add(filterBrandItem);
|
1662
|
filterBrand.put("itemList", filterBrandItemArray);
|
1675
|
filterBrand.put("itemList", filterBrandItemArray);
|
1663
|
filterArray.add(filterBrand);
|
1676
|
filterArray.add(filterBrand);
|