| | |
| | | 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, 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) { |
| | |
| | | // 单品 |
| | | if (goodsEvaluate.getType() == EvaluateEnum.single) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (type == 3 && imgInfo.getType() == ImgEnum.video) |
| | | if (imgInfo.getType() == ImgEnum.video) |
| | | continue; |
| | | |
| | | GoodsDetailVO goodsVO = imgInfo.getGoodsVO(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void saveSingleGoods(String pid, Long goodsId, Integer goodsType, String videoUrl, Integer picNum, |
| | | public String saveSingleGoods(String pid, Long goodsId, Integer goodsType, String videoUrl, Integer picNum, |
| | | String picUrls, MultipartHttpServletRequest fileRequest) throws GoodsEvaluateException, Exception { |
| | | if (StringUtil.isNullOrEmpty(pid)) { |
| | | throw new GoodsEvaluateException(1, "请保存第一部分信息"); |
| | |
| | | * = false; } |
| | | */ |
| | | |
| | | String commentText = ""; |
| | | if (addComment) { |
| | | String commentText = ""; |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(1L, goodsId, "0"); |
| | | String template = configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey()); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return commentText; |
| | | } |
| | | |
| | | private String createTokenAndLink(GoodsDetailVO goodsDetailVO) throws Exception { |
| | |
| | | imgInfo0.setUrl(picLink); |
| | | imgInfo0.setUrlHD(picLink); |
| | | imgInfo0.setType(ImgEnum.img); |
| | | imgVideo.setW(1); |
| | | imgVideo.setH(1); |
| | | imgInfo0.setW(1); |
| | | imgInfo0.setH(1); |
| | | listImg.add(imgInfo0); |
| | | continue; |
| | | } |
| | |
| | | * @throws GoodsEvaluateException |
| | | * @throws Exception |
| | | */ |
| | | public void saveSingleGoods(String pid, Long goodsId, Integer goodsType, String videoUrl, Integer picNum, String picUrls, |
| | | public String saveSingleGoods(String pid, Long goodsId, Integer goodsType, String videoUrl, Integer picNum, String picUrls, |
| | | MultipartHttpServletRequest fileRequest) throws GoodsEvaluateException, Exception; |
| | | |
| | | /** |