| | |
| | | } |
| | | } |
| | | |
| | | String activityUrl = imgInfo.getActivityUrl(); |
| | | // 编辑图片 |
| | | List<ImgInfo> tempList = new ArrayList<ImgInfo>(); |
| | | if (!StringUtil.isNullOrEmpty(picUrls)) { |
| | |
| | | if (listOld != null) { |
| | | for (ImgInfo info: listOld) { |
| | | if (info.getUrl().equals(picLink)) { |
| | | info.setActivityUrl(activityUrl); |
| | | tempList.add(info); |
| | | break; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 上传文件替换 |
| | | if (fileRequest != null) { |
| | |
| | | imgInfo0.setType(ImgEnum.img); |
| | | imgInfo0.setW(info.getW()); |
| | | imgInfo0.setH(info.getH()); |
| | | |
| | | imgInfo0.setActivityUrl(activityUrl); |
| | | if (i < tempList.size()) { |
| | | tempList.set(i, imgInfo0); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | resultObj.setJumpLink(imgInfo.getActivityUrl()); |
| | | resultObj.setJumpLink(activityUrl); |
| | | resultObj.setLineNum(lineNum); |
| | | resultObj.setImgList(listImg); |
| | | goodsEvaluateDao.save(resultObj); |
| | |
| | | } |
| | | |
| | | // 按照发布显示时间段起始时间为准。 |
| | | 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) { |