From 6843d5ab59bad035bf0d3af6e1158e82a9a58f9a Mon Sep 17 00:00:00 2001 From: aeizzz Date: Mon, 30 Jan 2023 14:44:10 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0app=E7=AB=AF=E7=99=BB=E5=BD=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=80=82=E9=85=8D=E5=8D=95=E4=BD=93=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/pigx/app/service/impl/AppMobileServiceImpl.java | 4 ++-- .../pigx/common/core/constant/enums/LoginTypeEnum.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pigx-app-server/pigx-app-server-biz/src/main/java/com/pig4cloud/pigx/app/service/impl/AppMobileServiceImpl.java b/pigx-app-server/pigx-app-server-biz/src/main/java/com/pig4cloud/pigx/app/service/impl/AppMobileServiceImpl.java index e216851bf..48c4128cf 100644 --- a/pigx-app-server/pigx-app-server-biz/src/main/java/com/pig4cloud/pigx/app/service/impl/AppMobileServiceImpl.java +++ b/pigx-app-server/pigx-app-server-biz/src/main/java/com/pig4cloud/pigx/app/service/impl/AppMobileServiceImpl.java @@ -69,7 +69,7 @@ public class AppMobileServiceImpl implements AppMobileService { } Object codeObj = redisTemplate.opsForValue() - .get(CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.SMS.getType() + StringPool.AT + mobile); + .get(CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.APPSMS.getType() + StringPool.AT + mobile); if (codeObj != null) { log.info("手机号验证码未过期:{},{}", mobile, codeObj); @@ -79,7 +79,7 @@ public class AppMobileServiceImpl implements AppMobileService { String code = RandomUtil.randomNumbers(Integer.parseInt(SecurityConstants.CODE_SIZE)); log.debug("手机号生成验证码成功:{},{}", mobile, code); redisTemplate.opsForValue().set( - CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.SMS.getType() + StringPool.AT + mobile, code, + CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.APPSMS.getType() + StringPool.AT + mobile, code, SecurityConstants.CODE_TIME, TimeUnit.SECONDS); return R.ok(Boolean.TRUE, code); } diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/enums/LoginTypeEnum.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/enums/LoginTypeEnum.java index fed98e14f..f8594f5b0 100644 --- a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/enums/LoginTypeEnum.java +++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/enums/LoginTypeEnum.java @@ -38,6 +38,8 @@ public enum LoginTypeEnum { */ SMS("SMS", "验证码登录"), + APPSMS("APP-SMS", "APP验证码登录"), + /** * QQ登录 */