Commit 616f6952 authored by lisong's avatar lisong

修改bug

parent 476aad18
...@@ -167,15 +167,17 @@ public class TzsAuthServiceImpl implements TzsAuthService { ...@@ -167,15 +167,17 @@ public class TzsAuthServiceImpl implements TzsAuthService {
// 需要登录后台账号 // 需要登录后台账号
RequestContext.setAppKey("AMOS_STUDIO"); RequestContext.setAppKey("AMOS_STUDIO");
RequestContext.setProduct("AMOS_STUDIO_WEB"); RequestContext.setProduct("AMOS_STUDIO_WEB");
if(redisUtils.hasKey(RedisKey.CTI_USER_TOKEN)) { synchronized (TzsAuthServiceImpl.class) {
// 验证token if (redisUtils.hasKey(RedisKey.CTI_USER_TOKEN)) {
boolean validToken = TokenOperation.refresh(redisUtils.get(RedisKey.CTI_USER_TOKEN).toString()); // 验证token
// 登陆 boolean validToken = TokenOperation.refresh(redisUtils.get(RedisKey.CTI_USER_TOKEN).toString());
if(!validToken) { // 登陆
if (!validToken) {
this.loginCtiUser();
}
} else { // 登陆
this.loginCtiUser(); this.loginCtiUser();
} }
} else { // 登陆
this.loginCtiUser();
} }
String ctiToken = redisUtils.get(RedisKey.CTI_USER_TOKEN).toString(); String ctiToken = redisUtils.get(RedisKey.CTI_USER_TOKEN).toString();
RequestContext.setToken(ctiToken); RequestContext.setToken(ctiToken);
......
...@@ -321,9 +321,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -321,9 +321,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Override @Override
public RegUnitInfoDto unitCheck(String unitCode, String unitType,String companyName) { public RegUnitInfoDto unitCheck(String unitCode, String unitType,String companyName) {
tzsAuthServiceImpl.setRequestContext();
RequestContext.setToken(RequestContext.getToken());
RequestContext.setAppKey(RequestContext.getAppKey());
RequestContext.setProduct(RequestContext.getProduct());
if (!ValidationUtil.isEmpty(companyName)) { if (!ValidationUtil.isEmpty(companyName)) {
startPlatformTokenService.getToken();
FeignClientResult<CompanyModel> result =Privilege.companyClient.queryByCompanyName(companyName); FeignClientResult<CompanyModel> result =Privilege.companyClient.queryByCompanyName(companyName);
if(result.getResult()!=null) if(result.getResult()!=null)
{ {
...@@ -332,7 +334,6 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -332,7 +334,6 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
} }
if (!ValidationUtil.isEmpty(unitCode)) { if (!ValidationUtil.isEmpty(unitCode)) {
startPlatformTokenService.getToken();
FeignClientResult<CompanyModel> result =Privilege.companyClient.queryByCompanyCode(unitCode); FeignClientResult<CompanyModel> result =Privilege.companyClient.queryByCompanyCode(unitCode);
if(result.getResult()!=null) if(result.getResult()!=null)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment