...
|
...
|
@@ -18,6 +18,19 @@ import java.util.function.BinaryOperator; |
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
|
|
import com.yohobuy.ufo.model.response.StorageCheckResp;
|
|
|
import com.yohobuy.ufo.model.response.store.StoreInfoBo;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.common.constant.BusinessClientEnum;
|
|
|
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;
|
...
|
...
|
@@ -138,6 +151,9 @@ public class ProductServiceImpl implements ProductService { |
|
|
private BrandMapper brandMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BrandCacheService brandCacheService;
|
|
|
|
|
|
@Autowired
|
|
|
private BrandSeriesMapper brandSeriesMapper;
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -216,6 +232,9 @@ public class ProductServiceImpl implements ProductService { |
|
|
private BidProductService bidProductService;
|
|
|
|
|
|
@Autowired
|
|
|
private SizeCacheService sizeCacheService;
|
|
|
|
|
|
@Autowired
|
|
|
private SizePoolMapper sizePoolMapper;
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -1665,10 +1684,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();
|
...
|
...
|
@@ -1699,7 +1723,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);
|
...
|
...
|
@@ -1712,7 +1736,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);
|
...
|
...
|
|