This commit is contained in:
zt
2025-05-20 15:47:04 +08:00
parent bf9fd22327
commit 8651495124
3 changed files with 16 additions and 5 deletions

View File

@ -106,7 +106,7 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 30000
expireTime: 10080
# MyBatisPlus配置
# https://baomidou.com/config/

View File

@ -26,7 +26,7 @@ public class SseUtil {
public static final String ZBF_PREFIX = "zbf-";
public static SseEmitter subscribe(String userId,String prefix) {
// Spring Boot 2.4.7中SseEmitter构造函数支持超时时间单位毫秒 30 * 60
SseEmitter emitter = new SseEmitter(30 * 60 * 1000L); // 30分钟超时
SseEmitter emitter = new SseEmitter(10080 * 60 * 1000L); // 7天过期 与token同步
// 存储emitter并设置回调2.4.7中回调机制与主流版本一致)
String key = prefix + "-" +userId;

View File

@ -96,10 +96,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
project_img,
project_status
FROM zbf_project zp
where zp.id in (select zpsa.project_id from zbf_project_subcontracting_apply zpsa
where zp.id in (select zpsa.project_id from zbf_project_subcontracting_apply zpsa
where zpsa.fbs_user_id = #{dto.fbsUserId}
and zpsa.apply_status in ('0','1')
)
<if test="dto.type == 0 ">
and zpsa.apply_status = '0'
</if>
<if test="dto.type == 1 or dto.type == 2">
and zpsa.apply_status = '1'
</if>
)
<if test="dto.type == 1 ">
and zp.project_status = '1'
</if>
<if test="dto.type == 2 ">
and zp.project_status = '2'
</if>
order by zp.id desc
</select>