NMMS_CUSTOM_WAYDECLARATIONMapper.xml
5.0 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?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.sunyo.wlpt.base.dao.NMMS_CUSTOM_WAYDECLARATIONMapper" >
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" >
<result column="carrier" property="carrier" jdbcType="VARCHAR" />
<result column="flightNo" property="flightno" jdbcType="VARCHAR" />
<result column="flightDate" property="flightdate" jdbcType="DATE" />
<result column="originStation" property="originstation" jdbcType="VARCHAR" />
<result column="destinationStation" property="destinationstation" jdbcType="VARCHAR" />
<result column="awba" property="awba" jdbcType="VARCHAR" />
<result column="awbh" property="awbh" jdbcType="VARCHAR" />
<result column="piece" property="piece" jdbcType="INTEGER" />
<result column="weight" property="weight" jdbcType="DECIMAL" />
<result column="customCode" property="customcode" jdbcType="VARCHAR" />
<result column="acTime" property="actime" jdbcType="TIMESTAMP" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="stype" property="stype" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" >
insert into NMMS_WAYDECLARATION (carrier, flightNo, flightDate,
originStation, destinationStation, awba,
awbh, piece, weight,
customCode, acTime, status,
stype)
values (#{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=DATE},
#{originstation,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR}, #{awba,jdbcType=VARCHAR},
#{awbh,jdbcType=VARCHAR}, #{piece,jdbcType=INTEGER}, #{weight,jdbcType=DECIMAL},
#{customcode,jdbcType=VARCHAR}, #{actime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR},
#{stype,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" >
insert into NMMS_WAYDECLARATION
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="carrier != null" >
carrier,
</if>
<if test="flightno != null" >
flightNo,
</if>
<if test="flightdate != null" >
flightDate,
</if>
<if test="originstation != null" >
originStation,
</if>
<if test="destinationstation != null" >
destinationStation,
</if>
<if test="awba != null" >
awba,
</if>
<if test="awbh != null" >
awbh,
</if>
<if test="piece != null" >
piece,
</if>
<if test="weight != null" >
weight,
</if>
<if test="customcode != null" >
customCode,
</if>
<if test="actime != null" >
acTime,
</if>
<if test="status != null" >
status,
</if>
<if test="stype != null" >
stype,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="carrier != null" >
#{carrier,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=DATE},
</if>
<if test="originstation != null" >
#{originstation,jdbcType=VARCHAR},
</if>
<if test="destinationstation != null" >
#{destinationstation,jdbcType=VARCHAR},
</if>
<if test="awba != null" >
#{awba,jdbcType=VARCHAR},
</if>
<if test="awbh != null" >
#{awbh,jdbcType=VARCHAR},
</if>
<if test="piece != null" >
#{piece,jdbcType=INTEGER},
</if>
<if test="weight != null" >
#{weight,jdbcType=DECIMAL},
</if>
<if test="customcode != null" >
#{customcode,jdbcType=VARCHAR},
</if>
<if test="actime != null" >
#{actime,jdbcType=TIMESTAMP},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="stype != null" >
#{stype,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="selectWaydeclaration" parameterType="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from NMMS_WAYDECLARATION
where 1=1
<if test="awba !=null and awba != ''">
and awba=#{awba,jdbcType=VARCHAR}
</if>
<if test="carrier !=null and carrier !=''">
AND carrier = #{carrier,jdbcType=VARCHAR}
</if>
<if test="flightno !=null and flightno !=''">
AND flightNo = #{flightno,jdbcType=VARCHAR}
</if>
<if test="flightdate !=null">
AND flightDate = #{flightdate,jdbcType=DATE}
</if>
<if test="status !=null and status !=''">
AND status = #{status,jdbcType=VARCHAR}
</if>
<if test="stype !=null and stype !=''">
AND stype = #{stype,jdbcType=VARCHAR}
</if>
</select>
</mapper>