From 15f831b6e153cedea957bd08802380759a234c6a Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 08 十一月 2019 18:57:51 +0800 Subject: [PATCH] MQ日志调整 --- fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java index 634d06c..8cc8d8a 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java +++ b/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); + } + } -- Gitblit v1.8.0