123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <?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.bz.smart_city.dao.DeviceValveRecordMapper">
- <resultMap id="BaseResultMap" type="com.bz.smart_city.entity.DeviceValveRecord">
- <!--@mbg.generated-->
- <!--@Table sc_device_valve_record-->
- <id column="id" property="id" />
- <result column="device_id" property="deviceId" />
- <result column="send_valve_status" property="sendValveStatus" />
- <result column="send_status" property="sendStatus" />
- <result column="command_id" property="commandId" />
- <result column="command_status" property="commandStatus" />
- <result column="remark" property="remark" />
- <result column="status" property="status" />
- <result column="date_create" property="dateCreate" />
- <result column="date_update" property="dateUpdate" />
- <result column="create_by" property="createBy" />
- <result column="update_by" property="updateBy" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, device_id, send_valve_status, send_status, command_id, command_status, remark,
- `status`, date_create, date_update, create_by, update_by
- </sql>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.DeviceValveRecord" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into sc_device_valve_record
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="deviceId != null">
- device_id,
- </if>
- <if test="sendValveStatus != null">
- send_valve_status,
- </if>
- <if test="sendStatus != null">
- send_status,
- </if>
- <if test="commandId != null">
- command_id,
- </if>
- <if test="commandStatus != null">
- command_status,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="status != null">
- `status`,
- </if>
- <if test="dateCreate != null">
- date_create,
- </if>
- <if test="dateUpdate != null">
- date_update,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="deviceId != null">
- #{deviceId},
- </if>
- <if test="sendValveStatus != null">
- #{sendValveStatus},
- </if>
- <if test="sendStatus != null">
- #{sendStatus},
- </if>
- <if test="commandId != null">
- #{commandId},
- </if>
- <if test="commandStatus != null">
- #{commandStatus},
- </if>
- <if test="remark != null">
- #{remark},
- </if>
- <if test="status != null">
- #{status},
- </if>
- <if test="dateCreate != null">
- #{dateCreate},
- </if>
- <if test="dateUpdate != null">
- #{dateUpdate},
- </if>
- <if test="createBy != null">
- #{createBy},
- </if>
- <if test="updateBy != null">
- #{updateBy},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.bz.smart_city.entity.DeviceValveRecord">
- <!--@mbg.generated-->
- update sc_device_valve_record
- <set>
- <if test="deviceId != null">
- device_id = #{deviceId},
- </if>
- <if test="sendValveStatus != null">
- send_valve_status = #{sendValveStatus},
- </if>
- <if test="sendStatus != null">
- send_status = #{sendStatus},
- </if>
- <if test="commandId != null">
- command_id = #{commandId},
- </if>
- <if test="commandStatus != null">
- command_status = #{commandStatus},
- </if>
- <if test="remark != null">
- remark = #{remark},
- </if>
- <if test="status != null">
- `status` = #{status},
- </if>
- <if test="dateCreate != null">
- date_create = #{dateCreate},
- </if>
- <if test="dateUpdate != null">
- date_update = #{dateUpdate},
- </if>
- <if test="createBy != null">
- create_by = #{createBy},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy},
- </if>
- </set>
- where id = #{id}
- </update>
- </mapper>
|