LpInfoStateMapper.xml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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.lp.LpInfoStateMapper">
  4. <select id="listPage" resultType="com.zy.bms.pojo.vo.LpDeviceListVo">
  5. SELECT
  6. t1.username,
  7. t1.password,
  8. t1.sn,
  9. t1.create_time,
  10. t1.group_id,
  11. t2.*
  12. FROM
  13. device_base t1
  14. LEFT JOIN lp_info_state t2 ON t1.open_num = t2.open_num
  15. WHERE t1.type = 'lupai'
  16. <if test="io.openNum != null and io.openNum != ''">
  17. AND t1.open_num LIKE CONCAT('%',#{io.openNum},'%')
  18. </if>
  19. <if test="io.groupId != null and io.groupId > -1">
  20. AND t1.group_id = #{io.groupId}
  21. </if>
  22. <if test="io.status != null and io.status > -1">
  23. AND t2.status = #{io.status}
  24. </if>
  25. </select>
  26. <update id="updateWakeAndThresh">
  27. UPDATE
  28. lp_info_state
  29. SET wake_int = #{entity.wakeInt},
  30. thresh = #{entity.thresh}
  31. WHERE open_num = #{entity.openNum}
  32. </update>
  33. </mapper>