LogsMapping.xml 987 B

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.zy.bms.mapper.LogsMapper">
  4. <select id="listPage" resultType="com.zy.bms.pojo.vo.LogsVo">
  5. SELECT
  6. t1.topic,
  7. t1.type,
  8. t1.open_num,
  9. t1.content,
  10. t1.m,
  11. t1.create_time,
  12. t2.remark
  13. FROM
  14. logs t1
  15. LEFT JOIN instructions t2 ON t1.m = t2.code
  16. <where>
  17. <if test="io.openNum != null and io.openNum != ''">
  18. AND t1.open_num LIKE CONCAT("%",#{io.openNum},"%")
  19. </if>
  20. <if test="io.type != null and io.type > -1">
  21. AND t1.type = #{io.type}
  22. </if>
  23. <if test="io.m != null and io.m !=''">
  24. AND t1.m = #{io.m}
  25. </if>
  26. </where>
  27. ORDER BY t1.create_time DESC
  28. </select>
  29. </mapper>