| | |
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | | import com.yeshi.fanli.vo.goods.OtherInfo;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.search.SearchKeyVO;
|
| | | import com.yeshi.fanli.vo.tlj.ReduceHongBao;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
| | | 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));
|
| | |
|
| | |
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | root.put("scoreExchange", getScoreExchangeInfo(acceptData));
|
| | |
|
| | | root.put("searchDiscovery", getSearchDiscoveryInfo(acceptData));
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "获取数据失败"));
|
| | |
| | | }
|
| | |
|
| | | private JSONObject getSpikeGoodsContent(AcceptData acceptData) {
|
| | | List<String> dtoList = DaTaoKeUtil.getDingDongQiangTime();
|
| | | List<String> dtoList = DaTaoKeUtil.getDingDongQiangTime();
|
| | | long nowTime = System.currentTimeMillis();
|
| | | int dateNum = Integer.parseInt(TimeUtil.getGernalTime(nowTime, "ddHH"));
|
| | | String timeStr = null;
|
| | | int nextPos = 0;
|
| | | for (int i = 0; i < dtoList.size(); i++) {
|
| | | if (dateNum <= Integer.parseInt(dtoList.get(i))) {
|
| | | for (int i = 0; i < dtoList.size() - 1; i++) {
|
| | | if (dateNum >= Integer.parseInt(dtoList.get(i)) && dateNum < Integer.parseInt(dtoList.get(i + 1))) {
|
| | | timeStr = dtoList.get(i);
|
| | | nextPos = i + 1;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (timeStr == null)
|
| | | timeStr = dtoList.get(dtoList.size() - 1);
|
| | |
|
| | | long nextTime = nowTime + 1000 * 60 * 60L;// 默认为1小时
|
| | | if (nextPos < dtoList.size()) {
|
| | | nextTime = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(nowTime, "MM") + dtoList.get(nextPos),
|
| | | "MMddHH");
|
| | | nextTime = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(nowTime, "yyyyMM") + dtoList.get(nextPos),
|
| | | "yyyyMMddHH");
|
| | | }
|
| | |
|
| | | JSONArray array = null;
|
| | |
| | | root.put("tagImg", "http://img.flqapp.com/resource/score_exchange_tag.png");
|
| | | return root;
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 金币兑换信息
|
| | | * |
| | | * @param acceptData
|
| | | * @return
|
| | | */
|
| | | private JSONObject getSearchDiscoveryInfo(AcceptData acceptData) {
|
| | | JSONArray array = new JSONArray();
|
| | | String keys = configService.get("search_discovery_keys");
|
| | | if (!StringUtil.isNullOrEmpty(keys)) {
|
| | | JSONArray arrayKeys = JSONArray.fromObject(keys);
|
| | | for (int i = 0; i < arrayKeys.size(); i++) {
|
| | | String name = arrayKeys.get(i).toString();
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("searchKey", name);
|
| | | |
| | | SearchKeyVO keyVO = new SearchKeyVO();
|
| | | keyVO.setName(name);
|
| | | keyVO.setParams(params.toString());
|
| | | array.add(keyVO);
|
| | | }
|
| | | }
|
| | | |
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("search_discovery_h5_link"));
|
| | | |
| | | JSONObject root = new JSONObject();
|
| | | root.put("picture", "http://img.flqapp.com/resource/home_search_found.png");
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetailV2Service.getByTypeCache("web",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())));
|
| | | |
| | | root.put("jumpResult", jumpDetailV2Service.getByTypeCache("search_goods_result",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())));
|
| | | root.put("keyList", array);
|
| | | return root;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 首页底部商品推荐
|