用户科室
This commit is contained in:
parent
89dd838af3
commit
9d9b867d5a
@ -144,6 +144,11 @@ public class SysUser extends BaseEntity {
|
||||
*/
|
||||
private Long agencyId;
|
||||
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
private Long departmentId;
|
||||
|
||||
public SysUser() {
|
||||
|
||||
}
|
||||
@ -168,6 +173,14 @@ public class SysUser extends BaseEntity {
|
||||
this.agencyId = agencyId;
|
||||
}
|
||||
|
||||
public Long getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(Long departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public boolean isAdmin() {
|
||||
return isAdmin(this.userId);
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
<result property="userCardNo" column="user_card_no"/>
|
||||
<result property="userBirthDate" column="user_birth_date"/>
|
||||
<result property="agencyId" column="agency_id"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||
</resultMap>
|
||||
@ -69,6 +70,7 @@
|
||||
u.user_card_no,
|
||||
u.user_birth_date,
|
||||
u.agency_id,
|
||||
u.department_id,
|
||||
d.dept_id,
|
||||
d.parent_id,
|
||||
d.ancestors,
|
||||
@ -91,7 +93,7 @@
|
||||
<select id="selectUserList" parameterType="SysUser" 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,u.user_card_no,u.user_birth_date,
|
||||
u.agency_id,d.dept_name, d.leader from sys_user u
|
||||
u.agency_id,u.department_id,d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
@ -212,6 +214,7 @@
|
||||
<if test="userCardNo != null and userCardNo != ''">user_card_no,</if>
|
||||
<if test="userBirthDate != null">user_birth_date,</if>
|
||||
<if test="agencyId != null">agency_id,</if>
|
||||
<if test="departmentId != null">department_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
@ -229,6 +232,7 @@
|
||||
<if test="userCardNo != null and userCardNo != ''">#{userCardNo},</if>
|
||||
<if test="userBirthDate != null">#{userBirthDate},</if>
|
||||
<if test="agencyId != null">#{agencyId},</if>
|
||||
<if test="departmentId != null">#{departmentId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
@ -252,6 +256,7 @@
|
||||
<if test="userCardNo != null and userCardNo != ''">user_card_no = #{userCardNo},</if>
|
||||
<if test="userBirthDate != null">user_birth_date = #{userBirthDate},</if>
|
||||
agency_id =#{agencyId},
|
||||
department_id = #{departmentId},
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user