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

feat: 校验财务验证码

shc преди 2 години
родител
ревизия
d62170adc7
променени са 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

@@ -4282,7 +4282,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);
 
 	}