|
@@ -15,10 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
15
|
15
|
<result property="updateBy" column="update_by" />
|
16
|
16
|
<result property="updateTime" column="update_time" />
|
17
|
17
|
<result property="remark" column="remark" />
|
|
18
|
+ <result property="deptId" column="dept_id" />
|
|
19
|
+ <result property="postLevel" column="post_level" />
|
18
|
20
|
</resultMap>
|
19
|
21
|
|
20
|
22
|
<sql id="selectPostVo">
|
21
|
|
- select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
|
23
|
+ select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark, dept_id, post_level
|
22
|
24
|
from sys_post
|
23
|
25
|
</sql>
|
24
|
26
|
|
|
@@ -81,6 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
81
|
83
|
<if test="status != null and status != ''">status = #{status},</if>
|
82
|
84
|
<if test="remark != null">remark = #{remark},</if>
|
83
|
85
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
86
|
+ <if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
|
|
87
|
+ <if test="postLevel != null and postLevel != ''">post_level = #{postLevel},</if>
|
84
|
88
|
update_time =
|
85
|
89
|
<!-- sysdate() -->
|
86
|
90
|
CURRENT_TIMESTAMP
|
|
@@ -97,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
97
|
101
|
<if test="status != null and status != ''">status,</if>
|
98
|
102
|
<if test="remark != null and remark != ''">remark,</if>
|
99
|
103
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
104
|
+ <if test="deptId != null and deptId != ''">dept_id,</if>
|
|
105
|
+ <if test="postLevel != null and postLevel != ''">post_level,</if>
|
100
|
106
|
create_time
|
101
|
107
|
)values(
|
102
|
108
|
<if test="postId != null and postId != 0">#{postId},</if>
|
|
@@ -106,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
106
|
112
|
<if test="status != null and status != ''">#{status},</if>
|
107
|
113
|
<if test="remark != null and remark != ''">#{remark},</if>
|
108
|
114
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
115
|
+ <if test="deptId != null and deptId != ''">#{deptId},</if>
|
|
116
|
+ <if test="postLevel != null and postLevel != ''">#{postLevel},</if>
|
109
|
117
|
<!-- sysdate() -->
|
110
|
118
|
CURRENT_TIMESTAMP
|
111
|
119
|
)
|
|
@@ -122,4 +130,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
122
|
130
|
</foreach>
|
123
|
131
|
</delete>
|
124
|
132
|
|
|
133
|
+
|
|
134
|
+ <select id="selectPostByDeptId" parameterType="Long" resultMap="SysPostResult">
|
|
135
|
+ <include refid="selectPostVo"/>
|
|
136
|
+ where p.dept_id = #{deptId}
|
|
137
|
+ </select>
|
|
138
|
+
|
125
|
139
|
</mapper>
|