<?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.gk.firework.Mapper.TransportCertificateApproachMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.firework.Domain.TransportCertificateApproach" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="certificatecode" property="certificatecode" jdbcType="VARCHAR" />
|
<result column="province" property="province" jdbcType="VARCHAR" />
|
<result column="city" property="city" jdbcType="VARCHAR" />
|
<result column="district" property="district" jdbcType="VARCHAR" />
|
<result column="validflag" property="validflag" jdbcType="BIT" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, certificatecode, province, city, district, validflag
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
<!-- -->
|
select
|
<include refid="Base_Column_List" />
|
from transportcertificateapproach
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
<!-- -->
|
delete from transportcertificateapproach
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<update id="deleteByCertificateCode" parameterType="java.lang.String">
|
update transportcertificateapproach
|
set validflag = 0
|
where certificatecode= #{code}
|
</update>
|
<insert id="insert" parameterType="com.gk.firework.Domain.TransportCertificateApproach" >
|
<!-- -->
|
insert into transportcertificateapproach (id, certificatecode, province,
|
city, district, validflag
|
)
|
values (#{id,jdbcType=BIGINT}, #{certificatecode,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
|
#{city,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR}, #{validflag,jdbcType=BIT}
|
)
|
</insert>
|
<insert id="insertSelective" parameterType="com.gk.firework.Domain.TransportCertificateApproach" >
|
<!-- -->
|
insert into transportcertificateapproach
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="certificatecode != null" >
|
certificatecode,
|
</if>
|
<if test="province != null" >
|
province,
|
</if>
|
<if test="city != null" >
|
city,
|
</if>
|
<if test="district != null" >
|
district,
|
</if>
|
<if test="validflag != null" >
|
validflag,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="certificatecode != null" >
|
#{certificatecode,jdbcType=VARCHAR},
|
</if>
|
<if test="province != null" >
|
#{province,jdbcType=VARCHAR},
|
</if>
|
<if test="city != null" >
|
#{city,jdbcType=VARCHAR},
|
</if>
|
<if test="district != null" >
|
#{district,jdbcType=VARCHAR},
|
</if>
|
<if test="validflag != null" >
|
#{validflag,jdbcType=BIT},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.TransportCertificateApproach" >
|
<!-- -->
|
update transportcertificateapproach
|
<set >
|
<if test="certificatecode != null" >
|
certificatecode = #{certificatecode,jdbcType=VARCHAR},
|
</if>
|
<if test="province != null" >
|
province = #{province,jdbcType=VARCHAR},
|
</if>
|
<if test="city != null" >
|
city = #{city,jdbcType=VARCHAR},
|
</if>
|
<if test="district != null" >
|
district = #{district,jdbcType=VARCHAR},
|
</if>
|
<if test="validflag != null" >
|
validflag = #{validflag,jdbcType=BIT},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.TransportCertificateApproach" >
|
<!-- -->
|
update transportcertificateapproach
|
set certificatecode = #{certificatecode,jdbcType=VARCHAR},
|
province = #{province,jdbcType=VARCHAR},
|
city = #{city,jdbcType=VARCHAR},
|
district = #{district,jdbcType=VARCHAR},
|
validflag = #{validflag,jdbcType=BIT}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|