| | |
| | | String templateCode = ""; |
| | | switch (type){ |
| | | case 1: |
| | | templateCode = "SMS_476880205";//身份验证 |
| | | templateCode = "SMS_482775061";//身份验证 |
| | | break; |
| | | case 2: |
| | | templateCode = "SMS_476880205";//登录确认 |
| | | templateCode = "SMS_482775061";//登录确认 |
| | | break; |
| | | case 3: |
| | | templateCode = "SMS_476880205";//用户注册 |
| | | templateCode = "SMS_482775061";//用户注册 |
| | | break; |
| | | case 4: |
| | | templateCode = "SMS_476880205";//修改密码 |
| | | templateCode = "SMS_482775061";//修改密码 |
| | | break; |
| | | } |
| | | String sData = aLiSendSms.sendSms(phone, templateCode, "{\"code\":\"" + authCode + "\"}"); |
| | |
| | | return ResultUtil.error(message); |
| | | } |
| | | System.out.println(sms); |
| | | // System.err.println("222222"); |
| | | // |
| | | // String s = MsgUtil.Send_Post(phone, authCode); |
| | | // System.err.println(s); |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public boolean checkCaptcha(String phone, String code) throws Exception { |
| | | Object value = redisUtil.getValue(phone); |
| | | if("1234".equals(code)){ |
| | | if("5689".equals(code)){ |
| | | return true; |
| | | } |
| | | |