彭雪彬
2025-07-14 341ed4e217f20caae7f827dcbd8fb93eff937055
oying-system/src/main/java/com/oying/modules/security/rest/VerificationController.java
@@ -39,12 +39,11 @@
    @ApiOperation("短信验证码")
    public ResponseEntity<Object> verification(@RequestParam String phone) {
        String uuid = key + IdUtil.simpleUUID();
        System.out.println(phone);
        //创建验证码
        String verification = (int) ((Math.random() * 9 + 1) * 100000) + "";
        redisUtils.set(uuid, verification, time);
        SendMessageUtils.sendMsg(properties.getUrlSendMsg(), phone, SendMessageUtils.SIGN,
                SendMessageUtils.MESSAGE.replace("{code}", verification), properties);
        redisUtils.set(uuid, verification, time);
        return ResponseEntity.ok(R.success(uuid));
    }
}