From 553e4585a5ec8e2c22b50e33a27d14ead6fd034d Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期五, 26 四月 2019 15:16:07 +0800
Subject: [PATCH] 店铺足迹删除+ 假删除

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 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 e392bda..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
@@ -1,16 +1,18 @@
 package com.yeshi.fanli.service.impl.goods;
 
 import java.util.Date;
+import java.util.List;
 
 import javax.annotation.Resource;
 
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.yeshi.utils.StringUtil;
 
 import com.yeshi.fanli.dao.mybatis.goods.CommonGoodsMapper;
 import com.yeshi.fanli.entity.goods.CommonGoods;
 import com.yeshi.fanli.exception.goods.CommonGoodsException;
 import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
-import com.yeshi.fanli.util.StringUtil;
 
 @Service
 public class CommonGoodsServiceImpl implements CommonGoodsService {
@@ -116,4 +118,49 @@
 		return commonGoodsMapper.selectByGoodsIdAndGoodsType(goodsId, goodsType);
 	}
 
+	@Override
+	@Transactional
+	public void updateBatchCommonGoods(List<CommonGoods> listCommonGoods) {
+		
+		if (listCommonGoods == null || listCommonGoods.size() == 0) {
+			return;
+		}
+		
+		for (CommonGoods commonGoods: listCommonGoods) {
+			try {
+				updateCommonGoods(commonGoods);
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+	}
+	
+	@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