|
@@ -29,7 +29,7 @@ import java.util.concurrent.ThreadLocalRandom;
|
|
*/
|
|
*/
|
|
@Slf4j
|
|
@Slf4j
|
|
@Component
|
|
@Component
|
|
-
|
|
|
|
|
|
+
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
public class SmsUtilAliImplService implements SmsUtil {
|
|
public class SmsUtilAliImplService implements SmsUtil {
|
|
|
|
|
|
@@ -117,7 +117,7 @@ public class SmsUtilAliImplService implements SmsUtil {
|
|
public boolean verifyCode(String mobile, SmsSceneEnum smsSceneEnum, String uuid, String code) {
|
|
public boolean verifyCode(String mobile, SmsSceneEnum smsSceneEnum, String uuid, String code) {
|
|
String cacheKey = cacheKey(smsSceneEnum, mobile, uuid);
|
|
String cacheKey = cacheKey(smsSceneEnum, mobile, uuid);
|
|
String result = getCacheCode(cacheKey(smsSceneEnum, mobile, uuid));
|
|
String result = getCacheCode(cacheKey(smsSceneEnum, mobile, uuid));
|
|
- if (code.equals(result) || code.equals("0")) {
|
|
|
|
|
|
+ if (code.equals(result)) {
|
|
//校验之后,删除
|
|
//校验之后,删除
|
|
delCacheCode(cacheKey);
|
|
delCacheCode(cacheKey);
|
|
return true;
|
|
return true;
|