/**
  * Description:保存提现申请<br>
  *
  * @author justin.xu
  * @version 0.1 2014年6月19日
  * @param request
  * @param session
  * @param response
  * @param takeCashMoneyVo
  * @return String
  */
 @RequestMapping(value = "saveTakeCash")
 @RequiresAuthentication
 public @ResponseBody String saveTakeCash(
     HttpServletRequest request,
     HttpSession session,
     HttpServletResponse response,
     TakeCashMoneyVo takeCashMoneyVo) {
   String result = "success";
   try {
     ShiroUser shiroUser = currentUser();
     if (super.judgeBlackByType(BusinessConstants.BLACK_TYPE_CASH)) {
       return "";
     }
     if (shiroUser.getIsFinancialUser() == 0) {
       return "借款用户无法提现!";
     }
     // 查询用户认证信息
     MemberApproVo memberApproVo = memberService.queryMemberApproByUserId(shiroUser.getUserId());
     // 您还没有进行手机认证,请先进行手机认证
     if (null == memberApproVo.getMobilePassed()
         || memberApproVo.getMobilePassed() != Constants.YES) {
       return "请先进行手机认证";
     }
     // 判断是否通过了实名认证
     if (null == memberApproVo.getNamePassed()
         || memberApproVo.getNamePassed() != Constants.REALNAME_APPR_ISPASSED_PASSED) {
       return "请先进行实名认证";
     }
     MemberCnd memberCnd = new MemberCnd();
     memberCnd.setId(shiroUser.getUserId());
     MemberVo memberVo = memberService.queryMemberByCnd(memberCnd);
     // 未设置交易密码
     if (null == memberVo.getPaypassword() || "".equals(memberVo.getPaypassword())) {
       return "请先设置交易密码";
     }
     if (null != takeCashMoneyVo && StringUtils.isNotEmpty(takeCashMoneyVo.getTakeMoney())) {
       if (Double.valueOf(takeCashMoneyVo.getTakeMoney()) < 100) {
         return "提现金额必须大于¥100!";
       }
       if (Double.valueOf(takeCashMoneyVo.getTakeMoney()) > 500000) {
         return "提现金额必须小于¥500000!";
       }
     } else {
       return "提现金额不能为空!";
     }
     result = cashRecordService.saveTakeCash(takeCashMoneyVo, memberVo, request);
     if (!"success".equals(result)) {
       return result;
     }
   } catch (AppException ae) {
     return ae.getMessage();
   } catch (Exception e) {
     logger.error("保持提现出错", e);
     return "网络连接异常,请刷新页面或稍后重试!";
   }
   return result;
 }
 /**
  * Description:安全中心-手机验证码校验通过<br>
  *
  * @author hujianpan
  * @version 0.1 2014年9月4日
  * @param request
  * @param user_id
  * @param uuid
  * @param email
  * @return String
  * @throws Exception
  */
 @RequiresAuthentication
 @RequestMapping(value = "/approMobileSuccess")
 public ModelAndView approMobileSuccess(HttpServletRequest request) throws Exception {
   Member member = currentMember();
   ModelAndView mv = new ModelAndView("account/approve/mobile/approMobileSuccess");
   mv.addObject("mobile", request.getParameter("mobile"));
   MemberApproVo memberApproVo = memberService.queryMemberApproByUserId(member.getId());
   mv.addObject("memberApproVo", memberApproVo);
   return mv;
 }
  /**
   * Description:手机认证成功<br>
   *
   * @author hujianpan
   * @version 0.1 2014年9月01日
   * @param request
   * @throws Exception
   */
  @RequiresAuthentication
  @RequestMapping(value = "/mobailCheckSuccess")
  public ModelAndView mobailCheckSuccess(HttpServletRequest request) throws Exception {
    ModelAndView mv = new ModelAndView("member/registerSucess");
    Member member = currentMember();
    String userName = null;
    if (member == null || "".equals(member.getUsername().trim())) {
      forword(BusinessConstants.NO_PAGE_FOUND_404);
    } else {
      userName = member.getUsername();
    }
    MemberApproVo memberApproVo = memberService.queryMemberApproByUserId(member.getId());
    mv.addObject("memberApproVo", memberApproVo);
    mv.addObject("userName", null == userName ? "手机认证出现问题" : userName + "  您好,恭喜您注册并激活成功!");

    return mv;
  }
  /**
   * Description:跳转到提现菜单页面<br>
   *
   * @author justin.xu
   * @version 0.1 2014年5月21日
   * @param request
   * @return ModelAndView
   */
  @RequestMapping(value = "toCashIndex")
  @RequiresAuthentication
  public ModelAndView toTopupMain() throws Exception {
    ModelAndView mv = new ModelAndView("account/cash/cashIndex");
    ShiroUser shiroUser = currentUser();
    if (super.judgeBlackByType(BusinessConstants.BLACK_TYPE_CASH)) {
      mv = new ModelAndView("redirect:/myaccount/toIndex.html");
      return mv;
    }
    MemberCnd memberCnd = new MemberCnd();
    memberCnd.setId(shiroUser.getUserId());
    MemberVo memberVo = memberService.queryMemberByCnd(memberCnd);

    // 查询用户认证信息
    MemberApproVo memberApproVo = memberService.queryMemberApproByUserId(shiroUser.getUserId());
    // 您还没有进行手机认证,请先进行手机认证
    if (null == memberApproVo.getMobilePassed()
        || memberApproVo.getMobilePassed() != Constants.YES) {
      mv.addObject("errorCode", "-3");
      return mv;
    }
    // 判断是否通过了实名认证
    if (null == memberApproVo.getNamePassed()
        || memberApproVo.getNamePassed() != Constants.REALNAME_APPR_ISPASSED_PASSED) {
      mv.addObject("errorCode", "-1");
      return mv;
    }

    // 如果交易密码为空,则跳到交易密码页面
    if (null == memberVo.getPaypassword() || "".equals(memberVo.getPaypassword())) {
      mv.addObject("errorCode", "-4");
      return mv;
    }

    // 设置菜单名
    mv.addObject(BusinessConstants.ACCOUNT_FIRST_MENU, BusinessConstants.LEFT_MENU_ZJ);
    mv.addObject(BusinessConstants.ACCOUNT_SECOND_MENU, BusinessConstants.LEFT_MENU_ZJ_TAKE_CASH);
    return mv;
  }