优化
This commit is contained in:
@ -106,7 +106,7 @@ token:
|
|||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30000
|
expireTime: 10080
|
||||||
|
|
||||||
# MyBatisPlus配置
|
# MyBatisPlus配置
|
||||||
# https://baomidou.com/config/
|
# https://baomidou.com/config/
|
||||||
|
@ -26,7 +26,7 @@ public class SseUtil {
|
|||||||
public static final String ZBF_PREFIX = "zbf-";
|
public static final String ZBF_PREFIX = "zbf-";
|
||||||
public static SseEmitter subscribe(String userId,String prefix) {
|
public static SseEmitter subscribe(String userId,String prefix) {
|
||||||
// Spring Boot 2.4.7中SseEmitter构造函数支持超时时间(单位:毫秒) 30 * 60
|
// 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中回调机制与主流版本一致)
|
// 存储emitter并设置回调(2.4.7中回调机制与主流版本一致)
|
||||||
String key = prefix + "-" +userId;
|
String key = prefix + "-" +userId;
|
||||||
|
@ -98,8 +98,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
FROM zbf_project zp
|
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}
|
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
|
order by zp.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user