@ -21,26 +21,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql id= "selectTdLeaveVo" >
<sql id= "selectTdLeaveVo" >
select id, user_id, user_name, country, areaname, leavereason, depart, leavedate, workstate, leavestate, examinename, examinedate, examinestate from td_leave
select u. id, u. user_id, u.u ser_name, u. country, u. areaname, u. leavereason, u. depart, u. leavedate, u. workstate, u. leavestate, u. examinename, u. examinedate, u. examinestate from td_leave u
</sql>
</sql>
<select id= "selectTdLeaveList" parameterType= "TdLeave" resultMap= "TdLeaveResult" >
<select id= "selectTdLeaveList" parameterType= "TdLeave" resultMap= "TdLeaveResult" >
<include refid= "selectTdLeaveVo" />
<include refid= "selectTdLeaveVo" />
<where >
<trim prefix= "where" prefixOverrides= "and|or" >
<if test= "userId != null and userId != ''" > and user_id = #{userId}</if>
<if test= "userId != null and userId != ''" > and u.user_id = #{userId}</if>
<if test= "userName != null and userName != ''" > and user_name like concat('%', #{userName}, '%')</if>
<if test= "userName != null and userName != ''" > and u.user_name like concat('%', #{userName}, '%')</if>
<if test= "country != null and country != ''" > and country = #{country}</if>
<if test= "country != null and country != ''" > and u.country = #{country}</if>
<if test= "areaname != null and areaname != ''" > and areaname like concat('%', #{areaname}, '%')</if>
<if test= "areaname != null and areaname != ''" > and u.areaname like concat('%', #{areaname}, '%')</if>
<if test= "leavereason != null and leavereason != ''" > and leavereason = #{leavereason}</if>
<if test= "leavereason != null and leavereason != ''" > and u.leavereason = #{leavereason}</if>
<if test= "depart != null and depart != ''" > and depart = #{depart}</if>
<if test= "depart != null and depart != ''" > and u.depart = #{depart}</if>
<if test= "leavedate != null " > and leavedate = #{leavedate}</if>
<if test= "leavedate != null " > and u.leavedate = #{leavedate}</if>
<if test= "workstate != null and workstate != ''" > and workstate = #{workstate}</if>
<if test= "workstate != null and workstate != ''" > and u.workstate = #{workstate}</if>
<if test= "leavestate != null and leavestate != ''" > and leavestate = #{leavestate}</if>
<if test= "leavestate != null and leavestate != ''" > and u.leavestate = #{leavestate}</if>
<if test= "examinename != null and examinename != ''" > and examinename like concat('%', #{examinename}, '%')</if>
<if test= "examinename != null and examinename != ''" > and u.examinename like concat('%', #{examinename}, '%')</if>
<if test= "examinedate != null " > and examinedate = #{examinedate}</if>
<if test= "examinedate != null " > and u.examinedate = #{examinedate}</if>
<if test= "examinestate != null and examinestate != ''" > and examinestate = #{examinestate}</if>
<if test= "examinestate != null and examinestate != ''" > and u.examinestate = #{examinestate}</if>
<!-- 数据范围过滤 -->
</where>
${params.dataScope}
</trim>
ORDER BY examinedate ASC
ORDER BY examinedate ASC
</select>
</select>