修改消息小类型的全部查询

This commit is contained in:
2025-02-28 11:29:32 +08:00
parent 31200b4a8a
commit 900265b8b2
15 changed files with 213 additions and 82 deletions

View File

@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.task_name,
c.task_address,
c.task_img,
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = a.id) as numberOfRegistered
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = b.id) as numberOfRegistered
FROM
bgt_project_recruit_apply as a
LEFT JOIN bgt_project_recruit as b on(a.recruit_id = b.id and b.del_flag = 0 )
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bgt_project_recruit_apply as a
LEFT JOIN wgz_user as b ON (a.user_id = b.user_id AND b.del_flag = 0)
WHERE
a.id = #{recruitId} AND a.del_flag = 0
a.recruit_id = #{recruitId} AND a.del_flag = 0
</select>
<select id="userJobListing" resultType="com.ruoyi.wgz.bo.res.WgzAppJobListingRes">
@ -96,8 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = b.id) as numberOfRegistered
FROM
bgt_project_recruit as b
LEFT JOIN fbs_project_task as c ON (c.id = b.task_id AND c.del_flag = 0)
LEFT JOIN fbs_project_task as c ON (c.id = b.task_id)
WHERE
b.id not in (SELECT recruit_id FROM bgt_project_recruit_apply WHERE user_id = #{req.userId}) and
b.del_flag = 0
</select>

View File

@ -34,65 +34,98 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.table_id as tableId,
a.table_name as tableName,
a.read_status as readStatus,
a.create_time as createTime
<if test="req.largeType == '1'">
a.create_time as createTime,
a.message_large_type as messageLargeType,
a.message_small_type as messageSmallType
<if test="req.largeType == 0">
,c.recruit_name as recruitName
,c.id as recruitId
</if>
<if test="req.largeType == '2'">
<if test="req.largeType == 1">
,d.id as jsId
,d.recruit_name as jsName
</if>
<if test="req.largeType == '3' and req.smallType == '0'">
<if test="req.largeType == 2 and req.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>
<if test="req.largeType == 2 and req.smallType == 3">
,g.id as qjID
,g.start_time as qjStartingTime
,g.end_time as qjEndTime
,g.reason as qjReason
,h.username as qjName
,g.create_time as qjLeaveTime
</if>
FROM
wgz_message as a
<if test="req.largeType == '1'">
<if test="req.largeType == 0">
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="req.largeType == '2'">
<if test="req.largeType == 1">
LEFT JOIN wgz_pay_calculation as d ON d.id = a.table_id
</if>
<if test="req.largeType == '3' and req.smallType == '0'">
<if test="req.largeType == 2 and req.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>
<if test="req.largeType == '3' and req.smallType == '1'">
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>
<if test="req.largeType == '3'">
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 test="req.largeType == 2 and req.smallType == '1'">-->
<!-- 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>-->
<!-- <if test="req.largeType == 2 and req.smallType == '2'">-->
<!-- 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>-->
<if test="req.largeType == 2 and req.smallType == 3">
LEFT JOIN wgz_leave as g ON g.id = a.table_id
LEFT JOIN wgz_user as h ON h.id = g.user_id
</if>
<!-- <if test="req.largeType == 2">-->
<!-- 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 = #{req.recipientId} AND
a.del_flag = "0"
<if test="req.largeType == '1'">
AND b.del_flag = "0"
AND c.del_flag = "0"
<if test="req.largeType !=null and req.largeType!=''">
AND a.message_large_type = #{req.largeType}
</if>
<if test="req.largeType == '2'">
AND d.del_flag = "0"
</if>
<if test="req.largeType == '3' and req.smallType == '0'">
AND e.del_flag = "0"
AND f.del_flag = "0"
</if>
<if test="req.largeType == '3' and req.smallType == '1'">
AND a.sender_type = "0"
<if test="req.smallType !=null and req.smallType!=''">
AND a.message_small_type = #{req.smallType}
</if>
</where>
</select>
<select id="pagingQueryTheMessageList" resultType="com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes">
SELECT
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,
a.message_large_type as messageLargeType,
a.message_small_type as messageSmallType
FROM
wgz_message as a
<where>
a.recipient_type = "1" AND
a.recipient_id = #{req.recipientId} AND
a.message_large_type = '3' AND
a.message_small_type is null AND
a.del_flag = "0"
</where>
</select>
<select id="findByRecruitIdData" resultType="com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes">
SELECT
a.id as recruitApplyId,