|
@@ -73,6 +73,9 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
|
@Resource
|
|
|
BasicSchoolService basicSchoolService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TBSessionService tbSessionService;
|
|
|
+
|
|
|
/**
|
|
|
* 添加用户缓存
|
|
|
*
|
|
@@ -260,7 +263,9 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
public void setUserSession(String sessionId, Object o) {
|
|
|
- cacheService.put(SystemConstant.SESSION, sessionId, o);
|
|
|
+ // cacheService.put(SystemConstant.SESSION, sessionId, o);
|
|
|
+ TBSession tbSession = (TBSession) o;
|
|
|
+ tbSessionService.updateById(tbSession);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -271,7 +276,8 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Object getUserSession(String sessionId) {
|
|
|
- return cacheService.get(SystemConstant.SESSION, sessionId);
|
|
|
+ // return cacheService.get(SystemConstant.SESSION, sessionId);
|
|
|
+ return tbSessionService.getById(sessionId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -281,7 +287,8 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
public void deleteUserSession(String sessionId) {
|
|
|
- cacheService.evict(SystemConstant.SESSION, sessionId);
|
|
|
+ // cacheService.evict(SystemConstant.SESSION, sessionId);
|
|
|
+ tbSessionService.removeById(sessionId);
|
|
|
}
|
|
|
|
|
|
/**
|