/** * 用户名重复检查 * * @return * @throws IOException */ public void checkedUserName() throws IOException { member = new Member(); String userName = getRequest().getParameter("param"); member.setMemberName(userName); member = memberService.getByName(member); if (member != null && !member.getMemberName().equals("")) { map.put("info", "该用户名已存在!"); map.put("status", "n"); } else { map.put("status", "y"); } printJson(Object2Json(map)); }
/** * 在线开户 -- 实盘开户 银行卡号 身份证号 开户银行 * * @return * @throws Exception */ public String saveOpenAccount() throws Exception { // 用于判断重复提交 if (UserSession.getInstance(this.getRequest()).getTokinId() == null) { return "index"; } // 获取session内member的值 Member member = (Member) getRequest().getSession().getAttribute("session_member"); customer.setSubmitChannel(DataConfig.OPEN_ACCOUNT_TYPE_SHIPAN); customer.setFromPage(DataConfig.OPEN_ACCOUNT_FROMPAGE_WEIZHAN_2); customer.setSourceChannel(Customer.CHANNEL_1); // 来源通道--在线开户 customer.setSourceChannelName("在线开户"); customer.setMobile(member.getMobile()); member.setMemberStatus(Member.MEMBERSTATUS_1); customer.setIp(DataConfig.getIpAddr(this.getRequest())); Map<String, Object> resultMap = customerService.openAccount(customer, member); String result = resultMap.get("result").toString(); if (!Boolean.valueOf(result)) { getRequest().setAttribute("result", "fail"); getRequest().setAttribute("name", customer.getCustomerName()); getRequest().setAttribute("msg", resultMap.get("msg")); getRequest().setAttribute("errorMsg", resultMap.get("errorResult")); } else { getRequest().setAttribute("result", "success"); Member memberModel = (Member) resultMap.get("member"); // 保存member memberService.insert(memberModel); getRequest().setAttribute("member", memberModel); } // 取消重复提交标志 UserSession.getInstance(this.getRequest()).setTokinId(null); return "onlineFinish"; }