TBBaseAirportInfoDao.xml
3.9 KB
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
<?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.tianbo.analysis.dao.TBBaseAirportInfoDao">
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.TBBaseAirportInfo">
<id column="AIRPORTID" jdbcType="VARCHAR" property="airportid" />
<result column="INTERNAL" jdbcType="VARCHAR" property="internal" />
<result column="CITYID" jdbcType="VARCHAR" property="cityid" />
<result column="AIRPORTDESCCHN" jdbcType="VARCHAR" property="airportdescchn" />
<result column="AIRPORTDESCENG" jdbcType="VARCHAR" property="airportdesceng" />
</resultMap>
<sql id="Base_Column_List">
AIRPORTID, INTERNAL, CITYID, AIRPORTDESCCHN, AIRPORTDESCENG
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from TB_BASE_AIRPORT_INFO
where AIRPORTID = #{airportid,jdbcType=VARCHAR}
</select>
<select id="checkInternal" resultMap="BaseResultMap">
select internal
from tb_base_airport_info
where airportid = #{airportidOrg,jdbcType=VARCHAR}
union all
select internal
from tb_base_airport_info
where airportid = #{airportidDes,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from TB_BASE_AIRPORT_INFO
where AIRPORTID = #{airportid,jdbcType=VARCHAR}
</delete>
<insert id="insert" keyColumn="AIRPORTID" keyProperty="airportid" parameterType="com.tianbo.analysis.model.TBBaseAirportInfo" useGeneratedKeys="true">
insert into TB_BASE_AIRPORT_INFO (INTERNAL, CITYID, AIRPORTDESCCHN,
AIRPORTDESCENG)
values (#{internal,jdbcType=VARCHAR}, #{cityid,jdbcType=VARCHAR}, #{airportdescchn,jdbcType=VARCHAR},
#{airportdesceng,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="AIRPORTID" keyProperty="airportid" parameterType="com.tianbo.analysis.model.TBBaseAirportInfo" useGeneratedKeys="true">
insert into TB_BASE_AIRPORT_INFO
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="internal != null">
INTERNAL,
</if>
<if test="cityid != null">
CITYID,
</if>
<if test="airportdescchn != null">
AIRPORTDESCCHN,
</if>
<if test="airportdesceng != null">
AIRPORTDESCENG,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="internal != null">
#{internal,jdbcType=VARCHAR},
</if>
<if test="cityid != null">
#{cityid,jdbcType=VARCHAR},
</if>
<if test="airportdescchn != null">
#{airportdescchn,jdbcType=VARCHAR},
</if>
<if test="airportdesceng != null">
#{airportdesceng,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.analysis.model.TBBaseAirportInfo">
update TB_BASE_AIRPORT_INFO
<set>
<if test="internal != null">
INTERNAL = #{internal,jdbcType=VARCHAR},
</if>
<if test="cityid != null">
CITYID = #{cityid,jdbcType=VARCHAR},
</if>
<if test="airportdescchn != null">
AIRPORTDESCCHN = #{airportdescchn,jdbcType=VARCHAR},
</if>
<if test="airportdesceng != null">
AIRPORTDESCENG = #{airportdesceng,jdbcType=VARCHAR},
</if>
</set>
where AIRPORTID = #{airportid,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.tianbo.analysis.model.TBBaseAirportInfo">
update TB_BASE_AIRPORT_INFO
set INTERNAL = #{internal,jdbcType=VARCHAR},
CITYID = #{cityid,jdbcType=VARCHAR},
AIRPORTDESCCHN = #{airportdescchn,jdbcType=VARCHAR},
AIRPORTDESCENG = #{airportdesceng,jdbcType=VARCHAR}
where AIRPORTID = #{airportid,jdbcType=VARCHAR}
</update>
</mapper>