| | |
| | | } |
| | | |
| | | /** |
| | | * 获取信息 |
| | | * |
| | | * @param callback |
| | | * @param special |
| | | * 0a39676f138c4dcba722e321d43c4284 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getSuCaiPic") |
| | | public void getSuCaiPic(String callback, String pid, PrintWriter out) { |
| | | try { |
| | | String videoUrl = ""; |
| | | String videoPic = ""; |
| | | String activityUrl = ""; |
| | | List<String> list = new ArrayList<String>(); |
| | | if (!StringUtil.isNullOrEmpty(pid)) { |
| | | GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid); |
| | | if (goodsEvaluate != null && goodsEvaluate.getImgList() != null |
| | | && goodsEvaluate.getImgList().size() > 0) { |
| | | List<ImgInfo> imgList = goodsEvaluate.getImgList(); |
| | | for (ImgInfo imgInfo : imgList) { |
| | | ImgEnum type = imgInfo.getType(); |
| | | if (type == ImgEnum.video) { |
| | | videoPic = imgInfo.getUrl(); |
| | | videoUrl = imgInfo.getVideoUrl(); |
| | | } else if (type == ImgEnum.activity) { |
| | | activityUrl = imgInfo.getActivityPic(); |
| | | } else if (type == ImgEnum.img) { |
| | | list.add(imgInfo.getUrl()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("activityUrl", activityUrl); |
| | | data.put("videoUrl", videoUrl); |
| | | data.put("videoPic", videoPic); |
| | | data.put("list", list); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存信息 |
| | | * |
| | | * @param callback |