JudicialCasesStatisticsYearMapper.xml
6.74 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
<?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.judicialCasesStatisticsYear.mapper.JudicialCasesStatisticsYearMapper">
<resultMap type="JudicialCasesStatisticsYear" id="JudicialCasesStatisticsYearResult">
<result property="id" column="id" />
<result property="caseType" column="caseType" />
<result property="caseTypeStr" column="caseTypeStr" />
<result property="oneyear" column="oneyear" />
<result property="onetothreeyear" column="onetothreeyear" />
<result property="threetofiveyear" column="threetofiveyear" />
<result property="fiveyear" column="fiveyear" />
<result property="countTotal" column="countTotal" />
<result property="reportId" column="report_id" />
<result property="dataStatus" column="dataStatus" />
<result property="ename" column="ename" />
<result property="lastUpdateTime" column="lastUpdateTime" />
<result property="cgId" column="cg_id" />
</resultMap>
<sql id="selectJudicialCasesStatisticsYearVo">
select id, caseType, caseTypeStr, oneyear, onetothreeyear, threetofiveyear, fiveyear, countTotal, report_id, dataStatus, ename, lastUpdateTime, cg_id from judicial_cases_statistics_year
</sql>
<select id="selectJudicialCasesStatisticsYearList" parameterType="JudicialCasesStatisticsYear" resultMap="JudicialCasesStatisticsYearResult">
<include refid="selectJudicialCasesStatisticsYearVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="caseType != null "> and caseType = #{caseType}</if>
<if test="caseTypeStr != null and caseTypeStr != '' "> and caseTypeStr = #{caseTypeStr}</if>
<if test="oneyear != null and oneyear != '' "> and oneyear = #{oneyear}</if>
<if test="onetothreeyear != null and onetothreeyear != '' "> and onetothreeyear = #{onetothreeyear}</if>
<if test="threetofiveyear != null and threetofiveyear != '' "> and threetofiveyear = #{threetofiveyear}</if>
<if test="fiveyear != null and fiveyear != '' "> and fiveyear = #{fiveyear}</if>
<if test="countTotal != null and countTotal != '' "> and countTotal = #{countTotal}</if>
<if test="reportId != null and reportId != '' "> and report_id = #{reportId}</if>
<if test="dataStatus != null "> and dataStatus = #{dataStatus}</if>
<if test="ename != null and ename != '' "> and ename = #{ename}</if>
<if test="lastUpdateTime != null "> and lastUpdateTime = #{lastUpdateTime}</if>
<if test="cgId != null "> and cg_id = #{cgId}</if>
</where>
</select>
<select id="selectJudicialCasesStatisticsYearById" parameterType="Integer" resultMap="JudicialCasesStatisticsYearResult">
<include refid="selectJudicialCasesStatisticsYearVo"/>
where id = #{id}
</select>
<insert id="insertJudicialCasesStatisticsYear" parameterType="JudicialCasesStatisticsYear" useGeneratedKeys="true" keyProperty="id">
insert into judicial_cases_statistics_year
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseType != null ">caseType,</if>
<if test="caseTypeStr != null and caseTypeStr != '' ">caseTypeStr,</if>
<if test="oneyear != null and oneyear != '' ">oneyear,</if>
<if test="onetothreeyear != null and onetothreeyear != '' ">onetothreeyear,</if>
<if test="threetofiveyear != null and threetofiveyear != '' ">threetofiveyear,</if>
<if test="fiveyear != null and fiveyear != '' ">fiveyear,</if>
<if test="countTotal != null and countTotal != '' ">countTotal,</if>
<if test="reportId != null and reportId != '' ">report_id,</if>
<if test="dataStatus != null ">dataStatus,</if>
<if test="ename != null and ename != '' ">ename,</if>
<if test="lastUpdateTime != null ">lastUpdateTime,</if>
<if test="cgId != null ">cg_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseType != null ">#{caseType},</if>
<if test="caseTypeStr != null and caseTypeStr != '' ">#{caseTypeStr},</if>
<if test="oneyear != null and oneyear != '' ">#{oneyear},</if>
<if test="onetothreeyear != null and onetothreeyear != '' ">#{onetothreeyear},</if>
<if test="threetofiveyear != null and threetofiveyear != '' ">#{threetofiveyear},</if>
<if test="fiveyear != null and fiveyear != '' ">#{fiveyear},</if>
<if test="countTotal != null and countTotal != '' ">#{countTotal},</if>
<if test="reportId != null and reportId != '' ">#{reportId},</if>
<if test="dataStatus != null ">#{dataStatus},</if>
<if test="ename != null and ename != '' ">#{ename},</if>
<if test="lastUpdateTime != null ">#{lastUpdateTime},</if>
<if test="cgId != null ">#{cgId},</if>
</trim>
</insert>
<update id="updateJudicialCasesStatisticsYear" parameterType="JudicialCasesStatisticsYear">
update judicial_cases_statistics_year
<trim prefix="SET" suffixOverrides=",">
<if test="caseType != null ">caseType = #{caseType},</if>
<if test="caseTypeStr != null and caseTypeStr != '' ">caseTypeStr = #{caseTypeStr},</if>
<if test="oneyear != null and oneyear != '' ">oneyear = #{oneyear},</if>
<if test="onetothreeyear != null and onetothreeyear != '' ">onetothreeyear = #{onetothreeyear},</if>
<if test="threetofiveyear != null and threetofiveyear != '' ">threetofiveyear = #{threetofiveyear},</if>
<if test="fiveyear != null and fiveyear != '' ">fiveyear = #{fiveyear},</if>
<if test="countTotal != null and countTotal != '' ">countTotal = #{countTotal},</if>
<if test="reportId != null and reportId != '' ">report_id = #{reportId},</if>
<if test="dataStatus != null ">dataStatus = #{dataStatus},</if>
<if test="ename != null and ename != '' ">ename = #{ename},</if>
<if test="lastUpdateTime != null ">lastUpdateTime = #{lastUpdateTime},</if>
<if test="cgId != null ">cg_id = #{cgId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteJudicialCasesStatisticsYearById" parameterType="Integer">
delete from judicial_cases_statistics_year where id = #{id}
</delete>
<delete id="deleteJudicialCasesStatisticsYearByIds" parameterType="String">
delete from judicial_cases_statistics_year where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>