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