| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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.yunfeiyun.agmp.iotm.web.mapper.IotSfElementfactorMapper">
- <select id="selectIotSfElementfactorList" parameterType="com.yunfeiyun.agmp.iotm.device.sf.domain.IotSfElementfactorListReqVo"
- resultType="com.yunfeiyun.agmp.iot.common.domain.IotSfElementfactor" >
- SELECT sf.id, sf.sfBid, sf.sfType, sf.sfCode, sf.sfName, sf.sfDisplayname, sf.sfParentBid, sf.sfSequence,
- sf.tid, sf.sfCreatedDate, sf.sfCreator, sf.sfModifieddate, sf.sfModifier
- FROM IotSfElementfactor AS sf
- <where>
- tid = #{tid}
- <if test="sfBid!= null and sfBid!= ''"> and sf.sfBid = #{sfBid}</if>
- <if test="sfType!= null and sfType!= ''"> and sf.sfType = #{sfType}</if>
- <if test="sfCode!= null and sfCode!= ''"> and sf.sfCode = #{sfCode}</if>
- <if test="sfName!= null and sfName!= ''"> and sf.sfName like concat('%', #{sfName}, '%')</if>
- <if test="sfDisplayname!= null and sfDisplayname!= ''"> and sf.sfDisplayname like concat('%', #{sfDisplayname}, '%')</if>
- <if test="sfParentBid!= null and sfParentBid!= ''"> and sf.sfParentBid = #{sfParentBid}</if>
- <if test="sfSequence!= null and sfSequence!= ''"> and sf.sfSequence = #{sfSequence}</if>
- <if test="tid!= null and tid!= ''"> and sf.tid = #{tid}</if>
- <if test="sfCreatedDate!= null and sfCreatedDate!= ''"> and sf.sfCreatedDate = #{sfCreatedDate}</if>
- <if test="sfCreator!= null and sfCreator!= ''"> and sf.sfCreator = #{sfCreator}</if>
- <if test="sfModifieddate!= null and sfModifieddate!= ''"> and sf.sfModifieddate = #{sfModifieddate}</if>
- <if test="sfModifier!= null and sfModifier!= ''"> and sf.sfModifier = #{sfModifier}</if>
- <if test="sfTypeList != null and sfTypeList.size() > 0">
- and sf.sfType in
- <foreach collection="sfTypeList" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- </select>
- <insert id="batchInsertIotSfElementfactor">
- INSERT INTO IotSfElementfactor (id, sfBid, devBid, sfType, sfCode, sfName, sfDisplayname, sfParentBid, sfSequence,
- tid, sfCreatedDate, sfCreator, sfModifieddate, sfModifier)
- VALUES
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.id}, #{item.sfBid}, #{item.devBid}, #{item.sfType}, #{item.sfCode}, #{item.sfName}, #{item.sfDisplayname}, #{item.sfParentBid}, #{item.sfSequence},
- #{item.tid}, #{item.sfCreatedDate}, #{item.sfCreator}, #{item.sfModifieddate}, #{item.sfModifier})
- </foreach>
- </insert>
- </mapper>
|