@Override public Map<String, String> verify(String mobileNo, String userCode) { logger.debug("mobileNo:" + mobileNo + ";userCode:" + userCode); AuthCodeVerifyResult authCodeVerifyResult = authCodeHandler.verify(mobileNo, userCode); String result = authCodeVerifyResult.getResult(); String msg = authCodeVerifyResult.getMsg(); Map<String, String> rtn = new HashMap<String, String>(); rtn.put("result", result); rtn.put("msg", msg); return rtn; }
@Override public Map<String, String> send(String mobileNo) { Map<String, String> rtn = new HashMap<String, String>(); try { AuthCodeSendResult authCodeSendResult = authCodeHandler.send(mobileNo); rtn.put("result", authCodeSendResult.getResult()); rtn.put("sendId", authCodeSendResult.getSendId()); rtn.put("tipCode", authCodeSendResult.getTipCode()); rtn.put("tipMsg", authCodeSendResult.getTipMsg()); } catch (Exception e) { rtn.put("result", "failed"); rtn.put("tipCode", "unKnownError"); rtn.put("tipMsg", "发送短信验证码出现未知错误"); } return rtn; }