BizInvoiceMapper.xml
6.65 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?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="cn.runsa.portal.base.dao.BizInvoiceMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.portal.base.entity.BizInvoice" >
<id column="beiId" property="id" jdbcType="INTEGER" />
<result column="bebId" property="bebid" jdbcType="INTEGER" />
<result column="beiName" property="name" jdbcType="VARCHAR" />
<result column="beiCode" property="code" jdbcType="VARCHAR" />
<result column="beiTaxnum" property="taxnum" jdbcType="VARCHAR" />
<result column="beiTaxrate" property="taxrate" jdbcType="DECIMAL" />
<result column="ptPhone" property="phone" jdbcType="VARCHAR" />
<result column="ptAddr" property="addr" jdbcType="VARCHAR" />
<result column="cuId" property="cuid" jdbcType="INTEGER" />
<result column="ptRemark1" property="remark1" jdbcType="VARCHAR" />
<result column="ptRemark2" property="remark2" jdbcType="VARCHAR" />
<result column="ptUpTime" property="uptime" jdbcType="TIMESTAMP" />
<result column="ptUpdater" property="updater" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
beiId, bebId, beiName, beiCode, beiTaxnum, beiTaxrate, ptPhone, ptAddr, cuId, ptRemark1,
ptRemark2, ptUpTime, ptUpdater
</sql>
<select id="findById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from mtBizInvoice
where beiId = #{id,jdbcType=INTEGER}
</select>
<select id="findList" resultMap="BaseResultMap" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
select
<include refid="Base_Column_List" />
from mtBizInvoice
where bebId = #{bebid,jdbcType=INTEGER}
</select>
<delete id="delete" parameterType="java.lang.Integer" >
delete from mtBizInvoice
where beiId = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByBebId" parameterType="java.lang.Integer" >
delete from mtBizInvoice
where bebId = #{bebid,jdbcType=INTEGER}
</delete>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
insert into mtBizInvoice (bebId, beiName, beiCode,
beiTaxnum, beiTaxrate, ptPhone,
ptAddr, cuId, ptRemark1,
ptRemark2, ptUpTime, ptUpdater
)
values (#{bebid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{taxnum,jdbcType=VARCHAR}, #{taxrate,jdbcType=DECIMAL}, #{phone,jdbcType=VARCHAR},
#{addr,jdbcType=VARCHAR}, #{cuid,jdbcType=INTEGER}, #{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR}, #{uptime,jdbcType=TIMESTAMP}, #{updater,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
insert into mtBizInvoice
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="bebid != null" >
bebId,
</if>
<if test="name != null" >
beiName,
</if>
<if test="code != null" >
beiCode,
</if>
<if test="taxnum != null" >
beiTaxnum,
</if>
<if test="taxrate != null" >
beiTaxrate,
</if>
<if test="phone != null" >
ptPhone,
</if>
<if test="addr != null" >
ptAddr,
</if>
<if test="cuid != null" >
cuId,
</if>
<if test="remark1 != null" >
ptRemark1,
</if>
<if test="remark2 != null" >
ptRemark2,
</if>
<if test="uptime != null" >
ptUpTime,
</if>
<if test="updater != null" >
ptUpdater,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="bebid != null" >
#{bebid,jdbcType=INTEGER},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="code != null" >
#{code,jdbcType=VARCHAR},
</if>
<if test="taxnum != null" >
#{taxnum,jdbcType=VARCHAR},
</if>
<if test="taxrate != null" >
#{taxrate,jdbcType=DECIMAL},
</if>
<if test="phone != null" >
#{phone,jdbcType=VARCHAR},
</if>
<if test="addr != null" >
#{addr,jdbcType=VARCHAR},
</if>
<if test="cuid != null" >
#{cuid,jdbcType=INTEGER},
</if>
<if test="remark1 != null" >
#{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null" >
#{remark2,jdbcType=VARCHAR},
</if>
<if test="uptime != null" >
#{uptime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null" >
#{updater,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
update mtBizInvoice
<set >
<if test="bebid != null" >
bebId = #{bebid,jdbcType=INTEGER},
</if>
<if test="name != null" >
beiName = #{name,jdbcType=VARCHAR},
</if>
<if test="code != null" >
beiCode = #{code,jdbcType=VARCHAR},
</if>
<if test="taxnum != null" >
beiTaxnum = #{taxnum,jdbcType=VARCHAR},
</if>
<if test="taxrate != null" >
beiTaxrate = #{taxrate,jdbcType=DECIMAL},
</if>
<if test="phone != null" >
ptPhone = #{phone,jdbcType=VARCHAR},
</if>
<if test="addr != null" >
ptAddr = #{addr,jdbcType=VARCHAR},
</if>
<if test="cuid != null" >
cuId = #{cuid,jdbcType=INTEGER},
</if>
<if test="remark1 != null" >
ptRemark1 = #{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null" >
ptRemark2 = #{remark2,jdbcType=VARCHAR},
</if>
<if test="uptime != null" >
ptUpTime = #{uptime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null" >
ptUpdater = #{updater,jdbcType=INTEGER},
</if>
</set>
where beiId = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
update mtBizInvoice
set bebId = #{bebid,jdbcType=INTEGER},
beiName = #{name,jdbcType=VARCHAR},
beiCode = #{code,jdbcType=VARCHAR},
beiTaxnum = #{taxnum,jdbcType=VARCHAR},
beiTaxrate = #{taxrate,jdbcType=DECIMAL},
ptPhone = #{phone,jdbcType=VARCHAR},
ptAddr = #{addr,jdbcType=VARCHAR},
cuId = #{cuid,jdbcType=INTEGER},
ptRemark1 = #{remark1,jdbcType=VARCHAR},
ptRemark2 = #{remark2,jdbcType=VARCHAR},
ptUpTime = #{uptime,jdbcType=TIMESTAMP},
ptUpdater = #{updater,jdbcType=INTEGER}
where beiId = #{id,jdbcType=INTEGER}
</update>
</mapper>