yujian
2020-05-17 de4110d3d3944ffcd797fd8c43f0d455cc731f84
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -1103,6 +1103,7 @@
         }
      }
 
      String activityUrl = imgInfo.getActivityUrl();
      // 编辑图片
      List<ImgInfo> tempList = new ArrayList<ImgInfo>();
      if (!StringUtil.isNullOrEmpty(picUrls)) {
@@ -1114,6 +1115,7 @@
                  if (listOld != null) {
                     for (ImgInfo info: listOld) {
                        if (info.getUrl().equals(picLink)) {
                           info.setActivityUrl(activityUrl);
                           tempList.add(info);
                           break;
                        }
@@ -1123,6 +1125,7 @@
            }
         }
      }
      // 上传文件替换
      if (fileRequest != null) {
@@ -1139,7 +1142,7 @@
               imgInfo0.setType(ImgEnum.img);
               imgInfo0.setW(info.getW());
               imgInfo0.setH(info.getH());
               imgInfo0.setActivityUrl(activityUrl);
               if (i < tempList.size()) {
                  tempList.set(i, imgInfo0);
               } else {
@@ -1187,7 +1190,7 @@
         }
      }
      
      resultObj.setJumpLink(imgInfo.getActivityUrl());
      resultObj.setJumpLink(activityUrl);
      resultObj.setLineNum(lineNum);
      resultObj.setImgList(listImg);
      goodsEvaluateDao.save(resultObj);
@@ -1626,7 +1629,47 @@
         }
         // 按照发布显示时间段起始时间为准。
         goodsEvaluate.setPublishTime(goodsEvaluate.getStartTime());
         evaluateNew.setPublishTime(evaluateNew.getStartTime());
         // 活动链接跳转过渡页
         EvaluateEnum evaluateEnum = evaluateNew.getType();
         if (evaluateEnum != null && evaluateEnum == EvaluateEnum.activity) {
            if (evaluateNew.getComments() != null && evaluateNew.getComments().size() > 0) {
               String jumpLink = configService.get(ConfigKeyEnum.activityDetailLink.getKey()) + "?type=%s&id=%s";
               jumpLink = String.format(jumpLink, "circle", evaluateNew.getId());
               if (!StringUtil.isNullOrEmpty(evaluateNew.getJumpLink())) {
                  evaluateNew.setJumpLink(jumpLink);
               }
               List<ImgInfo> imgListNew = new ArrayList<>();
               List<ImgInfo> imgList = evaluateNew.getImgList();
               if (imgList != null && imgList.size() > 0) {
                  for (ImgInfo imgInfo: imgList) {
                     if (imgInfo.getType() != ImgEnum.img || imgInfo.getType() == ImgEnum.activity) {
                        ImgInfo imgInfoNew = new ImgInfo();
                        try {
                           PropertyUtils.copyProperties(imgInfoNew, imgInfo);
                        } catch (Exception e) {
                           e.printStackTrace();
                           continue;
                        }
                        if (!StringUtil.isNullOrEmpty(imgInfoNew.getActivityUrl())) {
                           imgInfoNew.setActivityUrl(jumpLink);
                        }
                        imgListNew.add(imgInfoNew);
                        continue;
                     }
                     imgListNew.add(imgInfo);
                  }
               }
               evaluateNew.setImgList(imgListNew);
            }
         }
         List<CommentInfo> comments = evaluateNew.getComments();
         if (comments != null && comments.size() > 0) {