|
|
@ -8,7 +8,18 @@ |
|
|
|
<result column="send_type" jdbcType="TINYINT" property="sendType"></result> |
|
|
|
<result column="read_status" jdbcType="TINYINT" property="readStatus"></result> |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createTime"></result> |
|
|
|
<collection property="messages" select="queryContent" column="operation_id" javaType="java.util.List" ofType="com.ccsens.tall.bean.vo.MessageVo$Message"> |
|
|
|
<collection property="messages" select="queryContent" column="operation_id" javaType="java.util.List" |
|
|
|
ofType="com.ccsens.tall.bean.vo.MessageVo$Message"> |
|
|
|
<result column="content" jdbcType="VARCHAR" property="content"></result> |
|
|
|
<result column="type" jdbcType="TINYINT" property="type"></result> |
|
|
|
<result column="settings" jdbcType="VARCHAR" property="settings"></result> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<resultMap id="ProjectMsg" type="com.ccsens.tall.bean.vo.ProjectMessageVo$ProjectMsg"> |
|
|
|
<result column="id" jdbcType="BIGINT" property="operationId"></result> |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createTime"></result> |
|
|
|
<collection property="messages" select="queryContent" column="id" javaType="java.util.List" |
|
|
|
ofType="com.ccsens.tall.bean.vo.MessageVo$Message"> |
|
|
|
<result column="content" jdbcType="VARCHAR" property="content"></result> |
|
|
|
<result column="type" jdbcType="TINYINT" property="type"></result> |
|
|
|
<result column="settings" jdbcType="VARCHAR" property="settings"></result> |
|
|
@ -34,20 +45,11 @@ |
|
|
|
SELECT |
|
|
|
s.id, s.operation_id, s.send_type, s.created_at, s.read_status |
|
|
|
FROM |
|
|
|
t_sys_message_send s, t_sys_operation o |
|
|
|
t_sys_message_send s |
|
|
|
WHERE |
|
|
|
s.operation_id = o.id |
|
|
|
<choose> |
|
|
|
<when test="param.projectId != null"> |
|
|
|
AND o.project_id = #{param.projectId} |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
AND s.receiver_id = #{userId} |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
s.receiver_id = #{userId} |
|
|
|
AND s.send_type = #{param.sendType} |
|
|
|
AND s.rec_status = 0 |
|
|
|
AND o.rec_status = 0 |
|
|
|
ORDER BY |
|
|
|
s.created_at DESC |
|
|
|
</select> |
|
|
@ -64,4 +66,14 @@ |
|
|
|
ORDER BY |
|
|
|
sort |
|
|
|
</select> |
|
|
|
<select id="queryProjectMsg" resultMap="ProjectMsg"> |
|
|
|
SELECT |
|
|
|
o.id, |
|
|
|
o.created_at |
|
|
|
FROM |
|
|
|
t_sys_operation o |
|
|
|
WHERE |
|
|
|
o.project_id = #{projectId} |
|
|
|
AND o.rec_status = 0 |
|
|
|
</select> |
|
|
|
</mapper> |