UbiInfoStateMapper.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.ubi.UbiInfoStateMapper">
  4. <select id="listPage" resultType="com.zy.bms.pojo.vo.UbiDeviceListVo">
  5. SELECT
  6. t1.open_num,
  7. t1.username,
  8. t1.password,
  9. t1.sn,
  10. t1.create_time,
  11. t1.group_id,
  12. t2.*
  13. FROM
  14. device_base t1
  15. LEFT JOIN
  16. ubi_info_state t2 ON t1.open_num = t2.open_num
  17. WHERE
  18. t1.type = "gnss"
  19. <if test="io.openNum != null and io.openNum != ''">
  20. AND t1.open_num LIKE CONCAT('%',#{io.openNum},'%')
  21. </if>
  22. <if test="io.groupId != null and io.groupId > -1">
  23. AND t1.group_id = #{io.groupId}
  24. </if>
  25. <if test="io.status != null and io.status > -1">
  26. AND t2.status = #{io.status}
  27. </if>
  28. </select>
  29. <select id="getDetail" resultType="com.zy.bms.pojo.vo.UbiDeviceDetailVo">
  30. SELECT
  31. *
  32. FROM
  33. ubi_info_state
  34. WHERE
  35. open_num = #{openNum}
  36. </select>
  37. <select id="listByGroupIdWx" resultType="com.zy.bms.pojo.vo.UbiDeviceListVo">
  38. SELECT
  39. t1.open_num,
  40. t2.freq,
  41. t2.update_time
  42. FROM
  43. device_base t1
  44. LEFT JOIN
  45. ubi_info_state t2 ON t1.open_num = t2.open_num
  46. WHERE
  47. t1.type = "gnss" AND t1.group_id = #{group}
  48. </select>
  49. </mapper>