ReportTableMapper.xml
1.93 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
<?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.reportTable.mapper.ReportTableMapper">
<update id="updateReport">
UPDATE
b_report_table
<set>
<if test="reportTable.reportName !=null and reportTable.reportName != ''">
report_name = #{reportTable.reportName}
</if>
<if test="reportTable.notice !=null and reportTable.notice != ''">
notice = #{reportTable.notice}
</if>
<if test="reportTable.title !=null and reportTable.title != ''">
title = #{reportTable.title}
</if>
<if test="reportTable.imageUrl !=null and reportTable.imageUrl != ''">
image_url = #{reportTable.imageUrl}
</if>
<if test="reportTable.type !=null and reportTable.type != ''">
`type` = #{reportTable.type}
</if>
<if test="reportTable.sample !=null and reportTable.sample != ''">
sample = #{reportTable.sample}
</if>
<if test="reportTable.isDel !=null and reportTable.isDel != ''">
is_del = #{reportTable.isDel}
</if>
where id = #{reportTable.id}
</set>
</update>
<select id="findAllReportTable" resultType="com.lhcredit.project.business.reportTable.domain.ReportTable">
SELECT
id,
report_name as reportName,
notice,
title,
image_url as imageUrl,
type,
sample,
is_del as isDel
FROM
b_report_table
<where>
<if test="isDel != null and isDel != '' ">
is_del = #{isDel}
</if>
</where>
</select>
</mapper>