From 22133a83da222d491bc6687d57c37732a43b248d Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 21 Apr 2022 08:45:16 +0800 Subject: [PATCH] fix npe --- .../renren/modules/processForm/listener/CorrectionListener.java | 1 + renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml | 2 +- renren-admin/src/main/resources/mapper/sys/SysUserDao.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java index 822f9c3d..eac5d665 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java @@ -45,6 +45,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti JsonElement jsonElement = gson.toJsonTree(kv); TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class); logger.info(abilityApplicationDTO.toString()); + logger.info("表单内单位名称:" + abilityApplicationDTO.getUnit()); SysDeptDTO deptDTO = sysDeptService.getByName(abilityApplicationDTO.getUnit()); logger.info("deptDTOId:" + deptDTO.getId()); SysRoleDTO roleDTO = sysRoleService.getByName(roleName); diff --git a/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml b/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml index 3a569cfb..3d994d64 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml @@ -31,7 +31,7 @@ \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml index fb848d71..2a116840 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml @@ -59,6 +59,7 @@ t2.id = t1.user_id AND t1.role_id = #{roleId} AND t2.dept_id = #{deptId} + LIMIT 1 \ No newline at end of file