1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.bosshand.virgo.ringzle.dao.IotEntityBimDao">
- <resultMap type="com.bosshand.virgo.ringzle.model.IotEntityBim" id="iotEntityBimResult">
- <id column="id" property="id"/>
- <result column="iotEntityId" property="iotEntityId"/>
- <result column="bimId" property="bimId"/>
- <result column="bimIntegrateId" property="bimIntegrateId"/>
- <result column="bimType" property="bimType"/>
- <result column="bindType" property="bindType"/>
- <result column="data" property="data"/>
- </resultMap>
- <insert id="batchSave" parameterType="com.bosshand.virgo.ringzle.model.IotEntityBim" useGeneratedKeys="true" keyProperty="id">
- INSERT INTO iot_entity_bim (iotEntityId,bimIntegrateId,bimId,bimType,bindType,data) VALUES
- <foreach collection="list" index="index" item="item" separator=",">
- (#{item.iotEntityId},#{item.bimIntegrateId},#{item.bimId},#{item.bimType},#{item.bindType},#{item.data})
- </foreach>
- </insert>
- <select id="getList" resultMap="iotEntityBimResult">
- select * from iot_entity_bim
- <where>
- <if test="id != 0">
- and id =#{id}
- </if>
- <if test="iotEntityId != null">
- and iotEntityId =#{iotEntityId}
- </if>
- <if test="bimId != null">
- and bimId =#{bimId}
- </if>
- <if test="bimIntegrateId != null">
- and bimIntegrateId =#{bimIntegrateId}
- </if>
- <if test="bimType != 0">
- and bimType =#{bimType}
- </if>
- <if test="bindType != null">
- and bindType =#{bindType}
- </if>
- </where>
- </select>
- <select id="getBimId" resultMap="iotEntityBimResult">
- select * from iot_entity_bim where bimId =#{bimId}
- </select>
- <select id="getBimIntegrateId" resultMap="iotEntityBimResult">
- select * from iot_entity_bim where bimIntegrateId =#{bimIntegrateId}
- </select>
- <select id="getIotEntityBimId" resultMap="iotEntityBimResult">
- select * from iot_entity_bim where iotEntityId =#{iotEntityId}
- </select>
- <update id="update">
- update iot_entity_bim
- <trim prefix="set" suffixOverrides=",">
- <if test="iotEntityId!=null">iotEntityId=#{iotEntityId},</if>
- <if test="bimId!=null">bimId=#{bimId},</if>
- <if test="bimIntegrateId!=null">bimIntegrateId=#{bimIntegrateId},</if>
- <if test="bimType!=0">bimType=#{bimType},</if>
- <if test="bindType!=null">bindType=#{bindType},</if>
- <if test="data!=null">data=#{data},</if>
- </trim>
- where id=#{id}
- </update>
- <delete id="delete">
- delete FROM iot_entity_bim where id=#{id}
- </delete>
- </mapper>
|