| | |
| | | @Resource
|
| | | private TaoBaoWeiQuanOrderService taoBaoWeiQuanOrderService;
|
| | |
|
| | | private final static String TODAY = "1";
|
| | | private final static String THREE = "2";
|
| | | private final static String AWEEK = "3";
|
| | |
|
| | | @RequestMapping(value = "getExtractList", method = RequestMethod.POST)
|
| | | public void getExtractList(int pageIndex, PrintWriter out) {
|
| | | List<Extract> extractList = extractService.getExtractList(pageIndex - 1);
|
| | | int count = extractService.getCount();
|
| | | int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1;
|
| | | PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("extractList", extractList);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * 方法说明: 通过提现请求
|
| | | * |
| | | * @author mawurui createTime 2018年3月14日 下午3:15:42
|
| | | * @param id
|
| | | * @param out
|
| | | * @param request
|
| | | */
|
| | | @RequestMapping(value = "passExtract", method = RequestMethod.POST)
|
| | | public void passExtract(String callback, long id, PrintWriter out, HttpServletRequest request) {
|
| | |
|
| | | // TODO 需要邮箱发送短信验证
|
| | |
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | |
|
| | | Integer integer = extractService.passExtract(id, admin);
|
| | | Extract extract = extractService.getExtractById(id);
|
| | | long uid = extract.getUserInfo().getId();
|
| | |
|
| | | if (integer == null) {
|
| | | out.print(JsonUtil.loadTrueResult("通过"));
|
| | | LogHelper
|
| | | .userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "通过了[id=" + id + "]的提现申请!"); // 同意之后成功
|
| | | } else if (integer == 1) {
|
| | |
|
| | | out.print(JsonUtil.loadFalseResult("不存在该对象")); // 同意之后失败
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 同意提现id=" + id + "的提现申请不存在");
|
| | | String title = "你的提现申请被驳回";
|
| | | String content = "非常遗憾,你的提现申请被驳回。我们通过核对发现你的账目明细有误,我们会在审计完成之后给你发通知消息。如有疑问请联系客服。";
|
| | | // xingePushController.pushSystemZnx(uid, title, content, out);
|
| | | } else {
|
| | |
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 同意提现id=" + id + "的提现申请状态异常");
|
| | | out.print(JsonUtil.loadFalseResult("该状态不等于不为初始状态"));
|
| | | String title = "你的提现申请不成功";
|
| | | String content = "请确保你的提现账户的隐私设置为 允许邮箱、手机号、会员名找到我。否则无法成功完成转账。如有疑问请联系客服。";
|
| | | // xingePushController.pushSystemZnx(uid, title, content, out);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | /* 允许提现 操作 */
|
| | | Integer integer = extractService.passExtract(id, admin);
|
| | |
|
| | | Extract extract = extractService.getExtractById(id);
|
| | | long uid = extract.getUserInfo().getId();
|
| | |
|
| | | // 日志记录
|
| | | if (integer == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("通过"));
|
| | |
|
| | | LogHelper
|
| | | .userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "通过了[id=" + id + "]的提现申请!"); // 同意之后成功
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("已通过"));
|
| | | LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "通过了[id=" + id + "]的提现申请!"); |
| | | } else if (integer == 1) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("不存在该对象"));
|
| | |
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 同意提现id=" + id + "的提现申请不存在");
|
| | | String title = "你的提现申请被驳回";
|
| | | String content = "非常遗憾,你的提现申请被驳回。我们通过核对发现你的账目明细有误,我们会在审计完成之后给你发通知消息。如有疑问请联系客服。";
|
| | | // xingePushController.pushSystemZnx(uid, title, content, out);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该提现记录已不存在,请刷新"));
|
| | | LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 同意提现id=" + id + "的提现申请不存在");
|
| | | } else {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该状态不等于不为初始状态"));
|
| | |
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 同意提现id=" + id + "的提现申请状态异常");
|
| | | String title = "你的提现申请不成功";
|
| | | String content = "请确保你的提现账户的隐私设置为 允许邮箱、手机号、会员名找到我。否则无法成功完成转账。如有疑问请联系客服。";
|
| | | // xingePushController.pushSystemZnx(uid, title, content, out);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该用户已被处理,请刷新"));
|
| | | LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 同意提现id=" + id + "的提现申请状态异常");
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * 方法说明: 拒绝提现请求
|
| | | * |
| | | * @author mawurui createTime 2018年3月14日 下午3:15:55
|
| | | * @param id
|
| | | * @param reason
|
| | | * @param out
|
| | | * @param request
|
| | | */
|
| | | @RequestMapping(value = "rejectExtract", method = RequestMethod.POST)
|
| | | public void rejectExtract(String callback, long id, String reason, PrintWriter out, HttpServletRequest request) {
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | |
|
| | | Extract extract = extractService.getExtractById(id);
|
| | | long uid = extract.getUserInfo().getId();
|
| | | long extractTime = extract.getExtractTime();
|
| | |
|
| | | try {
|
| | | extractService.rejectExtract(id, reason, extractTime, admin);// 提现失败
|
| | |
|
| | | // 调用推送站内信给用户
|
| | | out.print(JsonUtil.loadTrueResult("拒绝"));
|
| | | LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "拒绝了[id=" + id
|
| | | + "]的提现申请!拒绝原因是" + reason);
|
| | |
|
| | | String title = "你的提现申请被驳回";
|
| | | String content = "非常遗憾,你的提现申请被驳回。我们通过核对发现你的账目明细有误,我们会在审计完成之后给你发通知消息。如有疑问请联系客服。";
|
| | | // xingePushController.pushSystemZnx(uid, title, content, out);
|
| | | } catch (ObjectStateException e) {
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 拒绝提现id=" + id + "的提现申请状态异常!"); //
|
| | |
|
| | | out.print(JsonUtil.loadFalseResult(e.getMessage()));
|
| | | } catch (NotExistObjectException e) {
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 拒绝提现id=" + id + "的提现申请不存在!");
|
| | |
|
| | | out.print(JsonUtil.loadFalseResult(e.getMessage()));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | /* 拒绝提现 操作 */
|
| | |
|
| | | try {
|
| | | // 编码转换
|
| | | reason = URLDecoder.decode(reason, "UTF-8");
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | Extract extract = extractService.getExtractById(id);
|
| | | long extractTime = extract.getExtractTime();
|
| | | extractService.rejectExtract(id, reason, extractTime, admin);// 提现失败
|
| | | |
| | | extractService.rejectExtract(id, reason, admin);// 提现失败
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("拒绝"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("拒绝成功"));
|
| | |
|
| | | // 调用推送站内信给用户
|
| | | // out.print(JsonUtil.loadTrueResult("拒绝"));
|
| | | LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "拒绝了[id=" + id
|
| | | + "]的提现申请!拒绝原因是" + reason);
|
| | |
|
| | | String title = "你的提现申请被驳回";
|
| | | String content = "非常遗憾,你的提现申请被驳回。我们通过核对发现你的账目明细有误,我们会在审计完成之后给你发通知消息。如有疑问请联系客服。";
|
| | | // xingePushController.pushSystemZnx(uid, title, content, out);
|
| | | } catch (ObjectStateException e) {
|
| | | LogHelper.userInfo(
|
| | | "[ip:" + IPUtil.getRemotIP(request) + "][管理员:" + admin.getName() + "] 拒绝提现id=" + id + "的提现申请状态异常!"); //
|
| | |
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 资金校验是否异常
|
| | | * |
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "checkExtract", method = RequestMethod.POST)
|
| | | public void checkExtract(String uid, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | try {
|
| | | extractService.checkExtract(uid);
|
| | | data.put("code", "1"); // 正常
|
| | | } catch (ExtractException e) {
|
| | | data.put("code", "0");// 异常
|
| | | }
|
| | | out.print(data);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取今日提现记录:今日总额、总次数、成功次数、失败次数 获取系统提现记录:总额、总次数
|
| | |
| | | // }
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | Integer days = null;
|
| | | if (TODAY.equals(timeSlot)) {
|
| | | if ("1".equals(timeSlot)) {
|
| | | days = 0; // 今日
|
| | | } else if (THREE.equals(timeSlot)) {
|
| | | } else if ("2".equals(timeSlot)) {
|
| | | days = 3; // 前3天
|
| | | } else if (AWEEK.equals(timeSlot)) {
|
| | | } else if ("3".equals(timeSlot)) {
|
| | | days = 7; // 前7天
|
| | | }
|
| | |
|