<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.casic.missiles.modular.system.dao.VisitorApplyMapper"> <select id="selectApplyList" resultType="com.casic.missiles.modular.system.model.VisitorApply"> SELECT * FROM bus_visit_apply WHERE 1=1 <if test="request.keywords != null and request.keywords !=''"> and (apply_no like concat('%',#{request.keywords},'%') or staff_code like concat('%',#{request.keywords},'%') or visitor_name like concat('%',#{request.keywords},'%') or visitor_phone like concat('%',#{request.keywords},'%')) </if> <if test="request.startTime != null and request.startTime !=''"> and in_time >= #{request.startTime} </if> <if test="request.endTime != null and request.endTime != ''"> and out_time <= #{request.endTime} </if> <if test="request.status != null and request.status != ''"> and admin_visitor_apply_status <= #{request.status} </if> ORDER BY create_time DESC </select> </mapper>