diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 433563e3..21f68541 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -40,7 +40,9 @@ AND status = #{status} - AND ( ${params.dataScope} ) + + AND ( ${params.dataScope} ) + order by d.parent_id, d.order_num diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index b96b95d8..1a542f83 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -58,7 +58,9 @@ and date_format(r.create_time,'%y%m%d') <= date_format(#{role.params.endTime},'%y%m%d') - ${role.params.dataScope} + + AND ( ${role.params.dataScope} ) + order by r.role_sort @@ -81,7 +83,9 @@ and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') - AND ( ${params.dataScope} ) + + AND ( ${params.dataScope} ) + order by r.role_sort diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 8332ea9d..df59332b 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -106,7 +106,9 @@ ancestors) )) - ${user.params.dataScope} + + AND ( ${user.params.dataScope} ) +