From 9a24f2802a3d6fe3e82c05e52f2880d65ad04dcf Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期一, 29 四月 2019 08:59:47 +0800
Subject: [PATCH] Merge branch 'div_develop' into master_develop

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java
index b957f99..190f35e 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java
@@ -4,9 +4,9 @@
 import java.util.List;
 
 import javax.annotation.Resource;
-import javax.transaction.Transactional;
 
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.yeshi.utils.StringUtil;
 
 import com.yeshi.fanli.dao.mybatis.goods.CommonGoodsMapper;
@@ -134,4 +134,33 @@
 			}
 		}
 	}
+	
+	@Override
+	@Transactional
+	public void addBatchCommonGoods(List<CommonGoods> listCommonGoods) {
+		
+		if (listCommonGoods == null || listCommonGoods.size() == 0) {
+			return;
+		}
+		
+		for (CommonGoods commonGoods: listCommonGoods) {
+			try {
+				addCommonGoods(commonGoods);
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+	}
+	
+	
+	@Override
+	public List<CommonGoods> listBySellerId(Long sellerId) {
+		return commonGoodsMapper.listBySellerId(sellerId);
+	} 
+	
+	
+	@Override
+	public long countBySellerIdAndHasCoupon(Long sellerId) {
+		return commonGoodsMapper.countBySellerIdAndHasCoupon(sellerId);
+	}
 }

--
Gitblit v1.8.0