admin
2019-11-12 0cf8c0bf5649b0b7269f78f6eae7c09cffea75cd
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java
@@ -68,6 +68,10 @@
    * @return
    */
   private int addBrandGoodsTB(BrandInfo brandInfo) {
      String shopKey = brandInfo.getShopKey();
      if (StringUtil.isNullOrEmpty(shopKey))
         shopKey = brandInfo.getName();
      String searchKey = brandInfo.getSearchKey();
      if (StringUtil.isNullOrEmpty(searchKey))
         searchKey = brandInfo.getName();
@@ -94,8 +98,8 @@
            // 添加店铺
            String shopTitle = goods.getShopTitle();
            if (addShop && !StringUtil.isNullOrEmpty(shopTitle) && shopTitle.contains("旗舰店") 
                  && shopTitle.contains(brandInfo.getName())) {
               addShop = brandShopCaheService.addBrandShopTB(brandInfo.getId(), goods.getAuctionId(),
                  && shopTitle.toLowerCase().contains(shopKey.toLowerCase())) {
               addShop = brandShopCaheService.addBrandShopTB(brandInfo, goods.getAuctionId(),
                     goods.getSellerId());
            }
            
@@ -129,6 +133,10 @@
    * @return
    */
   private int addBrandGoodsJD(BrandInfo brandInfo) {
      String shopKey = brandInfo.getShopKey();
      if (StringUtil.isNullOrEmpty(shopKey))
         shopKey = brandInfo.getName();
      String searchKey = brandInfo.getSearchKey();
      if (StringUtil.isNullOrEmpty(searchKey))
         searchKey = brandInfo.getName();
@@ -140,6 +148,8 @@
      
      // 删除店铺
       brandShopCaheService.removeByDateAndType(brandInfo.getId(), 20, date);
       boolean addShop = true;
       
      for (int i=0; i < 2;i ++) {
         if ("1".equals(way)) {
@@ -162,7 +172,6 @@
         }
         
         if (result != null && result.getGoodsList() != null && result.getGoodsList().size() > 0) {
            boolean addShop = true;
            List<JDGoods> goodsList = result.getGoodsList();
            for (JDGoods goods : goodsList) {
               BrandGoodsCahe brandGoods = new BrandGoodsCahe();
@@ -177,9 +186,9 @@
               if (addShop && shopInfo != null) {
                  // 包含该品牌名称
                  String shopName = shopInfo.getShopName();
                  if (!StringUtil.isNullOrEmpty(shopName) && shopName.contains(brandInfo.getName())) {
                     brandShopCaheService.addBrandShopJD(brandInfo, shopInfo);
                  if (!StringUtil.isNullOrEmpty(shopName) && shopName.toLowerCase().contains(shopKey.toLowerCase())) {
                     addShop = false;
                     brandShopCaheService.addBrandShopJD(brandInfo, shopInfo);
                  }
               }