| | |
| | | <mapper namespace="com.sandu.ximon.dao.mapper.LightMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.Light"> |
| | | <id property="lightId" column="light_id" jdbcType="BIGINT"/> |
| | | <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="lightPercent" column="light_percent" jdbcType="INTEGER"/> |
| | | <result property="light2Percent" column="light2_percent" jdbcType="INTEGER"/> |
| | | <result property="power1" column="power1" jdbcType="INTEGER"/> |
| | | <result property="power2" column="power2" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <id property="lightId" column="light_id" jdbcType="BIGINT"/> |
| | | <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="lightPercent" column="light_percent" jdbcType="INTEGER"/> |
| | | <result property="light2Percent" column="light2_percent" jdbcType="INTEGER"/> |
| | | <result property="power1" column="power1" jdbcType="INTEGER"/> |
| | | <result property="power2" column="power2" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="listLight" type="com.sandu.ximon.dao.bo.LightBo" extends="BaseResultMap"> |
| | |
| | | <if test="clientId != null"> |
| | | AND (t2.user_id = #{clientId} OR t2.client_id = #{clientId}) |
| | | </if> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND ( |
| | | t1.device_code LIKE CONCAT('%', #{keyword},'%') |
| | | OR t2.pole_name LIKE CONCAT('%', #{keyword},'%') |
| | | ) |
| | | </if> |
| | | <if test="deviceCode != null"> |
| | | AND t2.device_code = #{deviceCode} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |