|
@@ -3,7 +3,7 @@
|
3
|
3
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
4
|
4
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
5
|
5
|
<mapper namespace="com.ruoyi.postCheck.mapper.PostTeamUserMapper">
|
6
|
|
-
|
|
6
|
+
|
7
|
7
|
<resultMap type="PostTeamUser" id="PostTeamUserResult">
|
8
|
8
|
<result property="id" column="id" />
|
9
|
9
|
<result property="postTeamId" column="post_team_id" />
|
|
@@ -16,27 +16,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
16
|
16
|
<result property="updateTime" column="update_time" />
|
17
|
17
|
<result property="updateBy" column="update_by" />
|
18
|
18
|
<result property="createUserId" column="create_user_id" />
|
|
19
|
+
|
|
20
|
+ <result property="nickName" column="nick_name" />
|
|
21
|
+ <result property="email" column="email"/>
|
|
22
|
+ <result property="phonenumber" column="phonenumber"/>
|
|
23
|
+ <result property="deptName" column="dept_name"/>
|
|
24
|
+ <result property="postName" column="post_name"/>
|
19
|
25
|
</resultMap>
|
20
|
26
|
|
21
|
27
|
<sql id="selectPostTeamUserVo">
|
22
|
|
- select id, post_team_id, user_id, type, remark, del_flag, create_time, create_by, update_time, update_by, create_user_id from post_team_user
|
|
28
|
+ select
|
|
29
|
+ t1.id,
|
|
30
|
+ t1.post_team_id,
|
|
31
|
+ t1.user_id,
|
|
32
|
+ t1.type,
|
|
33
|
+ t1.remark,
|
|
34
|
+ t1.del_flag,
|
|
35
|
+ t1.create_time,
|
|
36
|
+ t1.create_by,
|
|
37
|
+ t1.update_time,
|
|
38
|
+ t1.update_by,
|
|
39
|
+ t1.create_user_id,
|
|
40
|
+ t2.nick_name,
|
|
41
|
+ t2."email" ,
|
|
42
|
+ t2."phonenumber" ,
|
|
43
|
+ t3."dept_name" ,
|
|
44
|
+ t5."post_name"
|
|
45
|
+ from post_team_user t1
|
|
46
|
+ left join public.sys_users t2 on t2.user_id = t1.user_id
|
|
47
|
+ LEFT JOIN "sys_dept" t3 ON t3."dept_id" = t2."dept_id"
|
|
48
|
+ LEFT JOIN "sys_user_post" t4 ON t4."user_id" = t2."user_id"
|
|
49
|
+ LEFT JOIN "sys_post" t5 ON t5."post_id" = t4."post_id"
|
23
|
50
|
</sql>
|
24
|
51
|
|
25
|
52
|
<select id="selectPostTeamUserList" parameterType="PostTeamUser" resultMap="PostTeamUserResult">
|
26
|
53
|
<include refid="selectPostTeamUserVo"/>
|
27
|
|
- <where>
|
|
54
|
+ <where>
|
28
|
55
|
<if test="postTeamId != null and postTeamId != ''"> and post_team_id = #{postTeamId}</if>
|
29
|
56
|
<if test="userId != null "> and user_id = #{userId}</if>
|
30
|
57
|
<if test="type != null "> and type = #{type}</if>
|
31
|
58
|
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
|
32
|
59
|
</where>
|
|
60
|
+ GROUP BY t1."id"
|
33
|
61
|
</select>
|
34
|
|
-
|
|
62
|
+
|
35
|
63
|
<select id="selectPostTeamUserById" parameterType="Long" resultMap="PostTeamUserResult">
|
36
|
64
|
<include refid="selectPostTeamUserVo"/>
|
37
|
65
|
where id = #{id}
|
38
|
66
|
</select>
|
39
|
|
-
|
|
67
|
+
|
40
|
68
|
<insert id="insertPostTeamUser" parameterType="PostTeamUser">
|
41
|
69
|
insert into post_team_user
|
42
|
70
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -89,9 +117,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
89
|
117
|
</delete>
|
90
|
118
|
|
91
|
119
|
<delete id="deletePostTeamUserByIds" parameterType="String">
|
92
|
|
- delete from post_team_user where id in
|
|
120
|
+ delete from post_team_user where id in
|
93
|
121
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
94
|
122
|
#{id}
|
95
|
123
|
</foreach>
|
96
|
124
|
</delete>
|
97
|
|
-</mapper>
|
|
125
|
+</mapper>
|