111
This commit is contained in:
1 parent
68a2b4f68c
commit
7cd697187c
308 files changed
+30454
-75
No files matched your search
@@ -0,0 +1,82 @@
|
||||
<?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.luqj.ec.mapper.EcDeviceCommandMapper">
|
||||
|
||||
<resultMap type="EcDeviceCommand" id="EcDeviceCommandResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="commandType" column="command_type" />
|
||||
<result property="commandContent" column="command_content" />
|
||||
<result property="status" column="status" />
|
||||
<result property="sendTime" column="send_time" />
|
||||
<result property="executeTime" column="execute_time" />
|
||||
<result property="finishTime" column="finish_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEcDeviceCommandVo">
|
||||
select id, device_id, command_type, command_content, status, send_time, execute_time, finish_time from ec_device_command
|
||||
</sql>
|
||||
|
||||
<select id="selectEcDeviceCommandList" parameterType="EcDeviceCommand" resultMap="EcDeviceCommandResult">
|
||||
<include refid="selectEcDeviceCommandVo"/>
|
||||
<where>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="commandType != null and commandType != ''"> and command_type = #{commandType}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEcDeviceCommandById" parameterType="Long" resultMap="EcDeviceCommandResult">
|
||||
<include refid="selectEcDeviceCommandVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEcDeviceCommand" parameterType="EcDeviceCommand" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ec_device_command
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="commandType != null">command_type,</if>
|
||||
<if test="commandContent != null">command_content,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="sendTime != null">send_time,</if>
|
||||
<if test="executeTime != null">execute_time,</if>
|
||||
<if test="finishTime != null">finish_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="commandType != null">#{commandType},</if>
|
||||
<if test="commandContent != null">#{commandContent},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="sendTime != null">#{sendTime},</if>
|
||||
<if test="executeTime != null">#{executeTime},</if>
|
||||
<if test="finishTime != null">#{finishTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEcDeviceCommand" parameterType="EcDeviceCommand">
|
||||
update ec_device_command
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="commandType != null">command_type = #{commandType},</if>
|
||||
<if test="commandContent != null">command_content = #{commandContent},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="executeTime != null">execute_time = #{executeTime},</if>
|
||||
<if test="finishTime != null">finish_time = #{finishTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEcDeviceCommandById" parameterType="Long">
|
||||
delete from ec_device_command where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEcDeviceCommandByIds" parameterType="String">
|
||||
delete from ec_device_command where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user