From ae6bf015031bd6579cc719ee7689d8160e3d92d2 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 08 十一月 2019 15:43:38 +0800 Subject: [PATCH] 商城订单后台修改,悬浮大图添加音效控制 --- 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