From 54e6398cabe1b32b1dbc9857c6a99d8f15b549f7 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 06 十一月 2019 15:31:44 +0800 Subject: [PATCH] 红包信息 --- fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java index e4a0d27..1d96481 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java @@ -38,13 +38,16 @@ * @return */ @Override - public boolean addBrandShopTB(Long brandId, Long auctionId, Long sellerId) { + public boolean addBrandShopTB(BrandInfo brandInfo, Long auctionId, Long sellerId) { TaoBaoShop taoBaoShop = taoBaoShopService.getTaoBaoShop(auctionId, sellerId); if (taoBaoShop == null) return true; + ShopInfoVO shopInfoVO = ShopInfoVOFactory.convertTaoBaoShop(taoBaoShop); + shopInfoVO.setShopIcon(brandInfo.getIcon()); + BrandShopCahe brandShop = new BrandShopCahe(); - brandShop.setBrandId(brandId); + brandShop.setBrandId(brandInfo.getId()); brandShop.setShop(ShopInfoVOFactory.convertTaoBaoShop(taoBaoShop)); brandShop.setCreateTime(new Date()); brandShopCaheDao.insert(brandShop); @@ -78,6 +81,10 @@ */ @Override public void addBrandShopPDD(BrandInfo brandInfo) { + String shopKey = brandInfo.getShopKey(); + if (StringUtil.isNullOrEmpty(shopKey)) + shopKey = brandInfo.getName(); + String searchKey = brandInfo.getSearchKey(); if (StringUtil.isNullOrEmpty(searchKey)) searchKey = brandInfo.getName(); @@ -97,7 +104,7 @@ for (PDDGoodsDetail goods : goodsList) { // 鍖呭惈搴楅摵id 銆佸寘鍚搧鐗屽悕绉� String mallName = goods.getMallName(); - if(addShop && !StringUtil.isNullOrEmpty(mallName) && mallName.contains(brandInfo.getName()) + if(addShop && !StringUtil.isNullOrEmpty(mallName) && mallName.toLowerCase().contains(shopKey.toLowerCase()) && goods.getMallId() != null){ shopInfoVO = new ShopInfoVO(); shopInfoVO.setId(goods.getMallId().toString()); -- Gitblit v1.8.0