...
|
...
|
@@ -18,6 +18,8 @@ import com.yohoufo.common.exception.UfoServiceException; |
|
|
import com.yohoufo.common.utils.OrikaUtils;
|
|
|
import com.yohoufo.dal.product.*;
|
|
|
import com.yohoufo.dal.product.model.*;
|
|
|
import com.yohoufo.product.service.cache.BrandCacheService;
|
|
|
import com.yohoufo.product.service.cache.SizeCacheService;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang.ArrayUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -89,6 +91,9 @@ public class ProductServiceImpl implements ProductService { |
|
|
private BrandMapper brandMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BrandCacheService brandCacheService;
|
|
|
|
|
|
@Autowired
|
|
|
private BrandSeriesMapper brandSeriesMapper;
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -166,6 +171,9 @@ public class ProductServiceImpl implements ProductService { |
|
|
@Autowired
|
|
|
private BidProductService bidProductService;
|
|
|
|
|
|
@Autowired
|
|
|
private SizeCacheService sizeCacheService;
|
|
|
|
|
|
@Override
|
|
|
public ProductDetailResp queryProductDetailById(Integer productId) {
|
|
|
ProductDetailResp productDetailResp = new ProductDetailResp();
|
...
|
...
|
@@ -1610,10 +1618,15 @@ public class ProductServiceImpl implements ProductService { |
|
|
|
|
|
@Override
|
|
|
public JSONObject querySecondHandProductListFilter(Integer storageId) {
|
|
|
Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
|
Size size = sizeMapper.selectByPrimaryKey(storage.getSizeId());
|
|
|
Product product = productMapper.selectByPrimaryKey(storage.getProductId());
|
|
|
Brand brand = brandMapper.selectByPrimaryKey(product.getBrandId());
|
|
|
Storage storage = storageService.selectStorageByCache(storageId);
|
|
|
//Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
|
// Size size = sizeMapper.selectByPrimaryKey(storage.getSizeId());
|
|
|
String sizeName = sizeCacheService.queryNameBySizeId(storage.getSizeId());
|
|
|
Product product = productHelpService.selectByIdCache(storage.getProductId());
|
|
|
//Product product = productMapper.selectByPrimaryKey(storage.getProductId());
|
|
|
//Brand brand = brandMapper.selectByPrimaryKey(product.getBrandId());
|
|
|
Brand brand = brandCacheService.queryByBrandId(product.getBrandId());
|
|
|
|
|
|
List<Integer> type = storagePriceMapper.selectSecondHandType(storageId);
|
|
|
|
|
|
JSONObject jo = new JSONObject();
|
...
|
...
|
@@ -1644,7 +1657,7 @@ public class ProductServiceImpl implements ProductService { |
|
|
JSONArray filterSizeItemArray = new JSONArray();
|
|
|
JSONObject filterSizeItem = new JSONObject();
|
|
|
filterSizeItem.put("itemId", storageId);
|
|
|
filterSizeItem.put("itemName", size.getSizeName());
|
|
|
filterSizeItem.put("itemName", sizeName);
|
|
|
filterSizeItemArray.add(filterSizeItem);
|
|
|
filterSize.put("itemList", filterSizeItemArray);
|
|
|
filterArray.add(filterSize);
|
...
|
...
|
@@ -1657,7 +1670,7 @@ public class ProductServiceImpl implements ProductService { |
|
|
JSONObject filterBrandItem = new JSONObject();
|
|
|
filterBrandItem.put("itemId", brand.getId());
|
|
|
filterBrandItem.put("itemName", brand.getBrandName());
|
|
|
filterBrandItem.put("itemUrl", ImageUrlAssist.getAllProductPicUrl(brand.getBrandLogo(), "brandLogo", "center", "d2hpdGU="));
|
|
|
filterBrandItem.put("itemUrl", brand.getBrandLogo());
|
|
|
filterBrandItemArray.add(filterBrandItem);
|
|
|
filterBrand.put("itemList", filterBrandItemArray);
|
|
|
filterArray.add(filterBrand);
|
...
|
...
|
|