设置前端token过期时间

This commit is contained in:
wangxulei 2025-01-20 15:46:40 +08:00
parent 88d5c939d5
commit b9e3f2e2d1
3 changed files with 3 additions and 4 deletions

View File

@ -235,7 +235,6 @@
) AS n
LEFT JOIN business_author a ON n.follow_id = a.AUTHOR_ID
LEFT JOIN business_note b ON n.note_id = b.note_id
where n.follow_id != #{authorId}
ORDER BY
n.create_time DESC
</select>
@ -268,7 +267,7 @@
business_reply r
LEFT JOIN business_author a ON r.author_id = a.AUTHOR_ID
LEFT JOIN business_note b ON r.note_id = b.note_id
where PARENT_AUTHOR_ID = #{authorId} and r.author_id != #{authorId}
where PARENT_AUTHOR_ID = #{authorId}
ORDER BY
r.create_time DESC
</select>

View File

@ -77,7 +77,7 @@ public class BusinessGenerator {
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://8.146.211.120:3306/ddxhs?useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8");
dsc.setUsername("root");
dsc.setPassword("wxlwxl12");
dsc.setPassword("admin");
// dsc.setSchemaName("public");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");

View File

@ -7,7 +7,7 @@ export function getToken() {
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
return Cookies.set(TokenKey, token,{ expires: 29 })
}
export function removeToken() {