From c5f54810f60e036317562b1b42cfeafd18e984c5 Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期日, 01 三月 2020 16:39:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
index 0c57592..16fdff5 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
@@ -135,9 +135,9 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "saveGoodsCoupon")
-	public void saveGoodsCoupon(String callback, String pid, String tags, String tagDesc, PrintWriter out) {
+	public void saveGoodsCoupon(String callback, String pid, String content, PrintWriter out) {
 		try {
-			goodsEvaluateService.saveGoodsCoupon(pid, tags, tagDesc);
+			goodsEvaluateService.saveGoodsCoupon(pid, content);
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
 		} catch (GoodsEvaluateException e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -239,7 +239,7 @@
 						&& goodsEvaluate.getComments().size() > 0) {
 					for (CommentInfo info : goodsEvaluate.getComments()) {
 						if (info != null)
-							if (CommentInfoEnum.currencyCoupon == info.getType()) {
+							if (CommentInfoEnum.currencyCoupon == info.getTypeEnum()) {
 								commentInfo = info;
 							}
 					}
@@ -270,7 +270,7 @@
 						&& goodsEvaluate.getComments().size() > 0) {
 					for (CommentInfo info : goodsEvaluate.getComments()) {
 						if (info != null)
-							if (CommentInfoEnum.goodsCoupon == info.getType()) {
+							if (CommentInfoEnum.goodsCoupon == info.getTypeEnum()) {
 								commentInfo = info;
 							}
 					}
@@ -444,6 +444,53 @@
 	}
 
 	/**
+	 * 鑾峰彇淇℃伅
+	 * 
+	 * @param callback
+	 * @param special
+	 *            0a39676f138c4dcba722e321d43c4284
+	 * @param out
+	 */
+	@RequestMapping(value = "getSuCaiPic")
+	public void getSuCaiPic(String callback, String pid, PrintWriter out) {
+		try {
+			String videoUrl = "";
+			String videoPic = "";
+			String activityUrl = "";
+			List<String> list = new ArrayList<String>();
+			if (!StringUtil.isNullOrEmpty(pid)) {
+				GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid);
+				if (goodsEvaluate != null && goodsEvaluate.getImgList() != null
+						&& goodsEvaluate.getImgList().size() > 0) {
+					List<ImgInfo> imgList = goodsEvaluate.getImgList();
+					for (ImgInfo imgInfo : imgList) {
+						ImgEnum type = imgInfo.getType();
+						if (type == ImgEnum.video) {
+							videoPic = imgInfo.getUrl();
+							videoUrl = imgInfo.getVideoUrl();
+						} else if (type == ImgEnum.activity) {
+							activityUrl = imgInfo.getActivityPic();
+						} else if (type == ImgEnum.img) {
+							list.add(imgInfo.getUrl());
+						}
+					}
+				}
+			}
+
+			JSONObject data = new JSONObject();
+			data.put("activityUrl", activityUrl);
+			data.put("videoUrl", videoUrl);
+			data.put("videoPic", videoPic);
+			data.put("list", list);
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
+		} catch (Exception e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触"));
+			e.printStackTrace();
+		}
+	}
+
+	
+	/**
 	 * 淇濆瓨淇℃伅
 	 * 
 	 * @param callback

--
Gitblit v1.8.0