SaeVrRecordMapper.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132
  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.zhgd.scs.mapper.SaeVrRecordMapper">
  6. <resultMap id="BaseResultMap" type="com.zhgd.scs.domain.SaeVrRecord">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="type" column="type" jdbcType="INTEGER"/>
  9. <result property="personId" column="person_id" jdbcType="BIGINT"/>
  10. <result property="unitName" column="unit_name" jdbcType="VARCHAR"/>
  11. <result property="personName" column="person_name" jdbcType="VARCHAR"/>
  12. <result property="eduTime" column="edu_time" jdbcType="TIMESTAMP"/>
  13. <result property="fileUrl" column="file_url" jdbcType="VARCHAR"/>
  14. </resultMap>
  15. <select id="pagelist" resultType="com.zhgd.scs.domain.vo.SaeVrRecordPageVo">
  16. SELECT r.*
  17. FROM sae_vr_record r
  18. LEFT JOIN sys_worker_type wt ON wt.id=r.worker_type_id
  19. WHERE 1=1
  20. <if test="type!=null">
  21. AND r.type = #{type}
  22. </if>
  23. <if test="personName!=null and personName!= ''">
  24. AND r.person_name LIKE concat('%',#{personName},'%')
  25. </if>
  26. <if test="startTime!=null and endTime!=null">
  27. AND r.edu_time BETWEEN #{startTime} AND #{endTime}
  28. </if>
  29. </select>
  30. </mapper>