package com.landtool.lanbase.modules.org.redis;
|
|
import java.util.List;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
import com.landtool.lanbase.common.utils.RedisUtils;
|
import com.landtool.lanbase.modules.org.entity.OrgUser;
|
import com.landtool.lanbase.modules.sys.entity.SysSysteminfo;
|
@Component
|
public class SysSystemInfoRedis {
|
private static final String NAME="SysSysteminfo:";
|
|
@Autowired
|
private RedisUtils redisUtils;
|
|
public void saveOrUpdate(SysSysteminfo ssi) {
|
if(ssi==null){
|
return ;
|
}
|
|
String id=NAME+ssi.getAppid();
|
redisUtils.set(id, ssi);
|
|
|
}
|
|
public void delete(SysSysteminfo ssi) {
|
if(ssi==null){
|
return ;
|
}
|
|
redisUtils.delete(NAME+ssi.getAppid());
|
|
}
|
|
public SysSysteminfo get(Object key){
|
return redisUtils.get(NAME+key, SysSysteminfo.class);
|
}
|
}
|