123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 |
- <?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.basicdata.mapper.TDevDataMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TDevData" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="vDevCode" property="vdevcode" jdbcType="VARCHAR" />
- <result column="vDevName" property="vdevname" jdbcType="VARCHAR" />
- <result column="vDevKindCode" property="vdevkindcode" jdbcType="VARCHAR" />
- <result column="vUnit" property="vunit" jdbcType="VARCHAR" />
- <result column="fAddValue" property="faddvalue" jdbcType="INTEGER" />
- <result column="vIn_Out" property="vinOut" jdbcType="INTEGER" />
- <result column="vZdCode" property="vzdcode" jdbcType="VARCHAR" />
- <result column="vCfCode" property="vcfcode" jdbcType="VARCHAR" />
- <result column="vDevXh" property="vdevxh" jdbcType="VARCHAR" />
- <result column="fValue" property="fvalue" jdbcType="INTEGER" />
- <result column="vValueTime" property="vvaluetime" jdbcType="TIMESTAMP" />
- <result column="vStatue" property="vstatue" jdbcType="INTEGER" />
- <result column="vUpdatetime" property="vupdatetime" jdbcType="TIMESTAMP" />
- <result column="vRemark" property="vremark" jdbcType="VARCHAR" />
- </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, vDevKindCode, vUnit, fAddValue, vIn_Out, vZdCode, vCfCode,
- vDevXh, fValue, vValueTime, vStatue, vUpdatetime, vRemark
- </sql>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevDataExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from t_dev_data
- <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_dev_data
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from t_dev_data
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevDataExample" >
- delete from t_dev_data
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevData" >
- insert into t_dev_data (id, vDevCode, vDevName,
- vDevKindCode, vUnit, fAddValue,
- vIn_Out, vZdCode, vCfCode,
- vDevXh, fValue, vValueTime,
- vStatue, vUpdatetime, vRemark
- )
- values (#{id,jdbcType=VARCHAR}, #{vdevcode,jdbcType=VARCHAR}, #{vdevname,jdbcType=VARCHAR},
- #{vdevkindcode,jdbcType=VARCHAR}, #{vunit,jdbcType=VARCHAR}, #{faddvalue,jdbcType=INTEGER},
- #{vinOut,jdbcType=INTEGER}, #{vzdcode,jdbcType=VARCHAR}, #{vcfcode,jdbcType=VARCHAR},
- #{vdevxh,jdbcType=VARCHAR}, #{fvalue,jdbcType=INTEGER}, #{vvaluetime,jdbcType=TIMESTAMP},
- #{vstatue,jdbcType=INTEGER}, #{vupdatetime,jdbcType=TIMESTAMP}, #{vremark,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevData" >
- insert into t_dev_data
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="vdevcode != null" >
- vDevCode,
- </if>
- <if test="vdevname != null" >
- vDevName,
- </if>
- <if test="vdevkindcode != null" >
- vDevKindCode,
- </if>
- <if test="vunit != null" >
- vUnit,
- </if>
- <if test="faddvalue != null" >
- fAddValue,
- </if>
- <if test="vinOut != null" >
- vIn_Out,
- </if>
- <if test="vzdcode != null" >
- vZdCode,
- </if>
- <if test="vcfcode != null" >
- vCfCode,
- </if>
- <if test="vdevxh != null" >
- vDevXh,
- </if>
- <if test="fvalue != null" >
- fValue,
- </if>
- <if test="vvaluetime != null" >
- vValueTime,
- </if>
- <if test="vstatue != null" >
- vStatue,
- </if>
- <if test="vupdatetime != null" >
- vUpdatetime,
- </if>
- <if test="vremark != null" >
- vRemark,
- </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="vdevkindcode != null" >
- #{vdevkindcode,jdbcType=VARCHAR},
- </if>
- <if test="vunit != null" >
- #{vunit,jdbcType=VARCHAR},
- </if>
- <if test="faddvalue != null" >
- #{faddvalue,jdbcType=INTEGER},
- </if>
- <if test="vinOut != null" >
- #{vinOut,jdbcType=INTEGER},
- </if>
- <if test="vzdcode != null" >
- #{vzdcode,jdbcType=VARCHAR},
- </if>
- <if test="vcfcode != null" >
- #{vcfcode,jdbcType=VARCHAR},
- </if>
- <if test="vdevxh != null" >
- #{vdevxh,jdbcType=VARCHAR},
- </if>
- <if test="fvalue != null" >
- #{fvalue,jdbcType=INTEGER},
- </if>
- <if test="vvaluetime != null" >
- #{vvaluetime,jdbcType=TIMESTAMP},
- </if>
- <if test="vstatue != null" >
- #{vstatue,jdbcType=INTEGER},
- </if>
- <if test="vupdatetime != null" >
- #{vupdatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="vremark != null" >
- #{vremark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevDataExample" resultType="java.lang.Integer" >
- select count(*) from t_dev_data
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update t_dev_data
- <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.vdevkindcode != null" >
- vDevKindCode = #{record.vdevkindcode,jdbcType=VARCHAR},
- </if>
- <if test="record.vunit != null" >
- vUnit = #{record.vunit,jdbcType=VARCHAR},
- </if>
- <if test="record.faddvalue != null" >
- fAddValue = #{record.faddvalue,jdbcType=INTEGER},
- </if>
- <if test="record.vinOut != null" >
- vIn_Out = #{record.vinOut,jdbcType=INTEGER},
- </if>
- <if test="record.vzdcode != null" >
- vZdCode = #{record.vzdcode,jdbcType=VARCHAR},
- </if>
- <if test="record.vcfcode != null" >
- vCfCode = #{record.vcfcode,jdbcType=VARCHAR},
- </if>
- <if test="record.vdevxh != null" >
- vDevXh = #{record.vdevxh,jdbcType=VARCHAR},
- </if>
- <if test="record.fvalue != null" >
- fValue = #{record.fvalue,jdbcType=INTEGER},
- </if>
- <if test="record.vvaluetime != null" >
- vValueTime = #{record.vvaluetime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.vstatue != null" >
- vStatue = #{record.vstatue,jdbcType=INTEGER},
- </if>
- <if test="record.vupdatetime != null" >
- vUpdatetime = #{record.vupdatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.vremark != null" >
- vRemark = #{record.vremark,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map" >
- update t_dev_data
- set id = #{record.id,jdbcType=VARCHAR},
- vDevCode = #{record.vdevcode,jdbcType=VARCHAR},
- vDevName = #{record.vdevname,jdbcType=VARCHAR},
- vDevKindCode = #{record.vdevkindcode,jdbcType=VARCHAR},
- vUnit = #{record.vunit,jdbcType=VARCHAR},
- fAddValue = #{record.faddvalue,jdbcType=INTEGER},
- vIn_Out = #{record.vinOut,jdbcType=INTEGER},
- vZdCode = #{record.vzdcode,jdbcType=VARCHAR},
- vCfCode = #{record.vcfcode,jdbcType=VARCHAR},
- vDevXh = #{record.vdevxh,jdbcType=VARCHAR},
- fValue = #{record.fvalue,jdbcType=INTEGER},
- vValueTime = #{record.vvaluetime,jdbcType=TIMESTAMP},
- vStatue = #{record.vstatue,jdbcType=INTEGER},
- vUpdatetime = #{record.vupdatetime,jdbcType=TIMESTAMP},
- vRemark = #{record.vremark,jdbcType=VARCHAR}
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevData" >
- update t_dev_data
- <set >
- <if test="vdevcode != null" >
- vDevCode = #{vdevcode,jdbcType=VARCHAR},
- </if>
- <if test="vdevname != null" >
- vDevName = #{vdevname,jdbcType=VARCHAR},
- </if>
- <if test="vdevkindcode != null" >
- vDevKindCode = #{vdevkindcode,jdbcType=VARCHAR},
- </if>
- <if test="vunit != null" >
- vUnit = #{vunit,jdbcType=VARCHAR},
- </if>
- <if test="faddvalue != null" >
- fAddValue = #{faddvalue,jdbcType=INTEGER},
- </if>
- <if test="vinOut != null" >
- vIn_Out = #{vinOut,jdbcType=INTEGER},
- </if>
- <if test="vzdcode != null" >
- vZdCode = #{vzdcode,jdbcType=VARCHAR},
- </if>
- <if test="vcfcode != null" >
- vCfCode = #{vcfcode,jdbcType=VARCHAR},
- </if>
- <if test="vdevxh != null" >
- vDevXh = #{vdevxh,jdbcType=VARCHAR},
- </if>
- <if test="fvalue != null" >
- fValue = #{fvalue,jdbcType=INTEGER},
- </if>
- <if test="vvaluetime != null" >
- vValueTime = #{vvaluetime,jdbcType=TIMESTAMP},
- </if>
- <if test="vstatue != null" >
- vStatue = #{vstatue,jdbcType=INTEGER},
- </if>
- <if test="vupdatetime != null" >
- vUpdatetime = #{vupdatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="vremark != null" >
- vRemark = #{vremark,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDevData" >
- update t_dev_data
- set vDevCode = #{vdevcode,jdbcType=VARCHAR},
- vDevName = #{vdevname,jdbcType=VARCHAR},
- vDevKindCode = #{vdevkindcode,jdbcType=VARCHAR},
- vUnit = #{vunit,jdbcType=VARCHAR},
- fAddValue = #{faddvalue,jdbcType=INTEGER},
- vIn_Out = #{vinOut,jdbcType=INTEGER},
- vZdCode = #{vzdcode,jdbcType=VARCHAR},
- vCfCode = #{vcfcode,jdbcType=VARCHAR},
- vDevXh = #{vdevxh,jdbcType=VARCHAR},
- fValue = #{fvalue,jdbcType=INTEGER},
- vValueTime = #{vvaluetime,jdbcType=TIMESTAMP},
- vStatue = #{vstatue,jdbcType=INTEGER},
- vUpdatetime = #{vupdatetime,jdbcType=TIMESTAMP},
- vRemark = #{vremark,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- </mapper>
|