admin
2020-02-23 b59fef5c00b15fdfdfa9d4be26e5bf6b41c75458
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -516,10 +516,11 @@
      data.put("words", configService.get(ConfigKeyEnum.articleHotWords.getKey()));
      out.print(JsonUtil.loadTrueResult(data));
   }
   //发圈测试
   @RequestMapping(value = "evaluate", method = RequestMethod.POST)
   public void evaluate(AcceptData acceptData, PrintWriter out) {
      out.print(configService.get("test"));
   // //发圈测试
   public void evaluateTest(AcceptData acceptData, PrintWriter out) {
      JSONObject data = JSONObject.fromObject(configService.get("test"));
      out.print(data.toString());
   }
   /**
@@ -531,6 +532,11 @@
    */
   @RequestMapping(value = "evaluate", method = RequestMethod.POST)
   public void evaluate(AcceptData acceptData, Integer page, PrintWriter out) {
      if ("1".equalsIgnoreCase(configService.get("test-open"))) {
         evaluateTest(acceptData, out);
         return;
      }
      long cid = 1;
      long subId = 1;
      List<DynamicInfo> listd = dynamicInfoService.queryV2(2, 74, (page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,
@@ -541,7 +547,10 @@
      List<GoodsEvaluate> list = new ArrayList<>();
      int p = 0;
      for (DynamicInfo info : listd) {
         p++;
         GoodsEvaluate goodsEvaluate = new GoodsEvaluate();
         goodsEvaluate.setId(info.getId());
         ActivityUser user = info.getUser();
@@ -555,6 +564,7 @@
         List<ImgInfo> imgList = new ArrayList<>();
         int i = 0;
         for (GoodsPicture goodsPicture : imgs) {
            ImgInfo imgInfo = new ImgInfo();
            GoodsDetailVO goodsVO = goodsPicture.getGoodsVO();
@@ -594,6 +604,29 @@
//            i++;
            imgList.add(imgInfo);
         }
         if (p == 1) {
            ImgInfo imgInfo = new ImgInfo();
            imgInfo.setLarge(true);
            imgInfo.setType(ImgEnum.img);
            imgInfo.setUrl(
                  "http://ec-1255749512.file.myqcloud.com/img/invite/new/10ea86eb8db94f7cbb5e68864480d5fe.jpg");
            imgInfo.setH(1334);
            imgInfo.setW(750);
            imgList.add(0, imgInfo);
            imgInfo = new ImgInfo();
            imgInfo.setType(ImgEnum.video);
            imgInfo.setLarge(true);
            imgInfo.setUrl(
                  "http://ec-1255749512.file.myqcloud.com/img/invite/new/10ea86eb8db94f7cbb5e68864480d5fe.jpg");
            imgInfo.setH(315);
            imgInfo.setW(560);
            imgInfo.setUrl("https://zzya.beva.cn/img/Fr56bczo_F8NvroeG54jLH5ey0aC.jpg");
            imgInfo.setVideoUrl("http://img.flqapp.com/resource/video.mp4");
            imgList.add(0, imgInfo);
         }
         goodsEvaluate.setImgList(imgList);
@@ -642,7 +675,9 @@
         list.add(goodsEvaluate);
      }
//      List<GoodsEvaluate> list = goodsEvaluateService.queryValidEvaluateCache((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE);
      // List<GoodsEvaluate> list =
      // goodsEvaluateService.queryValidEvaluateCache((page - 1) *
      // Constant.PAGE_SIZE, Constant.PAGE_SIZE);
//      if (list == null) {
//         list = new ArrayList<>();
//      }
@@ -729,7 +764,8 @@
   }
   @RequestMapping(value = "evaluateShare", method = RequestMethod.POST)
   public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, Long goodsId, Integer goodsType, PrintWriter out) {
   public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, Long goodsId, Integer goodsType,
         PrintWriter out) {
      if (uid == null) {
         out.print(JsonUtil.loadFalseResult("用户未登录"));
         return;
@@ -796,7 +832,8 @@
         }
         
         if (type == 1) {
            if (goodsVO.getGoodsId().longValue() == goodsId.longValue() && goodsVO.getGoodsType() == goodsType.intValue()) {
            if (goodsVO.getGoodsId().longValue() == goodsId.longValue()
                  && goodsVO.getGoodsType() == goodsType.intValue()) {
               String jumpLink = getJumpLink(goodsVO, user);
               if (!StringUtil.isNullOrEmpty(jumpLink)) {
                  list.add(jumpLink);
@@ -856,7 +893,8 @@
         jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "",
               user.getId() + "");
      } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_PDD) {
         jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsVO.getGoodsId(), PinDuoDuoApiUtil.PID_SHARE + "", user.getId() + "");
         jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsVO.getGoodsId(), PinDuoDuoApiUtil.PID_SHARE + "",
               user.getId() + "");
      }
      FileUploadResult uploadResult = qrCodeService.drawGoodsPoster(jumpLink, user.getPortrait(), goodsVO);
      if (uploadResult != null) {
@@ -865,12 +903,13 @@
      return null;
   }
   
   /**
    *  评论复制
    *
    * @param acceptData
    * @param id
    * @param cid 评论id
    * @param cid
    *            评论id
    * @param out
    */
   @RequestMapping(value = "evaluateComment", method = RequestMethod.POST)