CreditIndexParentMapper.xml
5.25 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
<?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.credit.cy.business.mapper.CreditIndexParentMapper">
<resultMap type="CreditIndexParent" id="CreditIndexParentResult">
<result property="id" column="id" />
<result property="reportNo" column="report_no" />
<result property="reportType" column="report_type" />
<result property="reportDate" column="report_date" />
<result property="reportDept" column="report_dept" />
<result property="checkStatus" column="check_status" />
<result property="reportOperate" column="report_operate" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCreditIndexParentVo">
select id, report_no, report_type, report_date, report_dept, check_status, report_operate, del_flag, create_by, create_time, update_by, update_time from credit_index_parent
</sql>
<select id="selectCreditIndexParentList" parameterType="CreditIndexParent" resultMap="CreditIndexParentResult">
<include refid="selectCreditIndexParentVo"/>
<where>
<if test="reportNo != null and reportNo != ''"> and report_no = #{reportNo}</if>
<if test="reportType != null and reportType != ''"> and report_type = #{reportType}</if>
<if test="reportDate != null "> and report_date = #{reportDate}</if>
<if test="reportDept != null and reportDept != ''"> and report_dept = #{reportDept}</if>
<if test="checkStatus != null "> and check_status = #{checkStatus}</if>
<if test="reportOperate != null "> and report_operate = #{reportOperate}</if>
</where>
</select>
<select id="selectCreditIndexParentById" parameterType="Long" resultMap="CreditIndexParentResult">
<include refid="selectCreditIndexParentVo"/>
where id = #{id}
</select>
<insert id="insertCreditIndexParent" parameterType="CreditIndexParent" useGeneratedKeys="true" keyProperty="id">
insert into credit_index_parent
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reportNo != null and reportNo != ''">report_no,</if>
<if test="reportType != null and reportType != ''">report_type,</if>
<if test="reportDate != null">report_date,</if>
<if test="reportDept != null">report_dept,</if>
<if test="checkStatus != null">check_status,</if>
<if test="reportOperate != null">report_operate,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reportNo != null and reportNo != ''">#{reportNo},</if>
<if test="reportType != null and reportType != ''">#{reportType},</if>
<if test="reportDate != null">#{reportDate},</if>
<if test="reportDept != null">#{reportDept},</if>
<if test="checkStatus != null">#{checkStatus},</if>
<if test="reportOperate != null">#{reportOperate},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateCreditIndexParent" parameterType="CreditIndexParent">
update credit_index_parent
<trim prefix="SET" suffixOverrides=",">
<if test="reportNo != null and reportNo != ''">report_no = #{reportNo},</if>
<if test="reportType != null and reportType != ''">report_type = #{reportType},</if>
<if test="reportDate != null">report_date = #{reportDate},</if>
<if test="reportDept != null">report_dept = #{reportDept},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</if>
<if test="reportOperate != null">report_operate = #{reportOperate},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCreditIndexParentById" parameterType="Long">
delete from credit_index_parent where id = #{id}
</delete>
<delete id="deleteCreditIndexParentByIds" parameterType="String">
delete from credit_index_parent where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>