diff --git a/ruoyi-admin/src/main/resources/templates/monitor/online/online.html b/ruoyi-admin/src/main/resources/templates/monitor/online/online.html index 680db883..55d311f7 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/online/online.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/online/online.html @@ -113,7 +113,7 @@ title: '操作', align: 'center', formatter: function(value, row, index) { - var msg = '强退 '; + var msg = '强退 '; return msg; } }] diff --git a/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html b/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html index 55c3fd4d..8fba43fe 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html @@ -139,7 +139,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('详细'); + actions.push('详细'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/config/config.html b/ruoyi-admin/src/main/resources/templates/system/config/config.html index 54080846..2bc4dd61 100644 --- a/ruoyi-admin/src/main/resources/templates/system/config/config.html +++ b/ruoyi-admin/src/main/resources/templates/system/config/config.html @@ -117,8 +117,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); + actions.push('编辑 '); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/dept/dept.html b/ruoyi-admin/src/main/resources/templates/system/dept/dept.html index 0fd74533..4306128f 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dept/dept.html +++ b/ruoyi-admin/src/main/resources/templates/system/dept/dept.html @@ -95,9 +95,9 @@ formatter: function(value, row, index) { if (row.parentId != 0) { var actions = []; - actions.push('编辑'); - actions.push('删除'); - actions.push('添加下级部门'); + actions.push('编辑'); + actions.push('删除'); + actions.push('添加下级部门'); return $.table.dropdownToggle(actions.join('')); } else { return ""; diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html b/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html index e2af0293..4c2a39e8 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html @@ -112,8 +112,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); + actions.push('编辑 '); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/type/type.html b/ruoyi-admin/src/main/resources/templates/system/dict/type/type.html index 4f47e542..b15cc1c5 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/type/type.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/type/type.html @@ -92,7 +92,7 @@ title: '字典类型', sortable: true, formatter: function(value, row, index) { - return '' + value + ''; + return '' + value + ''; } }, { @@ -117,9 +117,9 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('列表 '); - actions.push('删除'); + actions.push('编辑 '); + actions.push('列表 '); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/menu.html b/ruoyi-admin/src/main/resources/templates/system/menu/menu.html index 1d600b6b..b311bccf 100644 --- a/ruoyi-admin/src/main/resources/templates/system/menu/menu.html +++ b/ruoyi-admin/src/main/resources/templates/system/menu/menu.html @@ -131,9 +131,9 @@ align: "left", formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); - actions.push('添加下级菜单 '); + actions.push('编辑 '); + actions.push('删除'); + actions.push('添加下级菜单 '); return $.table.dropdownToggle(actions.join('')); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/notice.html b/ruoyi-admin/src/main/resources/templates/system/notice/notice.html index 8fc9f262..02b37561 100644 --- a/ruoyi-admin/src/main/resources/templates/system/notice/notice.html +++ b/ruoyi-admin/src/main/resources/templates/system/notice/notice.html @@ -104,8 +104,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); + actions.push('编辑 '); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/post/post.html b/ruoyi-admin/src/main/resources/templates/system/post/post.html index c18a15ca..2b704ecd 100644 --- a/ruoyi-admin/src/main/resources/templates/system/post/post.html +++ b/ruoyi-admin/src/main/resources/templates/system/post/post.html @@ -107,8 +107,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); + actions.push('编辑 '); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/role/authUser.html b/ruoyi-admin/src/main/resources/templates/system/role/authUser.html index 64902355..9f0c1f54 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/authUser.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/authUser.html @@ -105,7 +105,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('取消授权 '); + actions.push('取消授权 '); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/role/role.html b/ruoyi-admin/src/main/resources/templates/system/role/role.html index 18cbf966..d9e08967 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/role.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/role.html @@ -113,10 +113,10 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('数据权限 '); - actions.push('分配用户 '); - actions.push('删除 '); + actions.push('编辑 '); + actions.push('数据权限 '); + actions.push('分配用户 '); + actions.push('删除 '); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/user/user.html b/ruoyi-admin/src/main/resources/templates/system/user/user.html index 9db0be37..998f706c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/user.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/user.html @@ -164,9 +164,9 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除 '); - actions.push('重置'); + actions.push('编辑 '); + actions.push('删除 '); + actions.push('重置'); return actions.join(''); } }] diff --git a/ruoyi-generator/src/main/resources/templates/tool/gen/gen.html b/ruoyi-generator/src/main/resources/templates/tool/gen/gen.html index 46426d9d..3de386a4 100644 --- a/ruoyi-generator/src/main/resources/templates/tool/gen/gen.html +++ b/ruoyi-generator/src/main/resources/templates/tool/gen/gen.html @@ -90,7 +90,7 @@ width: '20%', align: 'center', formatter: function(value, row, index) { - var msg = '生成代码 '; + var msg = '生成代码 '; return msg; } }] diff --git a/ruoyi-generator/src/main/resources/vm/html/list.html.vm b/ruoyi-generator/src/main/resources/vm/html/list.html.vm index 4662ca86..ec5a8773 100644 --- a/ruoyi-generator/src/main/resources/vm/html/list.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/list.html.vm @@ -4,7 +4,6 @@ -
@@ -120,8 +119,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); + actions.push('编辑 '); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-quartz/src/main/resources/templates/monitor/job/job.html b/ruoyi-quartz/src/main/resources/templates/monitor/job/job.html index 6eef8c5c..28897eef 100644 --- a/ruoyi-quartz/src/main/resources/templates/monitor/job/job.html +++ b/ruoyi-quartz/src/main/resources/templates/monitor/job/job.html @@ -121,8 +121,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push(' 执行一次 '); - actions.push('详细 '); + actions.push(' 执行一次 '); + actions.push('详细 '); return actions.join(''); } }] diff --git a/ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html b/ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html index 7063e5f8..8964e7d6 100644 --- a/ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html +++ b/ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html @@ -118,7 +118,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('详细'); + actions.push('详细'); return actions.join(''); } }] diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java index 6189c81b..3dcc9713 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java @@ -101,8 +101,8 @@ public interface SysDeptMapper /** * 根据ID查询所有子部门 - * @param id - * @return + * @param deptId 部门ID + * @return 部门列表 */ - public List selectChildrenDeptById(Long id); + public List selectChildrenDeptById(Long deptId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index c91b6c58..11336457 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -185,7 +185,7 @@ public class SysDeptServiceImpl implements ISysDeptService * @return 结果 */ @Override - @Transactional(rollbackFor = Exception.class) + @Transactional public int updateDept(SysDept dept) { SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId()); @@ -195,7 +195,7 @@ public class SysDeptServiceImpl implements ISysDeptService String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); String oldAncestors = oldDept.getAncestors(); dept.setAncestors(newAncestors); - updateDeptChildren(dept.getDeptId(), newAncestors,oldAncestors); + updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); } int result = deptMapper.updateDept(dept); if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) @@ -221,16 +221,17 @@ public class SysDeptServiceImpl implements ISysDeptService /** * 修改子元素关系 + * * @param deptId 被修改的部门ID * @param newAncestors 新的父ID集合 * @param oldAncestors 旧的父ID集合 */ - public void updateDeptChildren(Long deptId, String newAncestors,String oldAncestors) + public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { List children = deptMapper.selectChildrenDeptById(deptId); for (SysDept child : children) { - child.setAncestors(child.getAncestors().replace(oldAncestors,newAncestors)); + child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors)); } if (children.size() > 0) { diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 357517de..b026331a 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -76,10 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"