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/BanLiShopGoodsServiceImpl.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsServiceImpl.java index a12ea8f..78f072b 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsServiceImpl.java @@ -133,7 +133,7 @@ return; if (goods.getUpdateTime() == null) goods.setUpdateTime(new Date()); - + banLiShopGoodsMapper.updateByPrimaryKeySelective(goods); } @@ -156,4 +156,16 @@ banLiShopGoodsSetService.deleteByPrimaryKey(set.getId()); } + @Override + public void addSalesCount(Long id, int count) { + BanLiShopGoods goods = selectByPrimaryKey(id); + if (goods != null) { + BanLiShopGoods update = new BanLiShopGoods(id); + update.setSalesCount(goods.getSalesCount() + count); + update.setUpdateTime(new Date()); + updateSelectiveByPrimaryKey(goods); + + } + } + } -- Gitblit v1.8.0