ReservationSchoolMapper.xml 1.0 KB

123456789101112131415161718
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.personnel.mapper.ReservationSchoolMapper">
  6. <select id="getVisionList" resultType="com.xjrsoft.module.attendance.vo.VisitorInfoVo">
  7. SELECT t1.name,t1.identity_card,t1.phone,t3.name AS respondent_user_name,t2.reason,t4.name AS dept_name,t2.start_time,t2.end_time,t2.create_date FROM reservation_school_people t1
  8. INNER JOIN reservation_school t2 ON t1.reservation_schoo_id = t2.id
  9. LEFT JOIN xjr_user t3 ON t2.respondent_user_id = t3.id
  10. LEFT JOIN xjr_department t4 ON t2.dept_id = t4.id
  11. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0 AND t2.status = 1
  12. AND (
  13. (#{date} between start_time and end_time) or
  14. (#{date} between DATE_FORMAT(start_time, '%Y-%m-%d') and DATE_FORMAT(start_time, '%Y-%m-%d'))
  15. )
  16. </select>
  17. </mapper>