From 30d8e227e8d823b6c38c3b9c90ac2df03b63befe Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 25 二月 2025 16:41:22 +0800
Subject: [PATCH] 淘宝转链接口更新

---
 fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java |  384 ++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 241 insertions(+), 143 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 fd3848e..4e624c0 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
@@ -9,6 +9,7 @@
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
+import com.yeshi.fanli.entity.accept.AdminAcceptData;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -17,32 +18,36 @@
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
-import com.yeshi.fanli.dto.ConfigParamsDTO;
+import com.yeshi.fanli.dto.GoodsMoneyConfigParamsDTO;
 import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
+import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
 import com.yeshi.fanli.entity.dynamic.CommentInfo;
 import com.yeshi.fanli.entity.dynamic.CommentInfo.CommentInfoEnum;
 import com.yeshi.fanli.entity.dynamic.GoodsEvaluate;
 import com.yeshi.fanli.entity.dynamic.ImgInfo;
 import com.yeshi.fanli.entity.dynamic.ImgInfo.ImgEnum;
+import com.yeshi.fanli.entity.dynamic.ListComment;
 import com.yeshi.fanli.entity.goods.CommonGoods;
 import com.yeshi.fanli.entity.jd.JDGoods;
-import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
+import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief;
 import com.yeshi.fanli.exception.dynamic.GoodsEvaluateException;
 import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
+import com.yeshi.fanli.log.LogHelper;
 import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
 import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
 import com.yeshi.fanli.service.manger.ClipboardAnalysisManager;
-import com.yeshi.fanli.tag.PageEntity;
+import com.yeshi.fanli.service.manger.IClipboardAnalysisResult;
+import com.yeshi.common.entity.PageEntity;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.RedisManager;
 import com.yeshi.fanli.util.StringUtil;
-import com.yeshi.fanli.util.TimeUtil;
+import org.yeshi.utils.TimeUtil;
 import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
 import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
 import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
-import com.yeshi.fanli.util.jd.JDApiUtil;
-import com.yeshi.fanli.util.jd.JDUtil;
 import com.yeshi.fanli.vo.goods.GoodsDetailVO;
+import com.yeshi.fanli.vo.msg.TokenVO;
+import com.yeshi.fanli.vo.search.GoodsDocParseResultVO;
 
 import net.sf.json.JSONObject;
 
@@ -74,15 +79,36 @@
 	@Resource
 	private HongBaoManageService hongBaoManageService;
 
+	private CommonGoods commonGoods;
+	
+	
+	/**
+	 * 淇敼鐘舵��
+	 * @param callback
+	 * @param id
+	 * @param out
+	 */
+	@RequestMapping(value = "switchState")
+	public void switchState(AdminAcceptData acceptData,String callback, String id, PrintWriter out) {
+		try {
+			goodsEvaluateService.switchState(id);
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎿嶄綔鎴愬姛"));
+		} catch (GoodsEvaluateException e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
+		} catch (Exception e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔澶辫触"));
+			e.printStackTrace();
+		}
+	}
+	
 	/**
 	 * 淇濆瓨淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
 	 * @param out
 	 */
 	@RequestMapping(value = "saveHead")
-	public void saveHead(String callback, GoodsEvaluate evaluate, HttpServletRequest request, PrintWriter out) {
+	public void saveHead(AdminAcceptData acceptData,String callback, GoodsEvaluate evaluate, HttpServletRequest request, PrintWriter out) {
 		try {
 			String id = null;
 			if (request instanceof MultipartHttpServletRequest) {
@@ -102,22 +128,30 @@
 
 	/**
 	 * 淇濆瓨淇℃伅
-	 * 
+	 * @param acceptData
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
+	 * @param pid
+	 * @param goodsId
+	 * @param goodsType
+	 * @param videoUrl
+	 * @param picNum
+	 * @param picUrls
+	 * @param request
 	 * @param out
 	 */
 	@RequestMapping(value = "saveSingleGoods")
-	public void saveSingleGoods(String callback, String pid, Long goodsId, Integer goodsType, String videoUrl,
-			Integer picNum, String picUrls, HttpServletRequest request, PrintWriter out) {
+	public void saveSingleGoods(AdminAcceptData acceptData, String callback, String pid, String goodsId, Integer goodsType, String videoUrl,
+								Integer picNum, String picUrls, HttpServletRequest request, PrintWriter out) {
 		try {
 			MultipartHttpServletRequest fileRequest = null;
 			if (request instanceof MultipartHttpServletRequest) {
 				fileRequest = (MultipartHttpServletRequest) request;
 			}
-			goodsEvaluateService.saveSingleGoods(pid, goodsId, goodsType, videoUrl, picNum, picUrls, fileRequest);
-			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
+			String commentText = goodsEvaluateService.saveSingleGoods(pid, goodsId, goodsType, videoUrl, picNum,
+					picUrls,acceptData.getSystem(), fileRequest);
+			JSONObject object = new JSONObject();
+			object.put("comment", commentText);
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(object));
 		} catch (GoodsEvaluateException e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
 		} catch (Exception e) {
@@ -126,58 +160,15 @@
 		}
 	}
 
-	/**
-	 * 淇濆瓨淇℃伅
-	 * 
-	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
-	 * @param out
-	 */
-	@RequestMapping(value = "saveGoodsCoupon")
-	public void saveGoodsCoupon(String callback, String pid, String tags, String tagDesc, PrintWriter out) {
-		try {
-			goodsEvaluateService.saveGoodsCoupon(pid, tags, tagDesc);
-			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
-		} catch (GoodsEvaluateException e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
-		} catch (Exception e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 淇濆瓨淇℃伅
-	 * 
-	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
-	 * @param out
-	 */
-	@RequestMapping(value = "saveSingleGoodsCoupon")
-	public void saveSingleGoodsCoupon(String callback, String pid, CommentInfo commentInfo, PrintWriter out) {
-		try {
-			goodsEvaluateService.saveSingleGoodsCoupon(pid, commentInfo);
-			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
-		} catch (GoodsEvaluateException e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
-		} catch (Exception e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
-			e.printStackTrace();
-		}
-	}
-
+	
 	/**
 	 * 鑾峰彇淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
 	 * @param out
 	 */
 	@RequestMapping(value = "getSingleGoodsinfo")
-	public void getSingleGoodsinfo(String callback, String pid, PrintWriter out) {
+	public void getSingleGoodsinfo(AdminAcceptData acceptData,String callback, String pid, PrintWriter out) {
 		try {
 			String goodsId = "";
 			String goodsType = "";
@@ -220,17 +211,100 @@
 			e.printStackTrace();
 		}
 	}
+	
 
+	/**
+	 * 
+	 * @param callback
+	 * @param comments
+	 * @param out
+	 */
+	@RequestMapping(value = "saveGoodsComment")
+	public void saveGoodsComment(AdminAcceptData acceptData, String callback, String id, int kind, ListComment comments, PrintWriter out) {
+		try {
+			if (StringUtil.isNullOrEmpty(id)) {
+				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇峰厛淇濆瓨鎺ㄨ崘璇俊鎭�"));
+				return;
+			}
+			if (comments == null) {
+				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏂囨湰鍐呭涓虹┖"));
+				return;
+			}
+			goodsEvaluateService.saveGoodsComment(id, kind, comments.getComment(),acceptData.getSystem());
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎴愬姛"));
+		} catch (GoodsEvaluateException e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
+		} catch (Exception e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 
+	 * @param callback
+	 * @param out
+	 */
+	@RequestMapping(value = "getGoodsComment")
+	public void getGoodsComment(AdminAcceptData acceptData,String callback, String id, PrintWriter out) {
+		try {
+			if (StringUtil.isNullOrEmpty(id)) {
+				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇峰厛淇濆瓨鎺ㄨ崘璇俊鎭�"));
+				return;
+			}
+
+			List<CommentInfo> newList = new ArrayList<>();
+			GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(id);
+			if (goodsEvaluate != null) {
+				List<CommentInfo> comments = goodsEvaluate.getComments();
+				if (comments != null && comments.size() > 0) {
+					for (CommentInfo commentInfo : comments) {
+						CommentInfoEnum typeEnum = commentInfo.getTypeEnum();
+						if (typeEnum == CommentInfoEnum.goodsCoupon) {
+							newList.add(commentInfo);
+						}
+					}
+				}
+			}
+			JSONObject data = new JSONObject();
+			data.put("list", newList);
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
+		} catch (Exception e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
+			e.printStackTrace();
+		}
+	}
+	
+	/**
+	 * 淇濆瓨淇℃伅
+	 * 
+	 * @param callback
+	 * @param pid
+	 * @param kind     : 1鍗曞搧 2澶氬搧 3娲诲姩
+	 * @param out
+	 */
+	@RequestMapping(value = "saveCurrencyCoupon")
+	public void saveCurrencyCoupon(AdminAcceptData acceptData,String callback, String pid, int kind, CommentInfo commentInfo, PrintWriter out) {
+		try {
+			goodsEvaluateService.saveCurrencyCoupon(acceptData.getSystem(),pid, kind, commentInfo);
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
+		} catch (GoodsEvaluateException e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
+		} catch (Exception e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
+			e.printStackTrace();
+		}
+	}
+	
+	
 	/**
 	 * 鑾峰彇淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
 	 * @param out
 	 */
 	@RequestMapping(value = "getCurrencyCoupon")
-	public void getCurrencyCoupon(String callback, String pid, PrintWriter out) {
+	public void getCurrencyCoupon(AdminAcceptData acceptData,String callback, String pid, PrintWriter out) {
 		try {
 			CommentInfo commentInfo = new CommentInfo();
 			if (!StringUtil.isNullOrEmpty(pid)) {
@@ -239,7 +313,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;
 							}
 					}
@@ -251,37 +325,12 @@
 			e.printStackTrace();
 		}
 	}
+	
 
-	/**
-	 * 鑾峰彇淇℃伅
-	 * 
-	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
-	 * @param out
-	 */
-	@RequestMapping(value = "getSingleGoodsCoupon")
-	public void getSingleGoodsCoupon(String callback, String pid, PrintWriter out) {
-		try {
-			CommentInfo commentInfo = new CommentInfo();
-			if (!StringUtil.isNullOrEmpty(pid)) {
-				GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid);
-				if (goodsEvaluate != null && goodsEvaluate.getComments() != null
-						&& goodsEvaluate.getComments().size() > 0) {
-					for (CommentInfo info : goodsEvaluate.getComments()) {
-						if (info != null)
-							if (CommentInfoEnum.goodsCoupon == info.getType()) {
-								commentInfo = info;
-							}
-					}
-				}
-			}
-			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(commentInfo));
-		} catch (Exception e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触"));
-			e.printStackTrace();
-		}
-	}
+	
+
+	
+
 
 	/**
 	 * 淇濆瓨澶氫釜鍟嗗搧
@@ -289,7 +338,7 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "saveMultipleGoods")
-	public void saveMultipleGoods(String callback, String pid, String videoUrl, String goodsList,
+	public void saveMultipleGoods(AdminAcceptData acceptData,String callback, String pid, String videoUrl, String goodsList,
 			HttpServletRequest request, PrintWriter out) {
 		try {
 			MultipartHttpServletRequest fileRequest = null;
@@ -303,8 +352,12 @@
 		} catch (Exception e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
 			e.printStackTrace();
+			LogHelper.errorDetailInfo(e);
+			LogHelper.test(e);
 		}
 	}
+
+	
 
 	/**
 	 * 鑾峰彇澶氫釜鍟嗗搧淇℃伅
@@ -312,7 +365,7 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "getMultipleGoods")
-	public void getMultipleGoods(String callback, String pid, PrintWriter out) {
+	public void getMultipleGoods(AdminAcceptData acceptData,String callback, String pid, PrintWriter out) {
 		try {
 			String videoUrl = "";
 			String videoPic = "";
@@ -353,19 +406,17 @@
 	 * 淇濆瓨淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
 	 * @param out
 	 */
 	@RequestMapping(value = "saveActivityPic")
-	public void saveActivityPic(String callback, String pid, ImgInfo imgInfo, HttpServletRequest request,
+	public void saveActivityPic(AdminAcceptData acceptData,String callback, String pid, ImgInfo imgInfo, String picUrls, HttpServletRequest request,
 			PrintWriter out) {
 		try {
 			MultipartHttpServletRequest fileRequest = null;
 			if (request instanceof MultipartHttpServletRequest) {
 				fileRequest = (MultipartHttpServletRequest) request;
 			}
-			goodsEvaluateService.saveActivityPic(pid, imgInfo, fileRequest);
+			goodsEvaluateService.saveActivityPic(pid, imgInfo,picUrls, fileRequest);
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
 		} catch (GoodsEvaluateException e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -379,28 +430,30 @@
 	 * 鑾峰彇淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
 	 * @param out
 	 */
 	@RequestMapping(value = "getActivityPic")
-	public void getActivityPic(String callback, String pid, PrintWriter out) {
+	public void getActivityPic(AdminAcceptData acceptData,String callback, String pid, PrintWriter out) {
 		try {
 			String videoPic = "";
 			String videoUrl = "";
-			String activityPic = "";
 			String activityUrl = "";
+			List<String> list = new ArrayList<String>();
 			GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid);
 			if (goodsEvaluate != null && goodsEvaluate.getImgList() != null && goodsEvaluate.getImgList().size() > 0) {
+				activityUrl = goodsEvaluate.getJumpLink();
+				
 				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) {
-						activityPic = imgInfo.getUrl();
-						activityUrl = imgInfo.getActivityUrl();
+					} else {
+						list.add(imgInfo.getUrl());
+						if (StringUtil.isNullOrEmpty(activityUrl) && !StringUtil.isNullOrEmpty(imgInfo.getActivityUrl())) {
+							activityUrl  = imgInfo.getActivityUrl();
+						}
 					}
 				}
 			}
@@ -408,7 +461,7 @@
 			JSONObject data = new JSONObject();
 			data.put("videoUrl", videoUrl);
 			data.put("videoPic", videoPic);
-			data.put("activityPic", activityPic);
+			data.put("listPic", list);
 			data.put("activityUrl", activityUrl);
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
 		} catch (Exception e) {
@@ -421,12 +474,10 @@
 	 * 淇濆瓨淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
 	 * @param out
 	 */
 	@RequestMapping(value = "saveSuCai")
-	public void saveSuCai(String callback, String pid, String videoUrl, String picUrls, HttpServletRequest request,
+	public void saveSuCai(AdminAcceptData acceptData,String callback, String pid, String videoUrl, String picUrls, HttpServletRequest request,
 			PrintWriter out) {
 		try {
 			MultipartHttpServletRequest fileRequest = null;
@@ -440,6 +491,8 @@
 		} catch (Exception e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("淇濆瓨澶辫触"));
 			e.printStackTrace();
+			LogHelper.errorDetailInfo(e);
+			LogHelper.test(e);
 		}
 	}
 
@@ -447,12 +500,10 @@
 	 * 鑾峰彇淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
-	 *            0a39676f138c4dcba722e321d43c4284
 	 * @param out
 	 */
 	@RequestMapping(value = "getSuCaiPic")
-	public void getSuCaiPic(String callback, String pid, PrintWriter out) {
+	public void getSuCaiPic(AdminAcceptData acceptData,String callback, String pid, PrintWriter out) {
 		try {
 			String videoUrl = "";
 			String videoPic = "";
@@ -489,16 +540,14 @@
 		}
 	}
 
-	
 	/**
 	 * 淇濆瓨淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
 	 * @param out
 	 */
 	@RequestMapping(value = "getEvaluate")
-	public void getEvaluate(String callback, String id, PrintWriter out) {
+	public void getEvaluate(AdminAcceptData acceptData,String callback, String id, PrintWriter out) {
 		try {
 			GoodsEvaluate goodsEvaluate = null;
 			if (!StringUtil.isNullOrEmpty(id)) {
@@ -528,7 +577,7 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "delete")
-	public void delete(String callback, String idArray, PrintWriter out) {
+	public void delete(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
 		try {
 			if (StringUtil.isNullOrEmpty(idArray)) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇烽�夋嫨鎿嶄綔鐨勬暟鎹�"));
@@ -557,12 +606,10 @@
 	 * @param callback
 	 * @param pageIndex
 	 * @param pageSize
-	 * @param bannerId
 	 * @param out
 	 */
 	@RequestMapping(value = "query")
-	public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
-			PrintWriter out) {
+	public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, String typeEnum, PrintWriter out) {
 		if (pageIndex == null || pageIndex < 1) {
 			pageIndex = 1;
 		}
@@ -571,7 +618,7 @@
 		}
 
 		try {
-			List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 1);
+			List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 1, typeEnum,acceptData.getSystem());
 			if (list == null || list.size() == 0) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鏁版嵁"));
 				return;
@@ -593,7 +640,7 @@
 				}
 			}
 
-			long count = goodsEvaluateService.count(key, state, 1);
+			long count = goodsEvaluateService.count(key, state, 1, typeEnum,acceptData.getSystem());
 
 			int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
 			PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
@@ -614,11 +661,10 @@
 	 * @param callback
 	 * @param pageIndex
 	 * @param pageSize
-	 * @param bannerId
 	 * @param out
 	 */
 	@RequestMapping(value = "querySuCai")
-	public void querySuCai(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
+	public void querySuCai(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
 			PrintWriter out) {
 		if (pageIndex == null || pageIndex < 1) {
 			pageIndex = 1;
@@ -628,7 +674,7 @@
 		}
 
 		try {
-			List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 2);
+			List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 2, null,acceptData.getSystem());
 			if (list == null || list.size() == 0) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鏁版嵁"));
 				return;
@@ -650,7 +696,7 @@
 				}
 			}
 
-			long count = goodsEvaluateService.count(key, state, 2);
+			long count = goodsEvaluateService.count(key, state, 2, null,acceptData.getSystem());
 
 			int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
 			PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
@@ -669,26 +715,43 @@
 	 * 鏍规嵁閾炬帴鏌ヨ鍟嗗搧
 	 * 
 	 * @param callback
-	 * @param text
 	 * @param out
 	 */
 	@RequestMapping(value = "getGoodsByUrl")
-	public void getGoodsByUrl(String callback, String link, PrintWriter out) {
+	public void getGoodsByUrl(AdminAcceptData acceptData,String callback, String link, PrintWriter out) {
 		try {
-			CommonGoods commonGoods = clipboardAnalysisManager.parseLink(link);
+			//CommonGoods commonGoods = clipboardAnalysisManager.parseLink(link);
+			// 鏍规嵁鍙d护閾炬帴鑾峰彇鍟嗗搧
+			 getGoods(link);
+			 
+			 CommonGoods commonGoods = getCommonGoods();
 			if (commonGoods == null) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏈壘鍒拌鍟嗗搧"));
 				return;
 			}
 			GoodsDetailVO goodsDetail = null;
-			BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-			BigDecimal shareRate = hongBaoManageService.getShareRate();
-			BigDecimal vipFanLiRate = hongBaoManageService.getVIPFanLiRate();
-			ConfigParamsDTO params = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE, vipFanLiRate);
+			BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(acceptData.getSystem());
+			BigDecimal shareRate = hongBaoManageService.getShareRate(acceptData.getSystem());
+			BigDecimal vipFanLiRate = hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem());
+			GoodsMoneyConfigParamsDTO params = new GoodsMoneyConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE, vipFanLiRate);
 
 			if (commonGoods.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) {
 				try {
 					TaoBaoGoodsBrief goodsBrief = redisManager.getTaoBaoGoodsBrief(commonGoods.getGoodsId());
+					String pictUrlWhite = goodsBrief.getPictUrlWhite();
+					if (!StringUtil.isNullOrEmpty(pictUrlWhite)) {
+						goodsBrief.setPictUrl(pictUrlWhite);
+
+						List<String> picList = new ArrayList<>();
+						picList.add(pictUrlWhite);
+
+						List<String> imgList = goodsBrief.getImgList();
+						if (imgList != null) {
+							picList.addAll(imgList);
+						}
+						goodsBrief.setImgList(picList);
+					}
+
 					goodsDetail = GoodsDetailVOFactory.convertTaoBao(goodsBrief, params);
 				} catch (TaobaoGoodsDownException e) {
 					JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇ュ晢鍝佸凡涓嬫灦"));
@@ -716,18 +779,47 @@
 		} catch (Exception e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鑾峰彇澶辫触"));
 			e.printStackTrace();
+		} finally {
+			setCommonGoods(null);
 		}
+		
+	}
+
+	private void getGoods(String text) {
+		Long uid = Constant.LINK_TOKEN_VERIFY_UID;
+		clipboardAnalysisManager.parse("android", "55", text, uid, new IClipboardAnalysisResult() {
+			@Override
+			public void onResult(GoodsDocParseResultVO result) {}
+
+			@Override
+			public void onResult(String result) {}
+
+			@Override
+			public void onResult(CommonGoods goods) {
+				setCommonGoods(goods);
+			}
+
+			@Override
+			public void onResult(TokenVO tokenVO) {
+			}
+			@Override
+			public void none() {
+			}
+
+			@Override
+			public void needLogin(String msg) {
+			}
+		});
 	}
 
 	/**
 	 * 淇濆瓨淇℃伅
 	 * 
 	 * @param callback
-	 * @param special
 	 * @param out
 	 */
 	@RequestMapping(value = "saveComment")
-	public void saveComment(String callback, String pid, CommentInfo commentInfo, PrintWriter out) {
+	public void saveComment(AdminAcceptData acceptData,String callback, String pid, CommentInfo commentInfo, PrintWriter out) {
 		try {
 			goodsEvaluateService.saveComment(pid, commentInfo);
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
@@ -747,7 +839,7 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "deleteComment")
-	public void deleteComment(String callback, String pid, String idArray, PrintWriter out) {
+	public void deleteComment(AdminAcceptData acceptData,String callback, String pid, String idArray, PrintWriter out) {
 		try {
 			if (StringUtil.isNullOrEmpty(idArray)) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇烽�夋嫨鎿嶄綔鐨勬暟鎹�"));
@@ -776,11 +868,10 @@
 	 * 鍒犻櫎淇℃伅
 	 * 
 	 * @param callback
-	 * @param idArray
 	 * @param out
 	 */
 	@RequestMapping(value = "release")
-	public void release(String callback, String id, PrintWriter out) {
+	public void release(AdminAcceptData acceptData,String callback, String id, PrintWriter out) {
 		try {
 			if (StringUtil.isNullOrEmpty(id)) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇烽�夋嫨鎿嶄綔鐨勬暟鎹�"));
@@ -801,13 +892,10 @@
 	 * 鏌ヨ鍝佽
 	 * 
 	 * @param callback
-	 * @param pageIndex
-	 * @param pageSize
-	 * @param bannerId
 	 * @param out
 	 */
 	@RequestMapping(value = "queryComment")
-	public void queryComment(String callback, String pid, PrintWriter out) {
+	public void queryComment(AdminAcceptData acceptData,String callback, String pid, PrintWriter out) {
 		GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid);
 		if (goodsEvaluate == null) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇ュ姩鎬佷俊鎭凡涓嶅瓨鍦�"));
@@ -835,4 +923,14 @@
 		}
 	}
 
+	public CommonGoods getCommonGoods() {
+		return commonGoods;
+	}
+
+	public void setCommonGoods(CommonGoods commonGoods) {
+		this.commonGoods = commonGoods;
+	}
+	
+	
+
 }

--
Gitblit v1.8.0