|  |  |  | 
|---|
|  |  |  | <!-- 通用查询映射结果 --> | 
|---|
|  |  |  | <resultMap id="BaseResultMap" type="com.moral.api.entity.DeviceAdjustValue"> | 
|---|
|  |  |  | <id column="id" property="id" /> | 
|---|
|  |  |  | <result column="device_id" property="deviceId" /> | 
|---|
|  |  |  | <result column="mac" property="mac" /> | 
|---|
|  |  |  | <result column="start_time" property="startTime" /> | 
|---|
|  |  |  | <result column="end_time" property="endTime" /> | 
|---|
|  |  |  | <result column="sensor_code" property="sensorCode" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <result column="is_delete" property="isDelete" /> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <sql id="Base_Column_List"> | 
|---|
|  |  |  | das.id,das.mac,das.start_time,das.end_time,das.sensor_code,das.value,das.create_time,das.update_time,das.is_delete | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="updateDeviceAdjustValue" parameterType="java.util.Map"> | 
|---|
|  |  |  | update device_adjust_value | 
|---|
|  |  |  | <set> | 
|---|
|  |  |  | <if test="mac != null"> | 
|---|
|  |  |  | name = #{mac}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="start_time != null"> | 
|---|
|  |  |  | start_time = #{start_time}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="end_time != null"> | 
|---|
|  |  |  | end_time = #{end_time}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="value != null"> | 
|---|
|  |  |  | value = #{value}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="is_delete != null"> | 
|---|
|  |  |  | is_delete = #{is_delete}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | where id = #{id} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|