| | |
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.UserInviteUtil;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackDetailVO;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackGiveVO;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinInviteVO;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinProgressVO;
|
| | |
|
| | |
| | | data.put("extractMax", redPackConfigService.getValueByKey("extract_money_max"));
|
| | | data.put("extractBanlenMin", redPackConfigService.getValueByKey("extract_banlen_min"));
|
| | | data.put("extractDesc", "注:3个工作日内完成审核,红包提现成功后将会进入到余额。");
|
| | |
|
| | | data.put("giveTotal", redPackGiveRecordService.countGiveList(uid));
|
| | | data.put("useLink", redPackConfigService.getValueByKey("use_link"));
|
| | | data.put("winLink", redPackConfigService.getValueByKey("invite_win_redpack_link"));
|
| | |
|
| | | data.put("todayWin", todayWin.setScale(2).toString());
|
| | | data.put("yesterdayWin", yesterdayWin.setScale(2).toString());
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @RequestMapping(value = "getGiveList", method = RequestMethod.POST)
|
| | | public void getGiveList(AcceptData acceptData, Integer page, Long uid, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | if (page == null || page <= 0) |
| | | page = 1;
|
| | | |
| | | try {
|
| | | List<RedPackGiveVO> list = redPackGiveRecordService.getGiveList(page, Constant.PAGE_SIZE, uid);
|
| | | |
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | Gson gson = gsonBuilder.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy.MM.dd HH:mm").create();
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", gson.toJson(list));
|
| | | data.put("count", redPackGiveRecordService.countGiveList(uid));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadFalseResult(1, "查询失败"));
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 转换红包为真实金钱
|
| | | *
|
| | |
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 该用户邀请进度
|
| | | * |
| | | * @param acceptData
|
| | | * @param tid 下线UID
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getInviteProgress")
|
| | | public void getInviteProgress(AcceptData acceptData, Long uid, Long tid, String callback, PrintWriter out) {
|
| | | if (uid == null || uid <= 0 || tid == null || tid <= 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "传递参数缺失"));
|
| | | return;
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", redPackWinInviteService.getInviteProgressByWorkerId(uid, tid));
|
| | | data.put("num", threeSaleSerivce.getTeamOrderNumByWorkerId(tid));
|
| | | if (!StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 该用户邀请奖金榜
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 该用户邀请进度
|
| | | * |
| | | * @param acceptData
|
| | | * @param tid 下线UID
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getInviteProgress")
|
| | | public void getInviteProgress(AcceptData acceptData, Long uid, Long tid, String callback, PrintWriter out) {
|
| | | if (uid == null || uid <= 0 || tid == null || tid <= 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "传递参数缺失"));
|
| | | return;
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", redPackWinInviteService.getInviteProgressByWorkerId(uid, tid));
|
| | | data.put("num", redPackWinInviteService.countTeamNumByTid(uid, tid));
|
| | | if (!StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | | }
|