修改监管端存token标志
This commit is contained in:
@@ -680,7 +680,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
|
||||
@Override
|
||||
public void resetLcPsw(AppUser appUser) {
|
||||
String lcUserToken=redisCache.getCacheObject(CacheConstants.LC_HLW_TOKEN+appUser.getLcUserid());
|
||||
String lcUserToken=redisCache.getCacheObject(CacheConstants.LC_JGD_TOKEN+appUser.getLcUserid());
|
||||
if(StringUtils.isBlank(lcUserToken)){
|
||||
throw new RuntimeException("token已失效");
|
||||
}
|
||||
@@ -696,7 +696,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
|
||||
@Override
|
||||
public void changeLcCompanyStatus(AppUser appUser) {
|
||||
String lcUserToken=redisCache.getCacheObject(CacheConstants.LC_HLW_TOKEN+appUser.getLcUserid());
|
||||
String lcUserToken=redisCache.getCacheObject(CacheConstants.LC_JGD_TOKEN+appUser.getLcUserid());
|
||||
if(StringUtils.isBlank(lcUserToken)){
|
||||
throw new RuntimeException("token已失效");
|
||||
}
|
||||
|
||||
@@ -54,4 +54,9 @@ public class CacheConstants
|
||||
* 浪潮互联网token
|
||||
*/
|
||||
public static final String LC_HLW_TOKEN ="lc_hlw_token:";
|
||||
|
||||
/**
|
||||
* 浪潮监管端token
|
||||
*/
|
||||
public static final String LC_JGD_TOKEN ="lc_jgd_token:";
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ public class SsoService {
|
||||
|
||||
//用户存在,生成本系统用户的token
|
||||
String token = loginSysUser(sysUser, userJson.getString("userName"));
|
||||
redisCache.setCacheObject(CacheConstants.LC_HLW_TOKEN+lcUserid,lcToken, 6, TimeUnit.HOURS);
|
||||
redisCache.setCacheObject(CacheConstants.LC_JGD_TOKEN+lcUserid,lcToken, 6, TimeUnit.HOURS);
|
||||
JSONObject backJson = new JSONObject();
|
||||
backJson.put("token", token);
|
||||
backJson.put("lcToken", lcToken);
|
||||
|
||||
Reference in New Issue
Block a user