提交 398f721b 编写于 作者: minghao.wu's avatar minghao.wu

fix: key expire

上级 53f4102d
流水线 #29524 已失败 于阶段
in 0 second
......@@ -83,6 +83,7 @@ public class RegisterServiceImpl implements RegisterService {
//对注册接口做幂等性处理:注册成功,删除缓存,注册失败提示用户
String nxKey = Constants.REPEAT_REGISTER_PREFIX + mobile;
Long resultNx = redisClient.setnx(nxKey, mobile);
redisClient.expire(nxKey, 2);
if(resultNx == 1) {
//try {
String mobileEncrypt = AESUtil.encryptV0(mobile);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册