|
@@ -0,0 +1,210 @@
|
|
|
+<?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.zcxk.rmcp.core.dao.DeviceCommandMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.zcxk.rmcp.core.entity.DeviceCommand">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ <!--@Table rmcp_device_command-->
|
|
|
+ <id column="id" property="id" />
|
|
|
+ <result column="tenant_id" property="tenantId" />
|
|
|
+ <result column="device_id" property="deviceId" />
|
|
|
+ <result column="command_type" property="commandType" />
|
|
|
+ <result column="command_status" property="commandStatus" />
|
|
|
+ <result column="operation_type" property="operationType" />
|
|
|
+ <result column="remark" property="remark" />
|
|
|
+ <result column="command_id" property="commandId" />
|
|
|
+ <result column="issue_date" property="issueDate" />
|
|
|
+ <result column="finish_date" property="finishDate" />
|
|
|
+ <result column="params" property="params" />
|
|
|
+ <result column="platform" property="platform" />
|
|
|
+ <result column="relation_id" property="relationId" />
|
|
|
+ <result column="push_status" property="pushStatus" />
|
|
|
+ <result column="status" property="status" />
|
|
|
+ <result column="create_date" property="createDate" />
|
|
|
+ <result column="update_date" property="updateDate" />
|
|
|
+ <result column="create_by" property="createBy" />
|
|
|
+ <result column="update_by" property="updateBy" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ id, tenant_id, device_id, command_type, command_status, operation_type, remark, command_id,
|
|
|
+ issue_date, finish_date, params, platform, relation_id, push_status, `status`, create_date,
|
|
|
+ update_date, create_by, update_by
|
|
|
+ </sql>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.zcxk.rmcp.core.entity.DeviceCommand" useGeneratedKeys="true">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into rmcp_device_command
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id,
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null">
|
|
|
+ device_id,
|
|
|
+ </if>
|
|
|
+ <if test="commandType != null">
|
|
|
+ command_type,
|
|
|
+ </if>
|
|
|
+ <if test="commandStatus != null">
|
|
|
+ command_status,
|
|
|
+ </if>
|
|
|
+ <if test="operationType != null">
|
|
|
+ operation_type,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark,
|
|
|
+ </if>
|
|
|
+ <if test="commandId != null">
|
|
|
+ command_id,
|
|
|
+ </if>
|
|
|
+ <if test="issueDate != null">
|
|
|
+ issue_date,
|
|
|
+ </if>
|
|
|
+ <if test="finishDate != null">
|
|
|
+ finish_date,
|
|
|
+ </if>
|
|
|
+ <if test="params != null">
|
|
|
+ params,
|
|
|
+ </if>
|
|
|
+ <if test="platform != null">
|
|
|
+ platform,
|
|
|
+ </if>
|
|
|
+ <if test="relationId != null">
|
|
|
+ relation_id,
|
|
|
+ </if>
|
|
|
+ <if test="pushStatus != null">
|
|
|
+ push_status,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status`,
|
|
|
+ </if>
|
|
|
+ <if test="createDate != null">
|
|
|
+ create_date,
|
|
|
+ </if>
|
|
|
+ <if test="updateDate != null">
|
|
|
+ update_date,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="tenantId != null">
|
|
|
+ #{tenantId},
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null">
|
|
|
+ #{deviceId},
|
|
|
+ </if>
|
|
|
+ <if test="commandType != null">
|
|
|
+ #{commandType},
|
|
|
+ </if>
|
|
|
+ <if test="commandStatus != null">
|
|
|
+ #{commandStatus},
|
|
|
+ </if>
|
|
|
+ <if test="operationType != null">
|
|
|
+ #{operationType},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
+ <if test="commandId != null">
|
|
|
+ #{commandId},
|
|
|
+ </if>
|
|
|
+ <if test="issueDate != null">
|
|
|
+ #{issueDate},
|
|
|
+ </if>
|
|
|
+ <if test="finishDate != null">
|
|
|
+ #{finishDate},
|
|
|
+ </if>
|
|
|
+ <if test="params != null">
|
|
|
+ #{params},
|
|
|
+ </if>
|
|
|
+ <if test="platform != null">
|
|
|
+ #{platform},
|
|
|
+ </if>
|
|
|
+ <if test="relationId != null">
|
|
|
+ #{relationId},
|
|
|
+ </if>
|
|
|
+ <if test="pushStatus != null">
|
|
|
+ #{pushStatus},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status},
|
|
|
+ </if>
|
|
|
+ <if test="createDate != null">
|
|
|
+ #{createDate},
|
|
|
+ </if>
|
|
|
+ <if test="updateDate != null">
|
|
|
+ #{updateDate},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.zcxk.rmcp.core.entity.DeviceCommand">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ update rmcp_device_command
|
|
|
+ <set>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id = #{tenantId},
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null">
|
|
|
+ device_id = #{deviceId},
|
|
|
+ </if>
|
|
|
+ <if test="commandType != null">
|
|
|
+ command_type = #{commandType},
|
|
|
+ </if>
|
|
|
+ <if test="commandStatus != null">
|
|
|
+ command_status = #{commandStatus},
|
|
|
+ </if>
|
|
|
+ <if test="operationType != null">
|
|
|
+ operation_type = #{operationType},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark = #{remark},
|
|
|
+ </if>
|
|
|
+ <if test="commandId != null">
|
|
|
+ command_id = #{commandId},
|
|
|
+ </if>
|
|
|
+ <if test="issueDate != null">
|
|
|
+ issue_date = #{issueDate},
|
|
|
+ </if>
|
|
|
+ <if test="finishDate != null">
|
|
|
+ finish_date = #{finishDate},
|
|
|
+ </if>
|
|
|
+ <if test="params != null">
|
|
|
+ params = #{params},
|
|
|
+ </if>
|
|
|
+ <if test="platform != null">
|
|
|
+ platform = #{platform},
|
|
|
+ </if>
|
|
|
+ <if test="relationId != null">
|
|
|
+ relation_id = #{relationId},
|
|
|
+ </if>
|
|
|
+ <if test="pushStatus != null">
|
|
|
+ push_status = #{pushStatus},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status` = #{status},
|
|
|
+ </if>
|
|
|
+ <if test="createDate != null">
|
|
|
+ create_date = #{createDate},
|
|
|
+ </if>
|
|
|
+ <if test="updateDate != null">
|
|
|
+ update_date = #{updateDate},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by = #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by = #{updateBy},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+</mapper>
|