20200430-zlp-1
班级管理-维护教师
This commit is contained in:
@ -14,14 +14,21 @@
|
||||
<result property="bjrych" column="bjrych"/>
|
||||
<result property="jbny" column="jbny"/>
|
||||
<result property="zbjs" column="zbjs"/>
|
||||
<result property="zbjsxm" column="zbjsxm"/>
|
||||
<result property="pbjs" column="pbjs"/>
|
||||
<result property="pbjsxm" column="pbjsxm"/>
|
||||
<result property="zljs" column="zljs"/>
|
||||
<result property="zljsxm" column="zljsxm"/>
|
||||
<result property="isdel" column="isdel"/>
|
||||
<result property="createtime" column="createtime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByClassVo">
|
||||
select bjbh, dept_id, bjtype, bhxh, xn, bjmc, bjrych, jbny, zbjs, pbjs, zljs, isdel, createtime from by_class d
|
||||
select bjbh, dept_id, bjtype, bhxh, xn, bjmc, bjrych, jbny,
|
||||
zbjs,(select nick_name from sys_user where sys_user.user_id=zbjs) zbjsxm,
|
||||
pbjs, (select nick_name from sys_user where sys_user.user_id=pbjs) pbjsxm,
|
||||
zljs, (select nick_name from sys_user where sys_user.user_id=zljs) zljsxm,
|
||||
isdel, createtime from by_class d
|
||||
</sql>
|
||||
|
||||
<select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult">
|
||||
@ -37,6 +44,9 @@
|
||||
<if test="zbjs != null ">and zbjs = #{zbjs}</if>
|
||||
<if test="pbjs != null ">and pbjs = #{pbjs}</if>
|
||||
<if test="zljs != null ">and zljs = #{zljs}</if>
|
||||
<if test="zbjsxm != null and zbjsxm != ''" >and zbjsxm like concat('%', #{zbjsxm}, '%')</if>
|
||||
<if test="pbjsxm != null and pbjsxm != ''" >and pbjsxm like concat('%', #{pbjsxm}, '%')</if>
|
||||
<if test="zljsxm != null and zljsxm != ''" >and zljsxm like concat('%', #{zljsxm}, '%')</if>
|
||||
<if test="isdel != null and isdel != ''">and isdel = #{isdel}</if>
|
||||
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
|
@ -90,6 +90,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectUserListByRoleId" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, 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
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != ''">
|
||||
and r.role_id = #{userId}
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) ))
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user where user_name = #{userName}
|
||||
|
Reference in New Issue
Block a user