| | |
| | | import com.yeshi.fanli.service.inter.homemodule.DeviceSexService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.jd.JDGoodsService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityFlashSaleService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.pdd.PDDGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | |
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | root.put("scoreExchange", getScoreExchangeInfo(acceptData));
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_0(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | root.put("searchDiscovery", getSearchDiscoveryInfo(acceptData));
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | |
| | | for (int i = 0; i < arrayKeys.size(); i++) {
|
| | | String name = arrayKeys.get(i).toString();
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("searchKey", name);
|
| | | params.put("content", name);
|
| | |
|
| | | SearchKeyVO keyVO = new SearchKeyVO();
|
| | | keyVO.setName(name);
|
| | |
| | | */
|
| | | @RequestMapping(value = "getSpecialChannelActivity")
|
| | | public void getSpecialChannelActivity(AcceptData acceptData, Long uid, String callback, PrintWriter out) {
|
| | | List<Special> list = specialService.listByPlaceKey("special_channel_activity");
|
| | |
|
| | | int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
|
| | |
|
| | | List<Special> list = specialService.listByPlaceKey("special_channel_activity", platformCode,
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | |
|
| | | long time = System.currentTimeMillis();
|
| | | // 删除尚未启用的过期的
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Special special = list.get(i);
|
| | | if (special.getState() == 1L) {
|
| | | list.remove(i--);
|
| | | }else{
|
| | | } else {
|
| | | if (special.getStartTime() != null && special.getEndTime() != null)
|
| | | special.setTimeTask(true);
|
| | | else
|
| | | special.setTimeTask(false);
|
| | |
|
| | | if (special.isTimeTask()) {
|
| | | if (time < special.getStartTime().getTime() || time > special.getEndTime().getTime()) {
|
| | | list.remove(i--);
|
| | | } else// 设置倒计时
|
| | | {
|
| | | special.setCountDownTime((special.getEndTime().getTime() - time) / 1000);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
|
| | | Gson gson = gsonBuilder.create();
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | | data.put("count", list.size());
|
| | | data.put("list", gson.toJson(list));
|
| | | if (!StringUtil.isNullOrEmpty(callback)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|