|
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
|
|
+import com.zhongzheng.common.core.redis.RedisCache;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.modules.user.bo.UserLoginKeyAddBo;
|
|
import com.zhongzheng.modules.user.bo.UserLoginKeyAddBo;
|
|
@@ -17,6 +18,7 @@ import com.zhongzheng.modules.user.domain.UserLoginKey;
|
|
import com.zhongzheng.modules.user.mapper.UserLoginKeyMapper;
|
|
import com.zhongzheng.modules.user.mapper.UserLoginKeyMapper;
|
|
import com.zhongzheng.modules.user.service.IUserLoginKeyService;
|
|
import com.zhongzheng.modules.user.service.IUserLoginKeyService;
|
|
import com.zhongzheng.modules.user.vo.UserLoginKeyVo;
|
|
import com.zhongzheng.modules.user.vo.UserLoginKeyVo;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
@@ -32,6 +34,9 @@ import java.util.stream.Collectors;
|
|
@Service
|
|
@Service
|
|
public class UserLoginKeyServiceImpl extends ServiceImpl<UserLoginKeyMapper, UserLoginKey> implements IUserLoginKeyService {
|
|
public class UserLoginKeyServiceImpl extends ServiceImpl<UserLoginKeyMapper, UserLoginKey> implements IUserLoginKeyService {
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private RedisCache redisCache;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public UserLoginKeyVo queryById(Long id){
|
|
public UserLoginKeyVo queryById(Long id){
|
|
UserLoginKey db = this.baseMapper.selectById(id);
|
|
UserLoginKey db = this.baseMapper.selectById(id);
|
|
@@ -123,6 +128,10 @@ public class UserLoginKeyServiceImpl extends ServiceImpl<UserLoginKeyMapper, Use
|
|
objectLambdaUpdateWrapper.ne(UserLoginKey::getUserKey, bo.getUserKey());
|
|
objectLambdaUpdateWrapper.ne(UserLoginKey::getUserKey, bo.getUserKey());
|
|
objectLambdaUpdateWrapper.set(UserLoginKey::getStatus, 0);
|
|
objectLambdaUpdateWrapper.set(UserLoginKey::getStatus, 0);
|
|
this.update(null, objectLambdaUpdateWrapper);
|
|
this.update(null, objectLambdaUpdateWrapper);
|
|
|
|
+ String key = "LockAppAction_"+"bank"+"-"+bo.getUserId();
|
|
|
|
+ String key2 = "LockAppAction_"+"jxjy"+"-"+bo.getUserId();
|
|
|
|
+ redisCache.deleteObject(key);
|
|
|
|
+ redisCache.deleteObject(key2);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|