fix 修复 !pr410 导致的用户导出问题

feature/model
疯狂的狮子Li 1 year ago
parent 703815dae7
commit af4b0cb107

@ -57,11 +57,16 @@ public class SysDeptVo implements Serializable {
*/
private Integer orderNum;
/**
* ID
*/
private Long leader;
/**
*
*/
@ExcelProperty(value = "负责人")
private Long leader;
private String leaderName;
/**
*

@ -92,8 +92,8 @@ public class SysUserExportVo implements Serializable {
/**
*
*/
@ReverseAutoMapping(target = "leader", source = "dept.leader")
@ReverseAutoMapping(target = "leaderName", source = "dept.leaderName")
@ExcelProperty(value = "部门负责人")
private Long leader;
private String leaderName;
}

@ -67,17 +67,21 @@
<select id="selectPageUserList" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_name, d.leader, u1.user_name as leaderName
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user u1 on u1.user_id = d.leader
${ew.getCustomSqlSegment}
</select>
<select id="selectUserList" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_name, d.leader, u1.user_name as leaderName
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user u1 on u1.user_id = d.leader
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save