/**
  * Description:重设手机提交方法<br>
  *
  * @author justin.xu
  * @version 0.1 2014年4月25日
  * @param session
  * @param request
  * @return ModelAndView
  */
 @RequestMapping(value = "toModifyPhone")
 public ModelAndView toModifyPhone(
     HttpSession session, HttpServletRequest request, String resetActiveCode) {
   ModelAndView mv = new ModelAndView("account/approve/mobile/resetMobile");
   try {
     ShiroUser shiroUser = currentUser();
     MobileApproVo mobileApproVo =
         mobileApproService.queryMobileApproByUserId(shiroUser.getUserId());
     mv.addObject("mobileAppro", mobileApproVo);
     // 验证验证码是否正确
     String valiateResult =
         phoneService.compareSmsValidate(
             mobileApproVo.getMobileNum(),
             resetActiveCode,
             BusinessConstants.MOBILE_APPRO_RESET_FUNCTION);
     if (valiateResult != "success") {
       mv.addObject("errorMsg", valiateResult);
     } else {
       mv.setViewName("account/approve/mobile/newMobile");
     }
   } catch (Exception e) {
     mv.addObject("errorMsg", "网络异常,请刷新页面或稍候重试");
     e.printStackTrace();
   }
   return mv;
 }
 /**
  * Description:根据当前用户的手机号发送验证码<br>
  *
  * @author justin.xu
  * @version 0.1 2014年4月30日
  * @param request
  * @param session
  * @return String
  */
 @RequestMapping(value = "sendResetMsg")
 @ResponseBody
 public MessageBox sendResetMsg(HttpServletRequest request, HttpSession session) {
   String result = BusinessConstants.SUCCESS;
   try {
     ShiroUser shiroUser = currentUser();
     MobileApproVo mobileApproVo =
         mobileApproService.queryMobileApproByUserId(shiroUser.getUserId());
     result =
         mobileApproService.sendMobileApprValidate(
             mobileApproVo.getMobileNum(),
             request,
             shiroUser.getUserName(),
             BusinessConstants.MOBILE_APPRO_RESET_FUNCTION,
             BusinessConstants.SMS_TEMPLATE_TYPE_VERIFY_MOBILE_CODE);
   } catch (Exception e) {
     result = "网络连接异常,请刷新页面或稍后重试!";
     e.printStackTrace();
   }
   if (BusinessConstants.SUCCESS.equals(result)) {
     return new MessageBox("1", "验证码发送成功,请查收手机短信。");
   }
   return new MessageBox("0", result);
 }