2025-02-24 10:18:11 +08:00
|
|
|
<?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.ruoyi.wgz.mapper.WgzMessageMapper">
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.wgz.domain.WgzMessage" id="WgzMessageResult">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="senderType" column="sender_type"/>
|
|
|
|
<result property="senderId" column="sender_id"/>
|
|
|
|
<result property="recipientType" column="recipient_type"/>
|
|
|
|
<result property="recipientId" column="recipient_id"/>
|
|
|
|
<result property="headline" column="headline"/>
|
|
|
|
<result property="subheading" column="subheading"/>
|
|
|
|
<result property="tableId" column="table_id"/>
|
|
|
|
<result property="tableName" column="table_name"/>
|
|
|
|
<result property="messageLargeType" column="message_large_type"/>
|
|
|
|
<result property="messageSmallType" column="message_small_type"/>
|
|
|
|
<result property="readStatus" column="read_status"/>
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
</resultMap>
|
|
|
|
|
2025-02-24 19:12:16 +08:00
|
|
|
<!-- 消息类型统计(先分组再统计) -->
|
2025-02-25 14:01:25 +08:00
|
|
|
<select id="userGetMessageList" resultType="com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes">
|
2025-02-24 19:12:16 +08:00
|
|
|
SELECT
|
2025-02-25 14:01:25 +08:00
|
|
|
a.id,
|
|
|
|
a.headline,
|
|
|
|
a.subheading,
|
|
|
|
a.table_id as tableId,
|
|
|
|
a.table_name as tableName,
|
|
|
|
a.read_status as readStatus,
|
|
|
|
a.create_time as createTime
|
|
|
|
<if test="page.largeType == '1'">
|
|
|
|
,c.recruit_name as recruitName
|
|
|
|
,c.id as recruitId
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '2'">
|
|
|
|
,d.id as jsId
|
|
|
|
,d.recruit_name as jsName
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '3' and page.smallType == '0'">
|
|
|
|
,e.id as otherId
|
|
|
|
,e.now_time as otherFillingTime
|
|
|
|
,e.reason as otherReason
|
|
|
|
,f.username as otherApplicant
|
|
|
|
,e.create_time as otherApplicationDate
|
|
|
|
</if>
|
2025-02-24 19:12:16 +08:00
|
|
|
FROM
|
2025-02-25 14:01:25 +08:00
|
|
|
wgz_message as a
|
|
|
|
<if test="page.largeType == '1'">
|
|
|
|
LEFT JOIN bgt_project_recruit_apply as b ON b.id = a.table_id
|
|
|
|
LEFT JOIN bgt_project_recruit as c ON c.id = b.recruit_id
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '2'">
|
|
|
|
LEFT JOIN wgz_pay_calculation as d ON d.id = a.table_id
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '3' and page.smallType == '0'">
|
|
|
|
LEFT JOIN wgz_reissueacard as e ON e.id = a.table_id
|
|
|
|
LEFT JOIN wgz_user as f ON f.id = e.user_id
|
|
|
|
</if>
|
|
|
|
<where>
|
|
|
|
a.recipient_type = "1" AND
|
|
|
|
a.recipient_id = #{page.recipientId} AND
|
|
|
|
a.del_flag = "0"
|
|
|
|
<if test="page.largeType == '1'">
|
|
|
|
AND b.del_flag = "0"
|
|
|
|
AND c.del_flag = "0"
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '2'">
|
|
|
|
AND d.del_flag = "0"
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '3' and page.smallType == '0'">
|
|
|
|
AND e.del_flag = "0"
|
|
|
|
AND f.del_flag = "0"
|
|
|
|
</if>
|
|
|
|
<if test="page.largeType == '3' and page.smallType == '1'">
|
|
|
|
AND a.sender_type = "0"
|
|
|
|
</if>
|
|
|
|
</where>
|
2025-02-24 19:12:16 +08:00
|
|
|
</select>
|
2025-02-24 10:18:11 +08:00
|
|
|
|
2025-02-24 19:12:16 +08:00
|
|
|
</mapper>
|