From ee5c8055b1c0dd7c67a9025a76b10bd287c93d9a Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 15 四月 2020 09:52:27 +0800 Subject: [PATCH] 资金明细增加团队分红 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java | 221 ++++++++++++++++++++++--------------------------------- 1 files changed, 89 insertions(+), 132 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 e5108b2..d15f34d 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 @@ -19,6 +19,7 @@ import com.google.gson.reflect.TypeToken; import com.yeshi.fanli.dto.ConfigParamsDTO; 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; @@ -27,7 +28,6 @@ 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.system.ConfigKeyEnum; import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief; import com.yeshi.fanli.exception.dynamic.GoodsEvaluateException; import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException; @@ -41,13 +41,9 @@ import com.yeshi.fanli.util.RedisManager; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.TimeUtil; -import com.yeshi.fanli.util.VersionUtil; import com.yeshi.fanli.util.cache.JDGoodsCacheUtil; import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil; -import com.yeshi.fanli.util.factory.CommonGoodsFactory; import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory; -import com.yeshi.fanli.util.taobao.TaoKeApiUtil; -import com.yeshi.fanli.vo.common.JumpDetailContentVO; import com.yeshi.fanli.vo.goods.GoodsDetailVO; import com.yeshi.fanli.vo.msg.TokenVO; import com.yeshi.fanli.vo.search.GoodsDocParseResultVO; @@ -139,47 +135,7 @@ } } - /** - * 淇濆瓨淇℃伅 - * - * @param callback - * @param special 0a39676f138c4dcba722e321d43c4284 - * @param out - */ - @RequestMapping(value = "saveGoodsCoupon") - public void saveGoodsCoupon(String callback, String pid, String content, PrintWriter out) { - try { - goodsEvaluateService.saveGoodsCoupon(pid, content); - 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 pid - * @param kind : 1鍗曞搧 2澶氬搧 3娲诲姩 - * @param out - */ - @RequestMapping(value = "saveCurrencyCoupon") - public void saveCurrencyCoupon(String callback, String pid, int kind, CommentInfo commentInfo, PrintWriter out) { - try { - goodsEvaluateService.saveCurrencyCoupon(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(); - } - } - + /** * 鑾峰彇淇℃伅 * @@ -231,91 +187,7 @@ e.printStackTrace(); } } - - /** - * 鑾峰彇淇℃伅 - * - * @param callback - * @param special 0a39676f138c4dcba722e321d43c4284 - * @param out - */ - @RequestMapping(value = "getCurrencyCoupon") - public void getCurrencyCoupon(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.currencyCoupon == info.getTypeEnum()) { - commentInfo = info; - } - } - } - } - JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(commentInfo)); - } catch (Exception e) { - JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触")); - 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.getTypeEnum()) { - commentInfo = info; - } - } - } - } - JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(commentInfo)); - } catch (Exception e) { - JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触")); - e.printStackTrace(); - } - } - - /** - * 淇濆瓨澶氫釜鍟嗗搧 - * - * @param out - */ - @RequestMapping(value = "saveMultipleGoods") - public void saveMultipleGoods(String callback, String pid, String videoUrl, String goodsList, - HttpServletRequest request, PrintWriter out) { - try { - MultipartHttpServletRequest fileRequest = null; - if (request instanceof MultipartHttpServletRequest) { - fileRequest = (MultipartHttpServletRequest) request; - } - goodsEvaluateService.saveMultipleGoods(pid, videoUrl, goodsList, fileRequest); - 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(); - LogHelper.errorDetailInfo(e); - LogHelper.test(e); - } - } + /** * @@ -379,6 +251,91 @@ e.printStackTrace(); } } + + /** + * 淇濆瓨淇℃伅 + * + * @param callback + * @param pid + * @param kind : 1鍗曞搧 2澶氬搧 3娲诲姩 + * @param out + */ + @RequestMapping(value = "saveCurrencyCoupon") + public void saveCurrencyCoupon(String callback, String pid, int kind, CommentInfo commentInfo, PrintWriter out) { + try { + goodsEvaluateService.saveCurrencyCoupon(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) { + 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.currencyCoupon == info.getTypeEnum()) { + commentInfo = info; + } + } + } + } + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(commentInfo)); + } catch (Exception e) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触")); + e.printStackTrace(); + } + } + + + + + + + + /** + * 淇濆瓨澶氫釜鍟嗗搧 + * + * @param out + */ + @RequestMapping(value = "saveMultipleGoods") + public void saveMultipleGoods(String callback, String pid, String videoUrl, String goodsList, + HttpServletRequest request, PrintWriter out) { + try { + MultipartHttpServletRequest fileRequest = null; + if (request instanceof MultipartHttpServletRequest) { + fileRequest = (MultipartHttpServletRequest) request; + } + goodsEvaluateService.saveMultipleGoods(pid, videoUrl, goodsList, fileRequest); + 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(); + LogHelper.errorDetailInfo(e); + LogHelper.test(e); + } + } + + /** * 鑾峰彇澶氫釜鍟嗗搧淇℃伅 @@ -758,7 +715,7 @@ GoodsDetailVO goodsDetail = null; BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); - BigDecimal vipFanLiRate = hongBaoManageService.getVIPFanLiRate(); + BigDecimal vipFanLiRate = hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP); ConfigParamsDTO params = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE, vipFanLiRate); if (commonGoods.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { -- Gitblit v1.8.0