From bf82ef10ab22922d93b342512a89e11b57352587 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期四, 18 六月 2020 18:09:14 +0800
Subject: [PATCH] 修改发圈

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java |   25 +++++--------------------
 1 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
index f135d5e..ec7abe5 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -2063,34 +2063,19 @@
 		goodsEvaluateDao.save(goodsEvaluate);
 	}
 
+
 	
 	@Override
-	public void addGoodsEvaluate2(String goodsId, List<String> imgs, ActivityUser user, String title, String comment) throws GoodsEvaluateException {
-		if (goodsId == null || user == null || StringUtil.isNullOrEmpty(title)) {
+	public void addGoodsEvaluate2(TaoBaoGoodsBrief goodsBrief, List<String> imgs, ActivityUser user, String title, String comment) throws GoodsEvaluateException {
+		if (goodsBrief == null || user == null || StringUtil.isNullOrEmpty(title)) {
 			throw new GoodsEvaluateException(1, "鐩稿叧鍙傛暟涓嶈兘涓虹┖");
 		}
-
 		Date limitDate = DateUtil.reduceDay(new Date(), 7);
 		
-		List<GoodsEvaluate> evaluateList = goodsEvaluateDao.queryExistLimitTime(Constant.SOURCE_TYPE_TAOBAO, goodsId, limitDate);
+		Long goodsId = goodsBrief.getAuctionId();
+		List<GoodsEvaluate> evaluateList = goodsEvaluateDao.queryExistLimitTime(Constant.SOURCE_TYPE_TAOBAO, goodsId + "", limitDate);
 		if (evaluateList != null && evaluateList.size() > 0)
 			throw new GoodsEvaluateException(1, "璇ュ晢鍝佸凡瀛樺湪");
-
-		TaoBaoGoodsBrief goodsBrief = null;
-		try {
-			goodsBrief = redisManager.getTaoBaoGoodsBrief(Long.parseLong(goodsId));
-		} catch (TaobaoGoodsDownException e) {
-			throw new GoodsEvaluateException(1, "鍟嗗搧宸蹭笅鏋�");
-		}
-
-		if (goodsBrief == null) {
-			throw new GoodsEvaluateException(1, "鏈壘鍒板晢鍝佷俊鎭�");
-		}
-
-		BigDecimal couponAmount = goodsBrief.getCouponAmount();
-		if (couponAmount == null || couponAmount.compareTo(new BigDecimal(0)) < 1) {
-			throw new GoodsEvaluateException(1, "璇ュ晢鍝佹棤鍒�");
-		}
 
 		if (imgs == null) {
 			imgs = new ArrayList<>();

--
Gitblit v1.8.0