perf(pom): 统一排序字段名称

master
wayn 5 years ago
parent 8c0d19be62
commit 9db6c7495a

@ -50,7 +50,7 @@ public class SysDept extends BaseEntity {
*
*/
@DecimalMin(value = "0", message = "显示顺序不能小于0")
private String orderNum;
private Integer sort;
/**
*

@ -44,7 +44,7 @@ public class SysMenu extends BaseEntity {
*
*/
@DecimalMin(value = "0", message = "显示顺序不能小于0")
private Integer orderNum;
private Integer sort;
/**
*

@ -48,7 +48,7 @@ public class SysRole extends BaseEntity {
*/
@DecimalMin(value = "0", message = "角色排序不能小于0")
@Excel(name = "角色排序", type = 10)
private Integer roleSort;
private Integer sort;
/**
* 0 1

@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
<result property="deptName" column="dept_name" />
<result property="orderNum" column="order_num" />
<result property="sort" column="sort" />
<result property="leader" column="leader" />
<result property="phone" column="phone" />
<result property="email" column="email" />
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.dept_status, d.del_flag, d.create_by,
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.sort, d.leader, d.phone, d.email, d.dept_status, d.del_flag, d.create_by,
d.create_time, d.remark
from sys_dept d
</sql>
@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptStatus != null">
AND dept_status = #{deptStatus}
</if>
order by d.parent_id, d.order_num
order by d.parent_id, d.sort
</select>
<select id="selectDeptListByRoleId" parameterType="Long" resultType="Integer">
@ -49,6 +49,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_role_dept rd on d.dept_id = rd.dept_id
where rd.role_id = #{roleId}
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
order by d.parent_id, d.order_num
order by d.parent_id, d.sort
</select>
</mapper>

@ -8,7 +8,7 @@
<id property="menuId" column="menu_id" />
<result property="menuName" column="menu_name" />
<result property="parentId" column="parent_id" />
<result property="orderNum" column="order_num" />
<result property="sort" column="sort" />
<result property="path" column="path" />
<result property="component" column="component" />
<result property="isFrame" column="is_frame" />
@ -22,7 +22,7 @@
</resultMap>
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, path, component, is_frame, menu_type, menu_status, visible, ifnull(perms,'') as perms, icon, create_time
select menu_id, menu_name, parent_id, sort, path, component, is_frame, menu_type, menu_status, visible, ifnull(perms,'') as perms, icon, create_time
from sys_menu m
</sql>
@ -34,24 +34,24 @@
</if>
<if test="menuStatus != null">and m.menu_status = #{menuStatus}</if>
</where>
order by m.parent_id, m.order_num
order by m.parent_id, m.sort
</select>
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.visible, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.visible, m.is_frame, m.menu_type, m.icon, m.sort, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.menu_status = 0
order by m.parent_id, m.order_num
order by m.parent_id, m.sort
</select>
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.sort, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
left join sys_user u on ur.user_id = u.user_id
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.menu_status = 0 AND ro.role_status = 0
order by m.parent_id, m.order_num
order by m.parent_id, m.sort
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
@ -64,7 +64,7 @@
</select>
<select id="selectMenuListByUserId" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.menu_status, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.menu_status, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.sort, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@ -76,6 +76,6 @@
</if>
<if test="menu.menuStatus != null">and menu_status = #{menu.menuStatus}</if>
</where>
order by m.parent_id, m.order_num
order by m.parent_id, m.sort
</select>
</mapper>

@ -8,7 +8,7 @@
<id property="roleId" column="role_id" />
<result property="roleName" column="role_name" />
<result property="roleKey" column="role_key" />
<result property="roleSort" column="role_sort" />
<result property="sort" column="sort" />
<result property="roleStatus" column="role_status" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
@ -16,7 +16,7 @@
</resultMap>
<sql id="selectRoleVo">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort,
select distinct r.role_id, r.role_name, r.role_key, r.sort,
r.role_status, r.del_flag, r.create_time, r.remark
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id

@ -28,14 +28,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" />
<result property="deptName" column="dept_name" />
<result property="orderNum" column="order_num" />
<result property="sort" column="sort" />
<result property="leader" column="leader" />
<result property="deptStatus" column="dept_status" />
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phone, u.password, u.sex, u.user_status, u.del_flag, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.dept_status
d.dept_id, d.parent_id, d.dept_name, d.sort, d.leader, d.dept_status
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
</sql>

Loading…
Cancel
Save