MqttLogMapping.xml 794 B

123456789101112131415161718192021222324
  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.zy.bms.mapper.MqttLogMapper">
  6. <select id="getListPage" resultType="com.zy.bms.model.MqttLog">
  7. SELECT
  8. *
  9. FROM
  10. mqtt_log
  11. <where>
  12. <if test="io.deviceId != null and io.deviceId != ''">
  13. AND deviceId LIKE CONCAT("%",#{io.deviceId},"%")
  14. </if>
  15. <if test="io.tag != null and io.tag >-1">
  16. AND tag = #{io.tag}
  17. </if>
  18. <if test="io.instruction != null and io.instruction >-1">
  19. AND instruction = #{io.instruction}
  20. </if>
  21. </where>
  22. </select>
  23. </mapper>