修改监管端存token标志

This commit is contained in:
chenshaohua
2026-07-10 11:27:18 +08:00
parent 13c086db01
commit f6a957b1af
3 changed files with 8 additions and 3 deletions

View File

@@ -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已失效");
} }

View File

@@ -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:";
} }

View File

@@ -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);