Commit 05dfaad3 authored by tangwei's avatar tangwei

修改bug

parent 56a34467
...@@ -676,7 +676,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -676,7 +676,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
paramMap.put("next_gen_date", DateUtil.formatDatrToStr(now, "yyyy-MM-dd")); paramMap.put("next_gen_date", DateUtil.formatDatrToStr(now, "yyyy-MM-dd"));
planMapper.updPlanStatusOrGenDate(paramMap);// 更新下次任务生成日期 planMapper.updPlanStatusOrGenDate(paramMap);// 更新下次任务生成日期
} }
Toke toke = remoteSecurityService.getServerToken(); // Toke toke = remoteSecurityService.getServerToken();
Map<String, String> deptMap = new HashMap<>(); Map<String, String> deptMap = new HashMap<>();
Map<String, Object> nameMap = new HashMap<>(); Map<String, Object> nameMap = new HashMap<>();
try { try {
......
...@@ -48,12 +48,18 @@ public class PersonIdentifyAspect { ...@@ -48,12 +48,18 @@ public class PersonIdentifyAspect {
@Before("userDate()") @Before("userDate()")
public void personIdentity(JoinPoint joinPoint) throws PermissionException { public void personIdentity(JoinPoint joinPoint) throws PermissionException {
//定时任务没有token
if(RequestContext.getExeUserId()==null|| RequestContext.getToken()==null){
}else {
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if (reginParam != null ) { if (reginParam != null ) {
if(reginParam.getPersonIdentity()==null || reginParam.getPersonIdentity().getCompanyBizOrgCode()==null){ if (reginParam.getPersonIdentity() == null || reginParam.getPersonIdentity().getCompanyBizOrgCode() == null) {
String userId = reginParam.getUserModel().getUserId(); String userId = reginParam.getUserModel().getUserId();
if(userId!=null){ if (userId != null) {
FeignClientResult responseModel = jcsFeignClient.selectById(userId); FeignClientResult responseModel = jcsFeignClient.selectById(userId);
...@@ -62,13 +68,13 @@ public class PersonIdentifyAspect { ...@@ -62,13 +68,13 @@ public class PersonIdentifyAspect {
} }
String s = JSONObject.toJSONString(responseModel.getResult()); String s = JSONObject.toJSONString(responseModel.getResult());
ReginParams.PersonIdentity personIdentity = JSONObject.parseObject(s, ReginParams.PersonIdentity.class); ReginParams.PersonIdentity personIdentity = JSONObject.parseObject(s, ReginParams.PersonIdentity.class);
// ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class); // ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
reginParam.setPersonIdentity(personIdentity); reginParam.setPersonIdentity(personIdentity);
redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSONObject.toJSONString(reginParam)); redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSONObject.toJSONString(reginParam));
} }
} }
}
} }
} }
......
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