admin
2019-11-11 08172b0a3938af612bce154fedf1a36d23743cb5
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java
@@ -126,16 +126,25 @@
            banLiShopGoodsSetPayService.deleteByPrimaryKey(pay.getId());
         }
   }
   @Override
   public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key) {
      return banLiShopGoodsSetsMapper.listQuery((page - 1) * pageSize, pageSize, key);
   }
   @Override
   public long countQuery(String key) {
      return banLiShopGoodsSetsMapper.countQuery(key);
   }
   @Override
   public void addSalesCount(Long id, int count) {
      BanLiShopGoodsSets set = banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
      BanLiShopGoodsSets update = new BanLiShopGoodsSets();
      update.setId(set.getId());
      update.setSalesCount(set.getSalesCount() + count);
      update.setStock(set.getStock() - count);
      banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(update);
   }
}