mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-16 04:07:51 +00:00
update modules/core: add 1 mod 3 del 3 files
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-05-25 13:07:20
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-04-30 22:35:21
|
||||
* @LastEditTime: 2025-05-26 09:03:22
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -15,8 +15,6 @@ package com.bytedesk.core.enums;
|
||||
|
||||
public enum ClientEnum {
|
||||
SYSTEM,
|
||||
// AUTO_REPLY, // auto reply
|
||||
// ROBOT, // robot reply
|
||||
//
|
||||
WEB,
|
||||
WEB_PC, // pc端
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@NonNullApi
|
||||
package com.bytedesk.core.ocr;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
@@ -1,19 +0,0 @@
|
||||
<!--
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-09-11 10:22:00
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-01-03 07:20:50
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
|
||||
* contact: 270580156@qq.com
|
||||
* 联系:270580156@qq.com
|
||||
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
|
||||
-->
|
||||
# OCR-图片文字识别
|
||||
|
||||
提取图片中的文字,并进行向量化存储,用于知识库检索
|
||||
|
||||
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
|
||||
- [PaddleOCR](https://paddlepaddle.github.io/PaddleOCR/latest/#_2)
|
||||
@@ -137,12 +137,17 @@ public class AuthService {
|
||||
.description("User login authentication token")
|
||||
.accessToken(accessToken)
|
||||
.type(TokenTypeEnum.LOGIN.name())
|
||||
.expiresAt(LocalDateTime.now().plusHours(24)) // 默认24小时过期
|
||||
.revoked(false)
|
||||
.client(client)
|
||||
.device(device)
|
||||
.userUid(userDetails.getUid())
|
||||
.build();
|
||||
// 只有当client中含有web字样时,expiresAt有效期24小时,否则为365天
|
||||
if (client.toLowerCase().contains("web")) {
|
||||
tokenRequest.setExpiresAt(LocalDateTime.now().plusHours(24)); // 默认24小时过期
|
||||
} else {
|
||||
tokenRequest.setExpiresAt(LocalDateTime.now().plusDays(365)); // 其他客户端默认365天过期
|
||||
}
|
||||
|
||||
tokenRestService.create(tokenRequest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user