auto commit: 2025-02-07 21:40:47

This commit is contained in:
jack ning
2025-02-07 21:40:48 +08:00
parent 8cee94032c
commit a67bed5896
18 changed files with 58 additions and 19 deletions

View File

@@ -28,7 +28,7 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.bytedesk.ai.provider.vendors.ollama.OllamaChatService;
import com.bytedesk.ai.provider.vendors.zhipuai.ZhipuaiService;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.enums.ClientEnum;
import com.bytedesk.core.enums.LevelEnum;
import com.bytedesk.core.message.IMessageSendService;

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-01-30 09:14:39
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-07 20:44:40
* @LastEditTime: 2025-02-07 21:23:36
* @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.
@@ -12,7 +12,7 @@
* 联系270580156@qq.com
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
*/
package com.bytedesk.core.config;
package com.bytedesk.core.config.properties;
import java.util.ArrayList;
import java.util.List;

View File

@@ -0,0 +1,32 @@
/*
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-07 21:24:22
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-07 21:26:03
* @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
*
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
*/
package com.bytedesk.core.config.properties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bytedesk.core.utils.ConvertUtils;
@RestController
@RequestMapping("/test/api/properties")
public class BytedeskPropertiesController {
// http://127.0.0.1:9003/test/api/properties/bytedesk
@GetMapping("/bytedesk")
public BytedeskPropertiesResponse getBytedeskProperties() {
return ConvertUtils.convertToBytedeskPropertiesResponse(BytedeskProperties.getInstance());
}
}

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-07 20:45:09
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-07 20:46:13
* @LastEditTime: 2025-02-07 21:13:04
* @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.
@@ -11,7 +11,7 @@
*
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
*/
package com.bytedesk.core.config;
package com.bytedesk.core.config.properties;
import java.io.Serializable;
@@ -29,6 +29,7 @@ public class BytedeskPropertiesResponse implements Serializable {
private String logo;
private String description;
private String version;
//
}

View File

@@ -15,7 +15,7 @@ package com.bytedesk.core.feature;
import org.springframework.web.bind.annotation.RestController;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.utils.JsonResult;
import lombok.AllArgsConstructor;

View File

@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;

View File

@@ -29,7 +29,7 @@ import org.springframework.orm.ObjectOptimisticLockingFailureException;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.bytedesk.core.base.BaseRestService;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.constant.I18Consts;
import com.bytedesk.core.constant.TypeConsts;
import com.bytedesk.core.exception.EmailExistsException;

View File

@@ -28,7 +28,7 @@ import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.message.MessageEntity;
import com.bytedesk.core.push.PushNotifier;
import com.bytedesk.core.utils.Utils;

View File

@@ -25,7 +25,7 @@ import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.message.MessageEntity;
import com.bytedesk.core.push.PushNotifier;
// import com.bytedesk.core.utils.Utils;

View File

@@ -18,7 +18,7 @@ import java.util.Optional;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.stereotype.Component;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.rbac.authority.AuthorityInitializer;
import com.bytedesk.core.rbac.role.RoleInitializer;

View File

@@ -16,7 +16,7 @@ package com.bytedesk.core.rbac.user;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Component;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.constant.AvatarConsts;
import com.bytedesk.core.uid.UidUtils;

View File

@@ -28,7 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import com.bytedesk.core.config.BytedeskEventPublisher;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.constant.AvatarConsts;
import com.bytedesk.core.constant.I18Consts;
import com.bytedesk.core.enums.PlatformEnum;

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-03-01 17:20:46
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2024-11-09 12:21:51
* @LastEditTime: 2025-02-07 21:22:25
* @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.
@@ -21,6 +21,8 @@ import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import com.alibaba.fastjson2.JSON;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskPropertiesResponse;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.message.MessageEntity;
import com.bytedesk.core.message.MessageResponse;
@@ -143,4 +145,8 @@ public class ConvertUtils {
return modelMapper.map(authorityEntity, AuthorityResponse.class);
}
public static BytedeskPropertiesResponse convertToBytedeskPropertiesResponse(BytedeskProperties bytedeskProperties) {
return modelMapper.map(bytedeskProperties, BytedeskPropertiesResponse.class);
}
}

View File

@@ -20,7 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.kbase.upload.storage.UploadStorageException;
@Configuration

View File

@@ -39,7 +39,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import com.bytedesk.core.base.BaseRestService;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.rbac.user.UserProtobuf;
import com.bytedesk.core.uid.UidUtils;
import com.bytedesk.kbase.upload.storage.UploadStorageException;

View File

@@ -10,7 +10,7 @@ import java.nio.file.StandardCopyOption;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.kbase.upload.storage.UploadStorageException;
public class UploadUtils {

View File

@@ -17,7 +17,7 @@ import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.constant.BytedeskConsts;
import lombok.AllArgsConstructor;

View File

@@ -16,7 +16,7 @@ package com.bytedesk.team.member;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.stereotype.Component;
import com.bytedesk.core.config.BytedeskProperties;
import com.bytedesk.core.config.properties.BytedeskProperties;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.constant.I18Consts;
import com.bytedesk.team.department.DepartmentConsts;