123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 |
- <?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.chinaitop.depot.intelligent.ventilation.mapper.TCtldevinfoMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfo" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="vdevcode" property="vdevcode" jdbcType="VARCHAR" />
- <result column="vdevname" property="vdevname" jdbcType="VARCHAR" />
- <result column="idevtdh" property="idevtdh" jdbcType="INTEGER" />
- <result column="vdevkindcode" property="vdevkindcode" jdbcType="VARCHAR" />
- <result column="sitecode" property="sitecode" jdbcType="VARCHAR" />
- <result column="vcfcode" property="vcfcode" jdbcType="VARCHAR" />
- <result column="vposition" property="vposition" jdbcType="VARCHAR" />
- <result column="valarmstatue" property="valarmstatue" jdbcType="VARCHAR" />
- <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
- <result column="remark" property="remark" jdbcType="VARCHAR" />
- <result column="vstatue" property="vstatue" jdbcType="VARCHAR" />
- <result column="org_id" property="orgId" jdbcType="INTEGER" />
- <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Example_Where_Clause" >
- <where >
- <foreach collection="oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause" >
- <where >
- <foreach collection="example.oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List" >
- id, vdevcode, vdevname, idevtdh, vdevkindcode, sitecode, vcfcode, vposition, valarmstatue,
- updatetime, remark, vstatue, org_id, del_flag
- </sql>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from t_ctldevinfo
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from t_ctldevinfo
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from t_ctldevinfo
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoExample" >
- delete from t_ctldevinfo
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfo" >
- insert into t_ctldevinfo (id, vdevcode, vdevname,
- idevtdh, vdevkindcode, sitecode,
- vcfcode, vposition, valarmstatue,
- updatetime, remark, vstatue,
- org_id, del_flag)
- values (#{id,jdbcType=VARCHAR}, #{vdevcode,jdbcType=VARCHAR}, #{vdevname,jdbcType=VARCHAR},
- #{idevtdh,jdbcType=INTEGER}, #{vdevkindcode,jdbcType=VARCHAR}, #{sitecode,jdbcType=VARCHAR},
- #{vcfcode,jdbcType=VARCHAR}, #{vposition,jdbcType=VARCHAR}, #{valarmstatue,jdbcType=VARCHAR},
- #{updatetime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{vstatue,jdbcType=VARCHAR},
- #{orgId,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfo" >
- insert into t_ctldevinfo
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="vdevcode != null" >
- vdevcode,
- </if>
- <if test="vdevname != null" >
- vdevname,
- </if>
- <if test="idevtdh != null" >
- idevtdh,
- </if>
- <if test="vdevkindcode != null" >
- vdevkindcode,
- </if>
- <if test="sitecode != null" >
- sitecode,
- </if>
- <if test="vcfcode != null" >
- vcfcode,
- </if>
- <if test="vposition != null" >
- vposition,
- </if>
- <if test="valarmstatue != null" >
- valarmstatue,
- </if>
- <if test="updatetime != null" >
- updatetime,
- </if>
- <if test="remark != null" >
- remark,
- </if>
- <if test="vstatue != null" >
- vstatue,
- </if>
- <if test="orgId != null" >
- org_id,
- </if>
- <if test="delFlag != null" >
- del_flag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="vdevcode != null" >
- #{vdevcode,jdbcType=VARCHAR},
- </if>
- <if test="vdevname != null" >
- #{vdevname,jdbcType=VARCHAR},
- </if>
- <if test="idevtdh != null" >
- #{idevtdh,jdbcType=INTEGER},
- </if>
- <if test="vdevkindcode != null" >
- #{vdevkindcode,jdbcType=VARCHAR},
- </if>
- <if test="sitecode != null" >
- #{sitecode,jdbcType=VARCHAR},
- </if>
- <if test="vcfcode != null" >
- #{vcfcode,jdbcType=VARCHAR},
- </if>
- <if test="vposition != null" >
- #{vposition,jdbcType=VARCHAR},
- </if>
- <if test="valarmstatue != null" >
- #{valarmstatue,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="remark != null" >
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="vstatue != null" >
- #{vstatue,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- #{orgId,jdbcType=INTEGER},
- </if>
- <if test="delFlag != null" >
- #{delFlag,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoExample" resultType="java.lang.Integer" >
- select count(*) from t_ctldevinfo
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update t_ctldevinfo
- <set >
- <if test="record.id != null" >
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.vdevcode != null" >
- vdevcode = #{record.vdevcode,jdbcType=VARCHAR},
- </if>
- <if test="record.vdevname != null" >
- vdevname = #{record.vdevname,jdbcType=VARCHAR},
- </if>
- <if test="record.idevtdh != null" >
- idevtdh = #{record.idevtdh,jdbcType=INTEGER},
- </if>
- <if test="record.vdevkindcode != null" >
- vdevkindcode = #{record.vdevkindcode,jdbcType=VARCHAR},
- </if>
- <if test="record.sitecode != null" >
- sitecode = #{record.sitecode,jdbcType=VARCHAR},
- </if>
- <if test="record.vcfcode != null" >
- vcfcode = #{record.vcfcode,jdbcType=VARCHAR},
- </if>
- <if test="record.vposition != null" >
- vposition = #{record.vposition,jdbcType=VARCHAR},
- </if>
- <if test="record.valarmstatue != null" >
- valarmstatue = #{record.valarmstatue,jdbcType=VARCHAR},
- </if>
- <if test="record.updatetime != null" >
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.remark != null" >
- remark = #{record.remark,jdbcType=VARCHAR},
- </if>
- <if test="record.vstatue != null" >
- vstatue = #{record.vstatue,jdbcType=VARCHAR},
- </if>
- <if test="record.orgId != null" >
- org_id = #{record.orgId,jdbcType=INTEGER},
- </if>
- <if test="record.delFlag != null" >
- del_flag = #{record.delFlag,jdbcType=INTEGER},
- </if>
- </set>
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map" >
- update t_ctldevinfo
- set id = #{record.id,jdbcType=VARCHAR},
- vdevcode = #{record.vdevcode,jdbcType=VARCHAR},
- vdevname = #{record.vdevname,jdbcType=VARCHAR},
- idevtdh = #{record.idevtdh,jdbcType=INTEGER},
- vdevkindcode = #{record.vdevkindcode,jdbcType=VARCHAR},
- sitecode = #{record.sitecode,jdbcType=VARCHAR},
- vcfcode = #{record.vcfcode,jdbcType=VARCHAR},
- vposition = #{record.vposition,jdbcType=VARCHAR},
- valarmstatue = #{record.valarmstatue,jdbcType=VARCHAR},
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- remark = #{record.remark,jdbcType=VARCHAR},
- vstatue = #{record.vstatue,jdbcType=VARCHAR},
- org_id = #{record.orgId,jdbcType=INTEGER},
- del_flag = #{record.delFlag,jdbcType=INTEGER}
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfo" >
- update t_ctldevinfo
- <set >
- <if test="vdevcode != null" >
- vdevcode = #{vdevcode,jdbcType=VARCHAR},
- </if>
- <if test="vdevname != null" >
- vdevname = #{vdevname,jdbcType=VARCHAR},
- </if>
- <if test="idevtdh != null" >
- idevtdh = #{idevtdh,jdbcType=INTEGER},
- </if>
- <if test="vdevkindcode != null" >
- vdevkindcode = #{vdevkindcode,jdbcType=VARCHAR},
- </if>
- <if test="sitecode != null" >
- sitecode = #{sitecode,jdbcType=VARCHAR},
- </if>
- <if test="vcfcode != null" >
- vcfcode = #{vcfcode,jdbcType=VARCHAR},
- </if>
- <if test="vposition != null" >
- vposition = #{vposition,jdbcType=VARCHAR},
- </if>
- <if test="valarmstatue != null" >
- valarmstatue = #{valarmstatue,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- updatetime = #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="remark != null" >
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="vstatue != null" >
- vstatue = #{vstatue,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- org_id = #{orgId,jdbcType=INTEGER},
- </if>
- <if test="delFlag != null" >
- del_flag = #{delFlag,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfo" >
- update t_ctldevinfo
- set vdevcode = #{vdevcode,jdbcType=VARCHAR},
- vdevname = #{vdevname,jdbcType=VARCHAR},
- idevtdh = #{idevtdh,jdbcType=INTEGER},
- vdevkindcode = #{vdevkindcode,jdbcType=VARCHAR},
- sitecode = #{sitecode,jdbcType=VARCHAR},
- vcfcode = #{vcfcode,jdbcType=VARCHAR},
- vposition = #{vposition,jdbcType=VARCHAR},
- valarmstatue = #{valarmstatue,jdbcType=VARCHAR},
- updatetime = #{updatetime,jdbcType=TIMESTAMP},
- remark = #{remark,jdbcType=VARCHAR},
- vstatue = #{vstatue,jdbcType=VARCHAR},
- org_id = #{orgId,jdbcType=INTEGER},
- del_flag = #{delFlag,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <!-- 根据仓房,设备类型获取设备信息 -->
- <select id="selectBycf" parameterType="java.util.Map" resultMap="BaseResultMap">
- select <include refid="Base_Column_List" />
- from t_ctldevinfo where
- vcfcode = #{vcfcode,jdbcType=VARCHAR} and vdevkindcode = #{vdevkindcode,jdbcType=VARCHAR}
- </select>
- </mapper>
|