| | |
| | | JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex);
|
| | |
|
| | | // 2、顶部轮播图
|
| | | List<SwiperPicture> topPicList = swiperPictureService.getByBannerCard("index_top");
|
| | | if (topPicList == null) {
|
| | | topPicList = new ArrayList<SwiperPicture>();
|
| | | List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCard("index_top");
|
| | | List<SwiperPicture> topPicList = new ArrayList<>();
|
| | | if (oldtopPicList != null && oldtopPicList.size() > 0)
|
| | | topPicList.addAll(oldtopPicList);
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | | SwiperPicture notifyReName = swiperPictureService.selectByPrimaryKey(162L);
|
| | | if (notifyReName != null)
|
| | | topPicList.add(0, notifyReName);
|
| | | }
|
| | |
|
| | | root.put("topPicList", JsonUtil.getApiCommonGson().toJson(topPicList));
|
| | |
|
| | | // 3、邀请有奖
|
| | |
| | | }
|
| | |
|
| | | root.put("spikeGoods", getSpikeGoodsContent(acceptData));
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | root.put("scoreExchange", getScoreExchangeInfo(acceptData));
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | } catch (Exception e) {
|
| | |
| | | Long endTime = nextTime.getTimeInMillis() - java.lang.System.currentTimeMillis();
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("time", nextTime.getTimeInMillis());
|
| | | root.put("endTime", endTime > 0 ? endTime : 0);
|
| | | root.put("listgoods", array);
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | root.put("time", nextTime.getTimeInMillis());
|
| | | root.put("endTime", endTime > 0 ? endTime : 0);
|
| | | JSONArray imgArray = new JSONArray();
|
| | | if (array != null)
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | imgArray.add(array.optJSONObject(i).optJSONObject("goods").optString("picUrl"));
|
| | | }
|
| | | root.put("imgList", imgArray);
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link"));
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetail);
|
| | | root.put("name", "限时秒杀");
|
| | | root.put("desc", "整点更新,好物抢购");
|
| | | } else {
|
| | | root.put("time", nextTime.getTimeInMillis());
|
| | | root.put("endTime", endTime > 0 ? endTime : 0);
|
| | | root.put("listgoods", array);
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link"));
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetail);
|
| | | }
|
| | |
|
| | | return root;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 金币兑换信息
|
| | | * |
| | | * @param acceptData
|
| | | * @return
|
| | | */
|
| | | private JSONObject getScoreExchangeInfo(AcceptData acceptData) {
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | JSONArray array = new JSONArray();
|
| | | array.add(
|
| | | "http://img.flqapp.com/resource/integral/integral_home_icon_2.png");
|
| | | array.add(
|
| | | "http://img.flqapp.com/resource/integral/integral_home_icon_1.png");
|
| | | root.put("imgList", array);
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link"));
|
| | |
|
| | | params.put("balanceMore", true);
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetail);
|
| | | root.put("jumpDetail", jumpDetailV2Service.getByTypeCache("integralExchange",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())));
|
| | |
|
| | | root.put("name", "金币兑换");
|
| | | root.put("desc", "每日签到,惊喜不停");
|
| | | root.put("tagImg", "http://img.flqapp.com/resource/score_exchange_tag.png");
|
| | | return root;
|
| | | }
|
| | |
|