admin
2019-01-22 0e552c5dba18d27622116a7d7a6e04fc99f8e8a7
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFactoryServiceImpl.java
@@ -71,12 +71,10 @@
   @Resource
   private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
   @Override
   public int updateByPrimaryKeySelective(QualityFactory record) throws QualityFactoryException {
      return qualityFactoryMapper.updateByPrimaryKeySelective(record);
   }
   @Override
   public void deleteByTbAuctionId(Long auctionId) {
@@ -148,7 +146,6 @@
      labelGoodsMapper.deleteBatchByGoodsId(listGid);
   }
   @Override
   @Transactional
   public void deleteByGoodsId(List<String> ids) throws QualityFactoryException {
@@ -159,7 +156,6 @@
         }
      }
   }
   @Override
   public QualityFactory selectByPrimaryKey(Long id) throws QualityFactoryException {
@@ -416,11 +412,13 @@
      return qualityFactoryMapper.queryNeedUpdate(start, count, hour);
   }
   /**
    * 获取缓存
    * @param key 键
    * @param title 标签名称
    *
    * @param key
    *            键
    * @param title
    *            标签名称
    * @return
    */
   public String getLabelIdByRedis (String key, String title) throws Exception {
@@ -462,7 +460,6 @@
      List<Long> listDeleteQuality = new ArrayList<Long>();
      // 删除标签
      List<Long> listDeleteLabel = new ArrayList<Long>();
      
      List<QualityFactory> listUpdateQuality = new ArrayList<QualityFactory>();
@@ -555,7 +552,8 @@
                  } else {
                     /* 更新商品信息 */
                     TaoBaoGoodsBrief updateGoods = taoBaoGoodsUpdateService.getUpdateTaoBaoGoodsBrief(newGoodsBrief);
                     TaoBaoGoodsBrief updateGoods = taoBaoGoodsUpdateService
                           .getUpdateTaoBaoGoodsBrief(newGoodsBrief);
                  
                     updateGoods.setId(id);
                     taoBaoGoodsBriefService.setGoodsBriefDefault(updateGoods);
@@ -636,7 +634,6 @@
      }
   }
   @Override
   public void autoInsertOrUpadateStorage(List<TaoBaoGoodsBrief> goodsList, List<Label> listLabs,
         BoutiqueAutoRule autoRule) throws Exception {
@@ -672,8 +669,6 @@
         }
      }
      // 商品id集合
      List<Long> listSystemTBid = new ArrayList<Long>();
@@ -689,7 +684,6 @@
      List<QualityFactory> listAddInsert = new ArrayList<QualityFactory>();
      // 进入精选商品列表
      List<QualityFactory> listAddUpdate = new ArrayList<QualityFactory>();
      // 插入商品淘宝ID集合
      List<Long> listAuctionId = new ArrayList<Long>();
@@ -766,7 +760,6 @@
            
            listGoodsUpdate.add(updateGoods);
            Long has9k9ID = null;
            /* 贴上标签   */
@@ -774,8 +767,10 @@
               for (Label label : listLabs) {
                  
                  //  包含 9.9/19.9/29.9/49.9 、同时来源淘宝推荐: 由于获取详情与推荐接口的券信息存在出入  以最后详情为准
                  if (list9Class.contains(label.getId()) && autoRule.isCalss9k9() && QualityFactory.SOURCE_TAOBAO_MATERIAL == autoRule.getGoodsSource()) {
                  // 包含 9.9/19.9/29.9/49.9 、同时来源淘宝推荐: 由于获取详情与推荐接口的券信息存在出入
                  // 以最后详情为准
                  if (list9Class.contains(label.getId()) && autoRule.isCalss9k9()
                        && QualityFactory.SOURCE_TAOBAO_MATERIAL == autoRule.getGoodsSource()) {
                     
                     /* 获取商品详情后计算是否属于 9k9系列  加入对应的标签*/
                     LabelGoods labelGds = screen9K9(updateGoods, map);
@@ -818,7 +813,6 @@
               }
            }
            /* 判断是否已经贴上标签 9k9标签 */
            if (list9Class.size() > 0) {
               
@@ -843,7 +837,6 @@
                        }
                     }
                  }
                  
                  // 清空 9K9系列标签
                  for (LabelGoods labelGoods : listGlid) {
@@ -875,9 +868,10 @@
               
               for (Label label : listLabs) {
                  
                  // 包含 9.9/19.9/29.9/49.9 、同时来源淘宝推荐: 由于获取详情与推荐接口的券信息存在出入  以最后详情为准
                  if (list9Class.contains(label.getId()) && autoRule.isCalss9k9() &&
                        QualityFactory.SOURCE_TAOBAO_MATERIAL == autoRule.getGoodsSource()) {
                  // 包含 9.9/19.9/29.9/49.9 、同时来源淘宝推荐: 由于获取详情与推荐接口的券信息存在出入
                  // 以最后详情为准
                  if (list9Class.contains(label.getId()) && autoRule.isCalss9k9()
                        && QualityFactory.SOURCE_TAOBAO_MATERIAL == autoRule.getGoodsSource()) {
                     /*  加入对应的9.9/19.9/29.9/49.9 标签*/
                     LabelGoods labelGds = screen9K9(newGoodsBrief, map);
                     
@@ -1315,4 +1309,10 @@
      return lg;
   }
   @Override
   public List<QualityFactory> listByMinSalesCountOrderByCreateTimeDesc(int salesCount, int page, int pageSize) {
      return qualityFactoryMapper.listByMinSalesCountOrderByCreateTimeDesc(salesCount, (page - 1) * pageSize,
            pageSize);
   }
}