|
@@ -26,10 +26,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectOpeningDoorRecordVo"/>
|
|
|
<where>
|
|
|
<if test="entranceGuardName != null and entranceGuardName != ''"> and entrance_guard_name like concat('%', #{entranceGuardName}, '%')</if>
|
|
|
- <if test="controlsTime != null and controlsTime != ''"> and controls_time = #{controlsTime}</if>
|
|
|
+ <if test="controlsTime != null and controlsTime != ''">
|
|
|
+ AND date_format(controls_time,'%y%m%d') = date_format(#{controlsTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
|
|
|
<if test="createDept != null "> and create_dept = #{createDept}</if>
|
|
|
+ <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
|
|
|
+ AND controls_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
+ AND controls_time <= #{endTime}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|