Преглед на файлове

Merge branch 'feat-230222-sms' into temp-pre

shc преди 2 години
родител
ревизия
4c7feb29d2
променени са 1 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 8 1
      hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/ApiController.java

+ 8 - 1
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/ApiController.java

@@ -4289,7 +4289,14 @@ public class ApiController {
 
 		final String key = com.qunzhixinxi.hnqz.common.core.constant.CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.SMS.getType() + StringPool.AT + username + "@fina";
 
-		return R.ok(redisTemplate.hasKey(key) ? code.equals(redisTemplate.opsForValue().get(key)) : Boolean.FALSE);
+
+		Boolean res = redisTemplate.hasKey(key) ? code.equals(redisTemplate.opsForValue().get(key)) : Boolean.FALSE;
+
+		if (res){
+			redisTemplate.delete(key);
+		}
+
+		return R.ok(res);
 
 	}