| | |
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.admin.InviteGetMoney;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.config.InviteGetMoneyService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemClientParamsService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.service.inter.user.QrCodeService;
|
| | | import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
|
| | | import com.yeshi.fanli.service.inter.user.UserRankingsService;
|
| | |
| | | @Resource
|
| | | private UserRankingsService userRankingsService;
|
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | @Resource
|
| | | private SwiperPictureService swiperPictureService;
|
| | |
|
| | | @RequestMapping(value = "/inviteGetMoney", method = RequestMethod.POST)
|
| | | public void everyDayTaskList(AcceptData acceptData, int pageIndex, PrintWriter out, String uid)
|
| | | throws NotExistObjectException {
|
| | |
| | |
|
| | | List<InviteGetMoney> inviteGetMoneyList = userRankingsService.getRank(0, 5);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | com.alibaba.fastjson.JSONObject data = new com.alibaba.fastjson.JSONObject();
|
| | | data.put("pageEntity", JsonUtil.getSimpleGsonWithDate().toJson(pageEntity));
|
| | | data.put("everyDayTaskList", new JSONArray());
|
| | | data.put("inviteGetMoneyList", JsonUtil.getSimpleGsonWithDate().toJson(inviteGetMoneyList));
|
| | | data.put("inviteGetMoneyList",
|
| | | JSONArray.fromObject(JsonUtil.getSimpleGsonWithDate().toJson(inviteGetMoneyList)));
|
| | | if (uid.equals("0") || uid == null) {
|
| | | data.put("myTeam", "---");
|
| | | data.put("moneyToday", "---");
|
| | |
| | |
|
| | | BigDecimal moneyLastMonth = inviteGetMoneyService.getMoneyLastMonth(uid + "");
|
| | |
|
| | | data.put("moneyToday", moneyToday.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | data.put("moneyMonth", moneyMonth.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | data.put("moneyLastMonth", moneyLastMonth);
|
| | | data.put("moneyToday", moneyToday.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("moneyMonth", moneyMonth.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("moneyLastMonth", moneyLastMonth.toString());
|
| | | }
|
| | |
|
| | | // 活动规则
|
| | |
| | | data.put("activityRules", valueBr);
|
| | | data.put("inviteList", String.format("http://%s/%s/client/share/friends_new.html",
|
| | | Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName()));
|
| | | out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功"));
|
| | | try {
|
| | | List<SwiperPicture> pictureList = swiperPictureService.getByBannerCard("invite_top_banner");
|
| | | if (pictureList != null && pictureList.size() > 0) {
|
| | | SwiperPicture picture = pictureList.get(0);
|
| | | com.alibaba.fastjson.JSONObject pictureJson = new com.alibaba.fastjson.JSONObject();
|
| | | pictureJson.put("src", picture.getSrc());
|
| | | pictureJson.put("jumpDetail", picture.getJumpDetail());
|
| | | pictureJson.put("params", picture.getParams());
|
| | | data.put("topBanner", pictureJson);
|
| | | }
|
| | |
|
| | | } catch (SwiperPictureException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | com.alibaba.fastjson.JSONObject root = new com.alibaba.fastjson.JSONObject();
|
| | | root.put("code", 0);
|
| | | root.put("data", data);
|
| | |
|
| | | out.print(JsonUtil.loadTrue(0, root, "成功"));
|
| | | }
|
| | |
|
| | | /**
|