yujian
2019-10-28 a86acd2bc3135030ec0b0aadadff86e558121b20
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
@@ -122,6 +122,17 @@
         record.setCreateTime(resultObj.getCreateTime());
         record.setUpdateTime(new Date());
         brandInfoMapper.updateByPrimaryKey(record);
         if (state == 0){
            executor.execute(new Runnable() {
               @Override
               public void run() {
                  brandGoodsCaheService.removeByBrandId(id);
                  brandShopCaheService.removeByBrandId(id);
               }
            });
         }
      }
      if (state == 1) {
@@ -160,6 +171,16 @@
   
   @Override
   public int deleteBatchByPrimaryKey(List<Long> list) {
      executor.execute(new Runnable() {
         @Override
         public void run() {
            for (Long id: list) {
               brandGoodsCaheService.removeByBrandId(id);
               brandShopCaheService.removeByBrandId(id);
            }
         }
      });
      return brandInfoMapper.deleteBatchByPrimaryKey(list);
   }
@@ -225,6 +246,18 @@
      return brandClassShopService.countBrandShopinfo(cid);
   }
   @Override
   public void removeAgoByDate(Date date) {
      // 删除商品
      brandGoodsCaheService.removeAgoByDate(date);
      // 删除店铺
      brandShopCaheService.removeAgoByDate(date);
   }
   @Override
   public void addShopAndGoods(long start, int count) {
      List<BrandInfo> list = brandInfoMapper.listValidAll(start, count);