You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
235 lines
8.8 KiB
XML
235 lines
8.8 KiB
XML
<?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.shxy.xymanager_dao.dao.TerminalBasicInfoHistoryDao">
|
|
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalBasicInfoHistory">
|
|
<result column="term_id" jdbcType="INTEGER" property="termId" />
|
|
<result column="cmdid" jdbcType="VARCHAR" property="cmdid" />
|
|
<result column="version" jdbcType="VARCHAR" property="version" />
|
|
<result column="bs_id" jdbcType="VARCHAR" property="bsId" />
|
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
|
<result column="equip_name" jdbcType="VARCHAR" property="equipName" />
|
|
<result column="model" jdbcType="VARCHAR" property="model" />
|
|
<result column="protocol_version" jdbcType="VARCHAR" property="protocolVersion" />
|
|
<result column="bs_manu" jdbcType="VARCHAR" property="bsManu" />
|
|
<result column="production_date" jdbcType="DATE" property="productionDate" />
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
|
|
<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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
term_id, cmdid, version, bs_id, update_time, equip_name, model, protocol_version,
|
|
bs_manu, production_date
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalBasicInfoHistoryExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from terminal_basic_info_history
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
</select>
|
|
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.TerminalBasicInfoHistoryExample">
|
|
delete from terminal_basic_info_history
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalBasicInfoHistory">
|
|
insert into terminal_basic_info_history (term_id, cmdid, version,
|
|
bs_id, update_time, equip_name,
|
|
model, protocol_version, bs_manu,
|
|
production_date)
|
|
values (#{termId,jdbcType=INTEGER}, #{cmdid,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR},
|
|
#{bsId,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{equipName,jdbcType=VARCHAR},
|
|
#{model,jdbcType=VARCHAR}, #{protocolVersion,jdbcType=VARCHAR}, #{bsManu,jdbcType=VARCHAR},
|
|
#{productionDate,jdbcType=DATE})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalBasicInfoHistory">
|
|
insert into terminal_basic_info_history
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="termId != null">
|
|
term_id,
|
|
</if>
|
|
<if test="cmdid != null">
|
|
cmdid,
|
|
</if>
|
|
<if test="version != null">
|
|
version,
|
|
</if>
|
|
<if test="bsId != null">
|
|
bs_id,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="equipName != null">
|
|
equip_name,
|
|
</if>
|
|
<if test="model != null">
|
|
model,
|
|
</if>
|
|
<if test="protocolVersion != null">
|
|
protocol_version,
|
|
</if>
|
|
<if test="bsManu != null">
|
|
bs_manu,
|
|
</if>
|
|
<if test="productionDate != null">
|
|
production_date,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="termId != null">
|
|
#{termId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="cmdid != null">
|
|
#{cmdid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="version != null">
|
|
#{version,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="bsId != null">
|
|
#{bsId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="equipName != null">
|
|
#{equipName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="model != null">
|
|
#{model,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="protocolVersion != null">
|
|
#{protocolVersion,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="bsManu != null">
|
|
#{bsManu,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="productionDate != null">
|
|
#{productionDate,jdbcType=DATE},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalBasicInfoHistoryExample" resultType="java.lang.Long">
|
|
select count(*) from terminal_basic_info_history
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update terminal_basic_info_history
|
|
<set>
|
|
<if test="record.termId != null">
|
|
term_id = #{record.termId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.cmdid != null">
|
|
cmdid = #{record.cmdid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.version != null">
|
|
version = #{record.version,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.bsId != null">
|
|
bs_id = #{record.bsId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.equipName != null">
|
|
equip_name = #{record.equipName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.model != null">
|
|
model = #{record.model,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.protocolVersion != null">
|
|
protocol_version = #{record.protocolVersion,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.bsManu != null">
|
|
bs_manu = #{record.bsManu,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.productionDate != null">
|
|
production_date = #{record.productionDate,jdbcType=DATE},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update terminal_basic_info_history
|
|
set term_id = #{record.termId,jdbcType=INTEGER},
|
|
cmdid = #{record.cmdid,jdbcType=VARCHAR},
|
|
version = #{record.version,jdbcType=VARCHAR},
|
|
bs_id = #{record.bsId,jdbcType=VARCHAR},
|
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
|
equip_name = #{record.equipName,jdbcType=VARCHAR},
|
|
model = #{record.model,jdbcType=VARCHAR},
|
|
protocol_version = #{record.protocolVersion,jdbcType=VARCHAR},
|
|
bs_manu = #{record.bsManu,jdbcType=VARCHAR},
|
|
production_date = #{record.productionDate,jdbcType=DATE}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
</mapper> |