From fdb089cb8bee6099efcbd7b0ca2672c63cbb6784 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期一, 11 十一月 2019 09:33:56 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

---
 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