Commit 5040255ac31d81a61a9004a5b13d088ecacf72dc
1 parent
df76ff0c
解决使用Quzrtz 开启线程任务, #465
Showing
1 changed file
with
8 additions
and
1 deletions
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java
... | ... | @@ -49,8 +49,15 @@ public class MybatisInterceptor implements Interceptor { |
49 | 49 | for (Field field : fields) { |
50 | 50 | log.debug("------field.name------" + field.getName()); |
51 | 51 | try { |
52 | + //update-begin--Author:scott Date:20190828 for:关于使用Quzrtz 开启线程任务, #465 | |
52 | 53 | // 获取登录用户信息 |
53 | - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); | |
54 | + LoginUser sysUser = null; | |
55 | + try{ | |
56 | + sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); | |
57 | + }catch (Exception e){ | |
58 | + sysUser = null; | |
59 | + } | |
60 | + //update-end--Author:scott Date:20190828 for:关于使用Quzrtz 开启线程任务, #465 | |
54 | 61 | if ("createBy".equals(field.getName())) { |
55 | 62 | field.setAccessible(true); |
56 | 63 | Object local_createBy = field.get(parameter); |
... | ... |