puzhibing
2023-08-04 d61812d87aa8ffc54eca9a8bfae078a1349e45d4
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java
@@ -168,23 +168,22 @@
            sb.append((int) (random.nextDouble() * 10));
        }
        String authCode = sb.toString();
        String sms = "短信验证码【" + authCode + "】已发到您的手机,验证码将在5分钟后失效.";
        String sms = "";
        //发送验证码短信
        redisUtil.setStrValue(phone, authCode, 5 * 60);//设置五分钟过期
        String templateId = "";
        switch (language){
            case 1:
                templateId = "b793ae3d41a049059197bfe92cf8bc83";
                sms = "您的验证码为:" + authCode + ",该验证码5分钟内有效,请勿泄漏于他人!";
                break;
            case 2:
                templateId = "058c7d11ce594d668841cceb49fb5c9a";
                sms = "Your verification code is: " + authCode + ", the verification code is valid within 5 minutes, do not leak to others!";
                break;
            case 3:
                templateId = "4edbe604da6546808ffda582085b3c83";
                sms = "Votre code de vérification est: " + authCode + ". Ce code est valide pendant 5 minutes. Ne le divulguez pas aux autres!";
                break;
        }
        SMSUtil.send_huawei_sms(templateId, "+" + phone, "[\"" + authCode + "\"]");
        SMSUtil.sendTwilioMessage("+" + phone, sms);
        System.out.println(sms);
        return ResultUtil.success();
    }