SysOpRoleMapper.xml
5.17 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
<?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.zteits.sys.mapper.SysOpRoleMapper">
<resultMap id="BaseResultMap" type="com.zteits.sys.domain.SysOpRole">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="sys_op_id" jdbcType="BIGINT" property="sysOpId" />
<result column="sys_role_id" jdbcType="VARCHAR" property="sysRoleId" />
<result column="sys_code" jdbcType="VARCHAR" property="sysCode" />
<result column="data_state" jdbcType="INTEGER" property="dataState" />
<result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
<result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
</resultMap>
<sql id="Base_Column_List">
id, sys_op_id, sys_role_id, sys_code, data_state, create_empid, create_date, modfiy_empid,
modfiy_date
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_op_role
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_op_role
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.zteits.sys.domain.SysOpRole">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_op_role (sys_op_id, sys_role_id, sys_code,
data_state, create_empid, create_date,
modfiy_empid, modfiy_date)
values (#{sysOpId,jdbcType=BIGINT}, #{sysRoleId,jdbcType=VARCHAR}, #{sysCode,jdbcType=VARCHAR},
#{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},
#{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.zteits.sys.domain.SysOpRole">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_op_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sysOpId != null">
sys_op_id,
</if>
<if test="sysRoleId != null">
sys_role_id,
</if>
<if test="sysCode != null">
sys_code,
</if>
<if test="dataState != null">
data_state,
</if>
<if test="createEmpid != null">
create_empid,
</if>
<if test="createDate != null">
create_date,
</if>
<if test="modfiyEmpid != null">
modfiy_empid,
</if>
<if test="modfiyDate != null">
modfiy_date,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sysOpId != null">
#{sysOpId,jdbcType=BIGINT},
</if>
<if test="sysRoleId != null">
#{sysRoleId,jdbcType=VARCHAR},
</if>
<if test="sysCode != null">
#{sysCode,jdbcType=VARCHAR},
</if>
<if test="dataState != null">
#{dataState,jdbcType=INTEGER},
</if>
<if test="createEmpid != null">
#{createEmpid,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
#{createDate,jdbcType=TIMESTAMP},
</if>
<if test="modfiyEmpid != null">
#{modfiyEmpid,jdbcType=VARCHAR},
</if>
<if test="modfiyDate != null">
#{modfiyDate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.zteits.sys.domain.SysOpRole">
update sys_op_role
<set>
<if test="sysOpId != null">
sys_op_id = #{sysOpId,jdbcType=BIGINT},
</if>
<if test="sysRoleId != null">
sys_role_id = #{sysRoleId,jdbcType=VARCHAR},
</if>
<if test="sysCode != null">
sys_code = #{sysCode,jdbcType=VARCHAR},
</if>
<if test="dataState != null">
data_state = #{dataState,jdbcType=INTEGER},
</if>
<if test="createEmpid != null">
create_empid = #{createEmpid,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
create_date = #{createDate,jdbcType=TIMESTAMP},
</if>
<if test="modfiyEmpid != null">
modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
</if>
<if test="modfiyDate != null">
modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.zteits.sys.domain.SysOpRole">
update sys_op_role
set sys_op_id = #{sysOpId,jdbcType=BIGINT},
sys_role_id = #{sysRoleId,jdbcType=VARCHAR},
sys_code = #{sysCode,jdbcType=VARCHAR},
data_state = #{dataState,jdbcType=INTEGER},
create_empid = #{createEmpid,jdbcType=VARCHAR},
create_date = #{createDate,jdbcType=TIMESTAMP},
modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>