@ -73,15 +73,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<iftest="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
<!-- and <![CDATA[ u.create_time >= convert(datetime, #{params.beginTime}, 20)]]>-->
and datediff(d, u.create_time, #{params.beginTime}) <![CDATA[<=]]> 0
AND u.create_time <![CDATA[>=]]> #{params.beginTime}
</if>
<iftest="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
<!-- and <![CDATA[ u.create_time <= convert(datetime, #{params.endTime}, 20)]]>-->
and datediff(d, u.create_time, #{params.endTime}) <![CDATA[>=]]> 0
AND u.create_time <![CDATA[<=]]> #{params.endTime}
</if>
<iftest="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE charindex(',' + CONVERT (nvarchar, #{deptId}), ',' + ancestors) > 0 ))
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE LOCATE(CONCAT(',', #{deptId}, ','), CONCAT(',', ancestors, ',')) > 0 ))