From 573c491b4a1ba60e12a5678a01c1546c0077c1ee Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 30 七月 2019 09:07:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 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..605b873 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,38 @@ } } } + + @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); + } + + @Override + public List<CommonGoods> getByListGoodsId(List<Long> list) { + return commonGoodsMapper.getByListGoodsId(list); + } + } -- Gitblit v1.8.0