|
@@ -83,10 +83,11 @@ public class RtkAccountServiceImpl extends ServiceImpl<IRtkAccountMapper, RtkAcc
|
|
String jsonStr = redisUtil.get(redisKey);
|
|
String jsonStr = redisUtil.get(redisKey);
|
|
RtkAccount rtkAccount = JSONObject.parseObject(jsonStr, RtkAccount.class);
|
|
RtkAccount rtkAccount = JSONObject.parseObject(jsonStr, RtkAccount.class);
|
|
log.info("rtkAccount:{}",jsonStr);
|
|
log.info("rtkAccount:{}",jsonStr);
|
|
- Boolean flag = checkAccountFailureTime(rtkAccount.getId());
|
|
|
|
|
|
+ RtkAccount dbRtkAccount = this.getById(rtkAccount.getId());
|
|
|
|
+ Boolean flag = checkAccountFailureTime(dbRtkAccount);
|
|
if(flag){
|
|
if(flag){
|
|
- redisUtil.expire(redisKey,time);
|
|
|
|
- return rtkAccount;
|
|
|
|
|
|
+ redisUtil.set(redisKey,JSONObject.toJSONString(dbRtkAccount),time);
|
|
|
|
+ return dbRtkAccount;
|
|
}else {
|
|
}else {
|
|
redisUtil.del(redisKey);
|
|
redisUtil.del(redisKey);
|
|
}
|
|
}
|
|
@@ -118,8 +119,8 @@ public class RtkAccountServiceImpl extends ServiceImpl<IRtkAccountMapper, RtkAcc
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private Boolean checkAccountFailureTime(Integer accountId) {
|
|
|
|
- RtkAccount dbRtkAccount = this.getById(accountId);
|
|
|
|
|
|
+ private Boolean checkAccountFailureTime(RtkAccount dbRtkAccount) {
|
|
|
|
+
|
|
if(dbRtkAccount == null || dbRtkAccount.getUseStatus() == 1){
|
|
if(dbRtkAccount == null || dbRtkAccount.getUseStatus() == 1){
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|