From c1bee26b4a8fd6c9d554cc9f16a8e2ee81731543 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 10 Jul 2025 15:50:57 +0800
Subject: [PATCH] 短信验证码

---
 oying-system/src/main/java/com/oying/modules/security/rest/VerificationController.java |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/security/rest/VerificationController.java b/oying-system/src/main/java/com/oying/modules/security/rest/VerificationController.java
index 01d120f..c7bc1c7 100644
--- a/oying-system/src/main/java/com/oying/modules/security/rest/VerificationController.java
+++ b/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));
     }
 }

--
Gitblit v1.9.3