BizAccountMapper.xml
6.23 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
<?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.BizAccountMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.portal.base.entity.BizAccount" >
<id column="beaId" property="id" jdbcType="INTEGER" />
<result column="bebId" property="bebid" jdbcType="INTEGER" />
<result column="beaName" property="name" jdbcType="VARCHAR" />
<result column="beaCode" property="code" jdbcType="VARCHAR" />
<result column="beaAccount" property="account" jdbcType="VARCHAR" />
<result column="beaRate" property="rate" jdbcType="DECIMAL" />
<result column="cuId" property="cuid" jdbcType="INTEGER" />
<result column="beaType" property="type" jdbcType="SMALLINT" />
<result column="beaSource" property="source" jdbcType="VARCHAR" />
<result column="ptRemark1" property="remark1" jdbcType="VARCHAR" />
<result column="ptUpTime" property="uptime" jdbcType="TIMESTAMP" />
<result column="ptUpdater" property="updater" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
beaId, bebId, beaName, beaCode, beaAccount, beaRate, cuId, beaType, beaSource, ptRemark1,
ptUpTime, ptUpdater
</sql>
<select id="findById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from mtBizAccount
where beaId = #{id,jdbcType=INTEGER}
</select>
<select id="findList" resultMap="BaseResultMap" parameterType="cn.runsa.portal.base.entity.BizAccount" >
select
<include refid="Base_Column_List" />
from mtBizAccount
where bebId = #{bebid,jdbcType=INTEGER}
</select>
<delete id="delete" parameterType="java.lang.Integer" >
delete from mtBizAccount
where beaId = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByBebId" parameterType="java.lang.Integer" >
delete from mtBizAccount
where bebId = #{bebid,jdbcType=INTEGER}
</delete>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizAccount" >
insert into mtBizAccount (bebId, beaName, beaCode,
beaAccount, beaRate, cuId,
beaType, beaSource, ptRemark1,
ptUpTime, ptUpdater)
values (#{bebid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{account,jdbcType=VARCHAR}, #{rate,jdbcType=DECIMAL}, #{cuid,jdbcType=INTEGER},
#{type,jdbcType=SMALLINT}, #{source,jdbcType=VARCHAR}, #{remark1,jdbcType=VARCHAR},
#{uptime,jdbcType=TIMESTAMP}, #{updater,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizAccount" >
insert into mtBizAccount
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="bebid != null" >
bebId,
</if>
<if test="name != null" >
beaName,
</if>
<if test="code != null" >
beaCode,
</if>
<if test="account != null" >
beaAccount,
</if>
<if test="rate != null" >
beaRate,
</if>
<if test="cuid != null" >
cuId,
</if>
<if test="type != null" >
beaType,
</if>
<if test="source != null" >
beaSource,
</if>
<if test="remark1 != null" >
ptRemark1,
</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="account != null" >
#{account,jdbcType=VARCHAR},
</if>
<if test="rate != null" >
#{rate,jdbcType=DECIMAL},
</if>
<if test="cuid != null" >
#{cuid,jdbcType=INTEGER},
</if>
<if test="type != null" >
#{type,jdbcType=SMALLINT},
</if>
<if test="source != null" >
#{source,jdbcType=VARCHAR},
</if>
<if test="remark1 != null" >
#{remark1,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.BizAccount" >
update mtBizAccount
<set >
<if test="bebid != null" >
bebId = #{bebid,jdbcType=INTEGER},
</if>
<if test="name != null" >
beaName = #{name,jdbcType=VARCHAR},
</if>
<if test="code != null" >
beaCode = #{code,jdbcType=VARCHAR},
</if>
<if test="account != null" >
beaAccount = #{account,jdbcType=VARCHAR},
</if>
<if test="rate != null" >
beaRate = #{rate,jdbcType=DECIMAL},
</if>
<if test="cuid != null" >
cuId = #{cuid,jdbcType=INTEGER},
</if>
<if test="type != null" >
beaType = #{type,jdbcType=SMALLINT},
</if>
<if test="source != null" >
beaSource = #{source,jdbcType=VARCHAR},
</if>
<if test="remark1 != null" >
ptRemark1 = #{remark1,jdbcType=VARCHAR},
</if>
<if test="uptime != null" >
ptUpTime = #{uptime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null" >
ptUpdater = #{updater,jdbcType=INTEGER},
</if>
</set>
where beaId = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="cn.runsa.portal.base.entity.BizAccount" >
update mtBizAccount
set bebId = #{bebid,jdbcType=INTEGER},
beaName = #{name,jdbcType=VARCHAR},
beaCode = #{code,jdbcType=VARCHAR},
beaAccount = #{account,jdbcType=VARCHAR},
beaRate = #{rate,jdbcType=DECIMAL},
cuId = #{cuid,jdbcType=INTEGER},
beaType = #{type,jdbcType=SMALLINT},
beaSource = #{source,jdbcType=VARCHAR},
ptRemark1 = #{remark1,jdbcType=VARCHAR},
ptUpTime = #{uptime,jdbcType=TIMESTAMP},
ptUpdater = #{updater,jdbcType=INTEGER}
where beaId = #{id,jdbcType=INTEGER}
</update>
</mapper>