|
@@ -6,7 +6,9 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.MeetingMinutes" id="result">
|
|
<resultMap type="com.bosshand.virgo.api.model.MeetingMinutes" id="result">
|
|
<id column="id" property="id"/>
|
|
<id column="id" property="id"/>
|
|
- <result column="organizationId" property="organizationId"/>
|
|
|
|
|
|
+ <result column="userId" property="userId"/>
|
|
|
|
+ <result column="userName" property="userName"/>
|
|
|
|
+ <result column="meetingMinutes" property="meetingMinutes"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="date" property="date"/>
|
|
<result column="date" property="date"/>
|
|
<result column="name" property="name"/>
|
|
<result column="name" property="name"/>
|
|
@@ -24,6 +26,9 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.MeetingMinutes" id="MeetingMinutesResult">
|
|
<resultMap type="com.bosshand.virgo.api.model.MeetingMinutes" id="MeetingMinutesResult">
|
|
<id column="id" property="id"/>
|
|
<id column="id" property="id"/>
|
|
|
|
+ <result column="userId" property="userId"/>
|
|
|
|
+ <result column="userName" property="userName"/>
|
|
|
|
+ <result column="meetingMinutes" property="meetingMinutes"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="projectId" property="projectId"/>
|
|
<result column="date" property="date"/>
|
|
<result column="date" property="date"/>
|
|
@@ -46,10 +51,11 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="query">
|
|
<sql id="query">
|
|
- select a.*, b.name as placeName, c.name as typeName
|
|
|
|
|
|
+ select a.*, b.name as placeName, c.name as typeName, d.name as userName
|
|
from meeting_minutes a
|
|
from meeting_minutes a
|
|
LEFT JOIN meeting_place b ON a.placeId = b.id
|
|
LEFT JOIN meeting_place b ON a.placeId = b.id
|
|
LEFT JOIN meeting_type c ON a.typeId = c.id
|
|
LEFT JOIN meeting_type c ON a.typeId = c.id
|
|
|
|
+ LEFT JOIN mgr_user d ON a.userId = d.id
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="details">
|
|
<sql id="details">
|
|
@@ -58,11 +64,13 @@
|
|
c.name as typeName,
|
|
c.name as typeName,
|
|
d.id as joinUser_id,
|
|
d.id as joinUser_id,
|
|
d.name as joinUser_name,
|
|
d.name as joinUser_name,
|
|
- d.portrait as joinUser_portrait
|
|
|
|
|
|
+ d.portrait as joinUser_portrait,
|
|
|
|
+ e.name as userName
|
|
from meeting_minutes a
|
|
from meeting_minutes a
|
|
LEFT JOIN meeting_place b ON a.placeId = b.id
|
|
LEFT JOIN meeting_place b ON a.placeId = b.id
|
|
LEFT JOIN meeting_type c ON a.typeId = c.id
|
|
LEFT JOIN meeting_type c ON a.typeId = c.id
|
|
LEFT JOIN mgr_user d ON FIND_IN_SET(d.id, a.joinUserIds)
|
|
LEFT JOIN mgr_user d ON FIND_IN_SET(d.id, a.joinUserIds)
|
|
|
|
+ LEFT JOIN mgr_user e ON a.userId = e.id
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="get" resultMap="MeetingMinutesResult">
|
|
<select id="get" resultMap="MeetingMinutesResult">
|
|
@@ -72,6 +80,9 @@
|
|
<select id="getTotalCount" parameterType="com.bosshand.virgo.api.model.MeetingMinutes" resultType="Integer">
|
|
<select id="getTotalCount" parameterType="com.bosshand.virgo.api.model.MeetingMinutes" resultType="Integer">
|
|
SELECT count(*) FROM meeting_minutes
|
|
SELECT count(*) FROM meeting_minutes
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="userId != 0">
|
|
|
|
+ and userId = #{userId}
|
|
|
|
+ </if>
|
|
<if test="organizationId != 0">
|
|
<if test="organizationId != 0">
|
|
and organizationId = #{organizationId}
|
|
and organizationId = #{organizationId}
|
|
</if>
|
|
</if>
|
|
@@ -105,6 +116,9 @@
|
|
<select id="getLimit" resultMap="result">
|
|
<select id="getLimit" resultMap="result">
|
|
<include refid="query"/>
|
|
<include refid="query"/>
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="p.userId != 0">
|
|
|
|
+ and a.userId = #{p.userId}
|
|
|
|
+ </if>
|
|
<if test="p.organizationId != 0">
|
|
<if test="p.organizationId != 0">
|
|
and a.organizationId = #{p.organizationId}
|
|
and a.organizationId = #{p.organizationId}
|
|
</if>
|
|
</if>
|
|
@@ -138,8 +152,8 @@
|
|
|
|
|
|
|
|
|
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
- INSERT INTO meeting_minutes (organizationId, projectId, date, name, duration, placeId, typeId, type, status, joinUserIds, attachment, content)
|
|
|
|
- VALUES (#{organizationId}, #{projectId}, #{date}, #{name}, #{duration}, #{placeId}, #{typeId}, #{type}, #{status}, #{joinUserIds}, #{attachment}, #{content})
|
|
|
|
|
|
+ INSERT INTO meeting_minutes (userId, meetingMinutes, organizationId, projectId, date, name, duration, placeId, typeId, type, status, joinUserIds, attachment, content)
|
|
|
|
+ VALUES (#{userId}, #{meetingMinutes}, #{organizationId}, #{projectId}, #{date}, #{name}, #{duration}, #{placeId}, #{typeId}, #{type}, #{status}, #{joinUserIds}, #{attachment}, #{content})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<delete id="delete">
|
|
<delete id="delete">
|
|
@@ -149,6 +163,8 @@
|
|
<update id="update" parameterType="com.bosshand.virgo.api.model.MeetingMinutes">
|
|
<update id="update" parameterType="com.bosshand.virgo.api.model.MeetingMinutes">
|
|
UPDATE meeting_minutes
|
|
UPDATE meeting_minutes
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
+ <if test="userId!=0">userId=#{userId},</if>
|
|
|
|
+ <if test="meetingMinutes!=null">meetingMinutes=#{meetingMinutes},</if>
|
|
<if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
<if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
<if test="projectId!=0">projectId=#{projectId},</if>
|
|
<if test="projectId!=0">projectId=#{projectId},</if>
|
|
<if test="date!=null">date=#{date},</if>
|
|
<if test="date!=null">date=#{date},</if>
|