BusinessAlterLogDao.xml
4.3 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
<?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.BusinessAlterLogDao">
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.BusinessAlterLog">
<result column="AUTOID" jdbcType="VARCHAR" property="autoid" />
<result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" />
<result column="BUSINESSTYPE" jdbcType="VARCHAR" property="businesstype" />
<result column="ALTER_REASON" jdbcType="VARCHAR" property="alterReason" />
<result column="CONTANTNAME" jdbcType="VARCHAR" property="contantname" />
<result column="CONTENTTEL" jdbcType="VARCHAR" property="contenttel" />
<result column="BILL_AUOTID" jdbcType="VARCHAR" property="billAuotid" />
</resultMap>
<sql id="Base_Column_List">
AUTOID, CREATEDATE, BUSINESSTYPE, ALTER_REASON, CONTANTNAME, CONTENTTEL, BILL_AUOTID
</sql>
<insert id="insert" parameterType="com.tianbo.analysis.model.BusinessAlterLog">
insert into BUSINESS_ALTER_LOG (AUTOID, CREATEDATE, BUSINESSTYPE,
ALTER_REASON, CONTANTNAME, CONTENTTEL,
BILL_AUOTID)
values (#{autoid,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{businesstype,jdbcType=VARCHAR},
#{alterReason,jdbcType=VARCHAR}, #{contantname,jdbcType=VARCHAR}, #{contenttel,jdbcType=VARCHAR},
#{billAuotid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.BusinessAlterLog">
insert into BUSINESS_ALTER_LOG
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="autoid != null">
AUTOID,
</if>
<if test="createdate != null">
CREATEDATE,
</if>
<if test="businesstype != null">
BUSINESSTYPE,
</if>
<if test="alterReason != null">
ALTER_REASON,
</if>
<if test="contantname != null">
CONTANTNAME,
</if>
<if test="contenttel != null">
CONTENTTEL,
</if>
<if test="billAuotid != null">
BILL_AUOTID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="autoid != null">
#{autoid,jdbcType=VARCHAR},
</if>
<if test="createdate != null">
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="businesstype != null">
#{businesstype,jdbcType=VARCHAR},
</if>
<if test="alterReason != null">
#{alterReason,jdbcType=VARCHAR},
</if>
<if test="contantname != null">
#{contantname,jdbcType=VARCHAR},
</if>
<if test="contenttel != null">
#{contenttel,jdbcType=VARCHAR},
</if>
<if test="billAuotid != null">
#{billAuotid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="update" parameterType="com.tianbo.analysis.model.BusinessAlterLog">
update BUSINESS_ALTER_LOG
set CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR},
ALTER_REASON = #{alterReason,jdbcType=VARCHAR},
CONTANTNAME = #{contantname,jdbcType=VARCHAR},
CONTENTTEL = #{contenttel,jdbcType=VARCHAR},
BILL_AUOTID = #{billAuotid,jdbcType=VARCHAR}
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
<update id="updateSelective" parameterType="com.tianbo.analysis.model.BusinessAlterLog">
update BUSINESS_ALTER_LOG
<set>
<if test="createdate != null">CREATEDATE = #{createdate,jdbcType=TIMESTAMP},</if>
<if test="businesstype != null">BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR},</if>
<if test="alterReason != null">ALTER_REASON = #{alterReason,jdbcType=VARCHAR},</if>
<if test="contantname != null">CONTANTNAME = #{contantname,jdbcType=VARCHAR},</if>
<if test="contenttel != null">CONTENTTEL = #{contenttel,jdbcType=VARCHAR},</if>
<if test="billAuotid != null">BILL_AUOTID = #{billAuotid,jdbcType=VARCHAR},</if>
</set>
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
<select id="selectByBillAutoidAndType" parameterType="com.tianbo.analysis.model.BusinessAlterLog" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from BUSINESS_ALTER_LOG
where BILL_AUOTID = #{billAuotid,jdbcType=VARCHAR}
and BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR}
</select>
</mapper>