ReportDataStorageMapper.xml
8.73 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
<?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.lhcredit.project.business.reportDataStorage.mapper.ReportDataStorageMapper">
<resultMap type="ReportDataStorage" id="ReportDataStorageResult">
<result property="id" column="id" />
<result property="autoReportId" column="autoReportId" />
<result property="creditReportId" column="creditReportId" />
<result property="createTime" column="create_time" />
<result property="ename" column="ename" />
<result property="creditCode" column="creditCode" />
<result property="industry" column="industry" />
<result property="estiblishTime" column="estiblishTime" />
<result property="publicType" column="publicType" />
<result property="companyType" column="companyType" />
<result property="city" column="city" />
<result property="creditScore" column="creditScore" />
<result property="creditLevel" column="creditLevel" />
<result property="creditLimit" column="creditLimit" />
<result property="mdParams" column="md_params" />
<result property="financeExcel" column="financeExcel" />
<result property="financeUnit" column="financeUnit" />
<result property="zy" column="zy" />
</resultMap>
<sql id="selectReportDataStorageVo">
select id, autoReportId, creditReportId, zy,financeExcel,financeUnit,create_time, ename, creditCode, industry, estiblishTime, publicType, companyType, city, creditScore, creditLevel, creditLimit, md_params from report_data_storage
</sql>
<select id="selectReportDataStorageList" parameterType="ReportDataStorage" resultMap="ReportDataStorageResult">
<include refid="selectReportDataStorageVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="autoReportId != null "> and autoReportId = #{autoReportId}</if>
<if test="creditReportId != null and creditReportId != '' "> and creditReportId = #{creditReportId}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="ename != null and ename != '' "> and ename = #{ename}</if>
<if test="creditCode != null and creditCode != '' "> and creditCode = #{creditCode}</if>
<if test="industry != null and industry != '' "> and industry = #{industry}</if>
<if test="estiblishTime != null and estiblishTime != '' "> and estiblishTime = #{estiblishTime}</if>
<if test="publicType != null and publicType != '' "> and publicType = #{publicType}</if>
<if test="companyType != null and companyType != '' "> and companyType = #{companyType}</if>
<if test="city != null and city != '' "> and city = #{city}</if>
<if test="creditScore != null "> and creditScore = #{creditScore}</if>
<if test="creditLevel != null and creditLevel != '' "> and creditLevel = #{creditLevel}</if>
<if test="creditLimit != null "> and creditLimit = #{creditLimit}</if>
<if test="mdParams != null and mdParams != '' "> and md_params = #{mdParams}</if>
<if test="financeUnit != null and financeUnit != '' "> and financeUnit = #{financeUnit}</if>
<if test="zy != null and zy != '' "> and zy = #{zy}</if>
</where>
</select>
<select id="selectReportDataStorageById" parameterType="Integer" resultMap="ReportDataStorageResult">
<include refid="selectReportDataStorageVo"/>
where id = #{id}
</select>
<select id="selectListByCreditReportId"
resultMap="ReportDataStorageResult">
<include refid="selectReportDataStorageVo"/>
where creditReportId in
<foreach item="item" collection="list" separator="," open="(" close=")">
#{item}
</foreach>
</select>
<insert id="insertReportDataStorage" parameterType="ReportDataStorage" useGeneratedKeys="true" keyProperty="id">
insert into report_data_storage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="autoReportId != null ">autoReportId,</if>
<if test="creditReportId != null and creditReportId != '' ">creditReportId,</if>
<if test="createTime != null ">create_time,</if>
<if test="ename != null and ename != '' ">ename,</if>
<if test="creditCode != null and creditCode != '' ">creditCode,</if>
<if test="industry != null and industry != '' ">industry,</if>
<if test="estiblishTime != null and estiblishTime != '' ">estiblishTime,</if>
<if test="publicType != null and publicType != '' ">publicType,</if>
<if test="companyType != null and companyType != '' ">companyType,</if>
<if test="city != null and city != '' ">city,</if>
<if test="creditScore != null ">creditScore,</if>
<if test="creditLevel != null and creditLevel != '' ">creditLevel,</if>
<if test="creditLimit != null ">creditLimit,</if>
<if test="mdParams != null and mdParams != '' ">md_params,</if>
<if test="financeExcel != null and financeExcel != '' ">financeExcel,</if>
<if test="financeUnit != null and financeUnit != '' ">financeUnit,</if>
<if test="zy != null and zy != '' ">zy,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="autoReportId != null ">#{autoReportId},</if>
<if test="creditReportId != null and creditReportId != '' ">#{creditReportId},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="ename != null and ename != '' ">#{ename},</if>
<if test="creditCode != null and creditCode != '' ">#{creditCode},</if>
<if test="industry != null and industry != '' ">#{industry},</if>
<if test="estiblishTime != null and estiblishTime != '' ">#{estiblishTime},</if>
<if test="publicType != null and publicType != '' ">#{publicType},</if>
<if test="companyType != null and companyType != '' ">#{companyType},</if>
<if test="city != null and city != '' ">#{city},</if>
<if test="creditScore != null ">#{creditScore},</if>
<if test="creditLevel != null and creditLevel != '' ">#{creditLevel},</if>
<if test="creditLimit != null ">#{creditLimit},</if>
<if test="mdParams != null and mdParams != '' ">#{mdParams},</if>
<if test="financeExcel != null and financeExcel != '' ">#{financeExcel},</if>
<if test="financeUnit != null and financeUnit != '' ">#{financeUnit},</if>
<if test="zy != null and zy != '' ">#{zy},</if>
</trim>
</insert>
<update id="updateReportDataStorage" parameterType="ReportDataStorage">
update report_data_storage
<trim prefix="SET" suffixOverrides=",">
<if test="autoReportId != null ">autoReportId = #{autoReportId},</if>
<if test="creditReportId != null and creditReportId != '' ">creditReportId = #{creditReportId},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="ename != null and ename != '' ">ename = #{ename},</if>
<if test="creditCode != null and creditCode != '' ">creditCode = #{creditCode},</if>
<if test="industry != null and industry != '' ">industry = #{industry},</if>
<if test="estiblishTime != null and estiblishTime != '' ">estiblishTime = #{estiblishTime},</if>
<if test="publicType != null and publicType != '' ">publicType = #{publicType},</if>
<if test="companyType != null and companyType != '' ">companyType = #{companyType},</if>
<if test="city != null and city != '' ">city = #{city},</if>
<if test="creditScore != null ">creditScore = #{creditScore},</if>
<if test="creditLevel != null and creditLevel != '' ">creditLevel = #{creditLevel},</if>
<if test="creditLimit != null ">creditLimit = #{creditLimit},</if>
<if test="mdParams != null and mdParams != '' ">md_params = #{mdParams},</if>
<if test="financeExcel != null and financeExcel != '' ">financeExcel = #{financeExcel},</if>
<if test="financeUnit != null and financeUnit != '' ">financeUnit = #{financeUnit},</if>
<if test="zy != null and zy != '' ">zy = #{zy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteReportDataStorageById" parameterType="Integer">
delete from report_data_storage where id = #{id}
</delete>
<delete id="deleteReportDataStorageByIds" parameterType="String">
delete from report_data_storage where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>