郑永安
2023-06-19 59e91a4e9ddaf23cebb12993c774aa899ab22d16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?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>