1234567891011121314151617181920212223242526272829303132333435 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.zy.bms.mapper.lp.LpInfoStateMapper">
- <select id="listPage" resultType="com.zy.bms.pojo.vo.LpDeviceListVo">
- SELECT
- t1.username,
- t1.password,
- t1.sn,
- t1.create_time,
- t1.group_id,
- t2.*
- FROM
- device_base t1
- LEFT JOIN lp_info_state t2 ON t1.open_num = t2.open_num
- WHERE t1.type = 'lupai'
- <if test="io.openNum != null and io.openNum != ''">
- AND t1.open_num LIKE CONCAT('%',#{io.openNum},'%')
- </if>
- <if test="io.groupId != null and io.groupId > -1">
- AND t1.group_id = #{io.groupId}
- </if>
- <if test="io.status != null and io.status > -1">
- AND t2.status = #{io.status}
- </if>
- </select>
- <update id="updateWakeAndThresh">
- UPDATE
- lp_info_state
- SET wake_int = #{entity.wakeInt},
- thresh = #{entity.thresh}
- WHERE open_num = #{entity.openNum}
- </update>
- </mapper>
|