123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?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.TCtldevinfoBypeMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBype" >
- <id column="tc_id" property="tcId" jdbcType="INTEGER" />
- <result column="tc_code" property="tcCode" jdbcType="INTEGER" />
- <result column="tc_name" property="tcName" jdbcType="VARCHAR" />
- <result column="tc_start" property="tcStart" jdbcType="VARCHAR" />
- <result column="tc_stop" property="tcStop" jdbcType="VARCHAR" />
- <result column="tc_byte" property="tcByte" jdbcType="VARCHAR" />
- <result column="up_or_down" property="upOrDown" 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" >
- tc_id, tc_code, tc_name, tc_start, tc_stop, tc_byte, up_or_down
- </sql>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBypeExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from t_ctldevinfo_bype
- <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.Integer" >
- select
- <include refid="Base_Column_List" />
- from t_ctldevinfo_bype
- where tc_id = #{tcId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from t_ctldevinfo_bype
- where tc_id = #{tcId,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBypeExample" >
- delete from t_ctldevinfo_bype
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBype" >
- insert into t_ctldevinfo_bype (tc_id, tc_code, tc_name,
- tc_start, tc_stop, tc_byte,
- up_or_down)
- values (#{tcId,jdbcType=INTEGER}, #{tcCode,jdbcType=INTEGER}, #{tcName,jdbcType=VARCHAR},
- #{tcStart,jdbcType=VARCHAR}, #{tcStop,jdbcType=VARCHAR}, #{tcByte,jdbcType=VARCHAR},
- #{upOrDown,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBype" >
- insert into t_ctldevinfo_bype
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="tcId != null" >
- tc_id,
- </if>
- <if test="tcCode != null" >
- tc_code,
- </if>
- <if test="tcName != null" >
- tc_name,
- </if>
- <if test="tcStart != null" >
- tc_start,
- </if>
- <if test="tcStop != null" >
- tc_stop,
- </if>
- <if test="tcByte != null" >
- tc_byte,
- </if>
- <if test="upOrDown != null" >
- up_or_down,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="tcId != null" >
- #{tcId,jdbcType=INTEGER},
- </if>
- <if test="tcCode != null" >
- #{tcCode,jdbcType=INTEGER},
- </if>
- <if test="tcName != null" >
- #{tcName,jdbcType=VARCHAR},
- </if>
- <if test="tcStart != null" >
- #{tcStart,jdbcType=VARCHAR},
- </if>
- <if test="tcStop != null" >
- #{tcStop,jdbcType=VARCHAR},
- </if>
- <if test="tcByte != null" >
- #{tcByte,jdbcType=VARCHAR},
- </if>
- <if test="upOrDown != null" >
- #{upOrDown,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBypeExample" resultType="java.lang.Integer" >
- select count(*) from t_ctldevinfo_bype
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update t_ctldevinfo_bype
- <set >
- <if test="record.tcId != null" >
- tc_id = #{record.tcId,jdbcType=INTEGER},
- </if>
- <if test="record.tcCode != null" >
- tc_code = #{record.tcCode,jdbcType=INTEGER},
- </if>
- <if test="record.tcName != null" >
- tc_name = #{record.tcName,jdbcType=VARCHAR},
- </if>
- <if test="record.tcStart != null" >
- tc_start = #{record.tcStart,jdbcType=VARCHAR},
- </if>
- <if test="record.tcStop != null" >
- tc_stop = #{record.tcStop,jdbcType=VARCHAR},
- </if>
- <if test="record.tcByte != null" >
- tc_byte = #{record.tcByte,jdbcType=VARCHAR},
- </if>
- <if test="record.upOrDown != null" >
- up_or_down = #{record.upOrDown,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_bype
- set tc_id = #{record.tcId,jdbcType=INTEGER},
- tc_code = #{record.tcCode,jdbcType=INTEGER},
- tc_name = #{record.tcName,jdbcType=VARCHAR},
- tc_start = #{record.tcStart,jdbcType=VARCHAR},
- tc_stop = #{record.tcStop,jdbcType=VARCHAR},
- tc_byte = #{record.tcByte,jdbcType=VARCHAR},
- up_or_down = #{record.upOrDown,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.TCtldevinfoBype" >
- update t_ctldevinfo_bype
- <set >
- <if test="tcCode != null" >
- tc_code = #{tcCode,jdbcType=INTEGER},
- </if>
- <if test="tcName != null" >
- tc_name = #{tcName,jdbcType=VARCHAR},
- </if>
- <if test="tcStart != null" >
- tc_start = #{tcStart,jdbcType=VARCHAR},
- </if>
- <if test="tcStop != null" >
- tc_stop = #{tcStop,jdbcType=VARCHAR},
- </if>
- <if test="tcByte != null" >
- tc_byte = #{tcByte,jdbcType=VARCHAR},
- </if>
- <if test="upOrDown != null" >
- up_or_down = #{upOrDown,jdbcType=INTEGER},
- </if>
- </set>
- where tc_id = #{tcId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TCtldevinfoBype" >
- update t_ctldevinfo_bype
- set tc_code = #{tcCode,jdbcType=INTEGER},
- tc_name = #{tcName,jdbcType=VARCHAR},
- tc_start = #{tcStart,jdbcType=VARCHAR},
- tc_stop = #{tcStop,jdbcType=VARCHAR},
- tc_byte = #{tcByte,jdbcType=VARCHAR},
- up_or_down = #{upOrDown,jdbcType=INTEGER}
- where tc_id = #{tcId,jdbcType=INTEGER}
- </update>
- </mapper>
|