| | |
| | | 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());
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @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,
|
| | |
| | |
|
| | | 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();
|
| | |
| | |
|
| | | List<ImgInfo> imgList = new ArrayList<>();
|
| | | int i = 0;
|
| | |
|
| | | for (GoodsPicture goodsPicture : imgs) {
|
| | | ImgInfo imgInfo = new ImgInfo();
|
| | | GoodsDetailVO goodsVO = goodsPicture.getGoodsVO();
|
| | |
| | | // 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);
|
| | |
| | | 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<>();
|
| | | // }
|
| | |
| | | }
|
| | |
|
| | | @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;
|
| | |
| | | }
|
| | |
|
| | | 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);
|
| | |
| | | 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) {
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 评论复制
|
| | | * |
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param cid 评论id
|
| | | * @param cid
|
| | | * 评论id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "evaluateComment", method = RequestMethod.POST)
|