diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/aspect/SysLogAspect.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/aspect/SysLogAspect.java index 4e8abaff..fc0d14f3 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/aspect/SysLogAspect.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/aspect/SysLogAspect.java @@ -79,11 +79,14 @@ public class SysLogAspect { UserEntity systemUser = JSON.parseObject(userEntityStr,UserEntity.class); //根据userId查询工号以及员工姓名 - EmployeeEntity employeeEntity = hrmsFeignService.getEmpmsgById(Long.valueOf(userId)); + if(userId !=null || userId != ""){ + EmployeeEntity employeeEntity = hrmsFeignService.getEmpmsgById(Long.valueOf(userId)); + operation.addOperationLog(joinPoint,res,time,systemUser,employeeEntity); + } //Token userToken = tokenService.getOne(new QueryWrapper().eq("token", token)); //UserEntity systemUser = userLoginService.getOne(new QueryWrapper().eq("id",userId)); - operation.addOperationLog(joinPoint,res,time,systemUser,employeeEntity); + //operation.addOperationLog(joinPoint,res,time,systemUser,employeeEntity); //方法执行完成后增加日志 // addOperationLog(joinPoint, res, time); } catch (Exception e) {