diff --git a/backend/app/src/main/java/io/metersphere/listener/AppStartListener.java b/backend/app/src/main/java/io/metersphere/listener/AppStartListener.java index 1b999337ce..88f670538c 100644 --- a/backend/app/src/main/java/io/metersphere/listener/AppStartListener.java +++ b/backend/app/src/main/java/io/metersphere/listener/AppStartListener.java @@ -2,7 +2,7 @@ package io.metersphere.listener; import io.metersphere.api.event.APIEventSource; import io.metersphere.plan.listener.ExecEventListener; -import io.metersphere.sdk.service.PluginLoadService; +import io.metersphere.system.service.PluginLoadService; import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.sdk.util.LogUtils; import jakarta.annotation.Resource; diff --git a/backend/framework/sdk/pom.xml b/backend/framework/sdk/pom.xml index 9974d5781e..668bf6103d 100644 --- a/backend/framework/sdk/pom.xml +++ b/backend/framework/sdk/pom.xml @@ -407,17 +407,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - org.mybatis.generator mybatis-generator-maven-plugin diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/IResultCode.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/IResultCode.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/IResultCode.java rename to backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/IResultCode.java index 945aa5f634..c3646c9301 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/IResultCode.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/IResultCode.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.controller.handler.result; +package io.metersphere.sdk.exception; import io.metersphere.sdk.util.Translator; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/MSException.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/MSException.java index a851176682..f83095cb22 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/MSException.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/exception/MSException.java @@ -1,6 +1,5 @@ package io.metersphere.sdk.exception; -import io.metersphere.sdk.controller.handler.result.IResultCode; import org.apache.commons.lang3.StringUtils; public class MSException extends RuntimeException { diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseMapper.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseMapper.java deleted file mode 100644 index aa32b06691..0000000000 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseMapper.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.metersphere.sdk.mapper; - -public interface BaseMapper { -} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/NoticeSender.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/NoticeSender.java deleted file mode 100644 index 7395121465..0000000000 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/NoticeSender.java +++ /dev/null @@ -1,9 +0,0 @@ -package io.metersphere.sdk.notice.sender; - - -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; - -public interface NoticeSender { - void send(MessageDetail messageDetail, NoticeModel noticeModel); -} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/WorkerIdAssigner.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/WorkerIdAssigner.java deleted file mode 100644 index 78a90593a3..0000000000 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/WorkerIdAssigner.java +++ /dev/null @@ -1,18 +0,0 @@ - -package io.metersphere.sdk.uid.worker; - -/** - * Represents a worker id assigner for {@link io.metersphere.sdk.uid.impl.DefaultUidGenerator} - * - - */ -public interface WorkerIdAssigner { - - /** - * Assign worker id for {@link io.metersphere.sdk.uid.impl.DefaultUidGenerator} - * - * @return assigned worker id - */ - long assignWorkerId(); - -} diff --git a/backend/services/api-test/pom.xml b/backend/services/api-test/pom.xml index d7e43eaeff..15238ec67e 100644 --- a/backend/services/api-test/pom.xml +++ b/backend/services/api-test/pom.xml @@ -18,6 +18,24 @@ metersphere-sdk ${revision} + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-system-setting + ${revision} + tests + test-jar + test + + + io.metersphere + metersphere-project-management + ${revision} + org.apache.jmeter ApacheJMeter_components diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java b/backend/services/api-test/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java index 4569183295..cc96282e34 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java @@ -4,8 +4,8 @@ import io.metersphere.api.dto.definition.ApiDefinitionDTO; import io.metersphere.api.service.APIDefinitionLogService; import io.metersphere.api.service.APIDefinitionService; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import jakarta.annotation.Resource; diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/APIDefinitionLogService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/APIDefinitionLogService.java index 2ce708ba67..cca0981032 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/APIDefinitionLogService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/APIDefinitionLogService.java @@ -6,9 +6,9 @@ import io.metersphere.api.dto.definition.ApiDefinitionDTO; import io.metersphere.api.mapper.ApiDefinitionMapper; import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.dto.LogDTO; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; @@ -126,6 +126,7 @@ public class APIDefinitionLogService { /** * 批量更新接口日志 + * * @return */ public List batchUpdateLog(List ids) { diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/CleanupAPIResourceService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/CleanupAPIResourceService.java index a877eaf4fe..7309512efc 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/CleanupAPIResourceService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/CleanupAPIResourceService.java @@ -1,7 +1,7 @@ package io.metersphere.api.service; -import io.metersphere.sdk.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; +import io.metersphere.system.service.CleanupProjectResourceService; import org.springframework.stereotype.Component; @Component diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/Application.java b/backend/services/api-test/src/test/java/io/metersphere/api/Application.java index 4536dec23c..ec066f8ce8 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/Application.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/Application.java @@ -19,7 +19,7 @@ import org.springframework.context.annotation.ComponentScan; MinioProperties.class }) @ServletComponentScan -@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.api"}) +@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.api", "io.metersphere.system"}) public class Application { public static void main(String[] args) { diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java index e4ae46f5e5..c484b324f9 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java @@ -4,12 +4,12 @@ import io.metersphere.api.dto.jmeter.processors.MSJSR223Processor; import io.metersphere.api.dto.jmeter.sampler.MSDebugSampler; import io.metersphere.api.util.JSONUtils; import io.metersphere.plugin.api.dto.TestElementDTO; +import io.metersphere.system.uid.UUID; import org.junit.jupiter.api.*; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import java.util.LinkedList; -import io.metersphere.sdk.uid.UUID; @SpringBootTest diff --git a/backend/services/api-test/src/test/resources/bootstrap.properties b/backend/services/api-test/src/test/resources/bootstrap.properties index 62e94d254a..df85de4cef 100644 --- a/backend/services/api-test/src/test/resources/bootstrap.properties +++ b/backend/services/api-test/src/test/resources/bootstrap.properties @@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci # redis embedded.redis.enabled=true # kafka -embedded.kafka.enabled=false +embedded.kafka.enabled=true # minio embedded.minio.enabled=true \ No newline at end of file diff --git a/backend/services/bug-management/pom.xml b/backend/services/bug-management/pom.xml index 5c800c310c..f5b420b6c4 100644 --- a/backend/services/bug-management/pom.xml +++ b/backend/services/bug-management/pom.xml @@ -18,7 +18,16 @@ metersphere-sdk ${revision} - + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-project-management + ${revision} + diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/result/BugMgtResultCode.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/result/BugMgtResultCode.java index 4abf1d9717..44759a4d77 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/result/BugMgtResultCode.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/result/BugMgtResultCode.java @@ -1,6 +1,7 @@ package io.metersphere.bug.controller.result; -import io.metersphere.sdk.controller.handler.result.IResultCode; + +import io.metersphere.sdk.exception.IResultCode; public enum BugMgtResultCode implements IResultCode { diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/CleanupBugResourceService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/CleanupBugResourceService.java index fe171c6c4f..dac11d87c8 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/CleanupBugResourceService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/CleanupBugResourceService.java @@ -1,6 +1,6 @@ package io.metersphere.bug.service; -import io.metersphere.sdk.service.CleanupProjectResourceService; +import io.metersphere.system.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; import org.springframework.stereotype.Component; diff --git a/backend/services/bug-management/src/test/java/io/metersphere/bug/Application.java b/backend/services/bug-management/src/test/java/io/metersphere/bug/Application.java index 1e0d849081..953d876551 100644 --- a/backend/services/bug-management/src/test/java/io/metersphere/bug/Application.java +++ b/backend/services/bug-management/src/test/java/io/metersphere/bug/Application.java @@ -19,7 +19,7 @@ import org.springframework.context.annotation.ComponentScan; MinioProperties.class }) @ServletComponentScan -@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.bug"}) +@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.bug", "io.metersphere.system"}) public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); diff --git a/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java b/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java index f8550d294c..d3cd680fc1 100644 --- a/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java +++ b/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java @@ -4,6 +4,7 @@ import com.jayway.jsonpath.JsonPath; import io.metersphere.bug.domain.Bug; import io.metersphere.sdk.constants.SessionConstants; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.uid.UUID; import jakarta.annotation.Resource; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; @@ -16,9 +17,6 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import io.metersphere.sdk.uid.UUID; - - import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; @@ -68,33 +66,33 @@ public class BugControllerTest { bug.setSourceId(UUID.randomUUID().toString()); mockMvc.perform( - MockMvcRequestBuilders.post("/bug/add") - .header(SessionConstants.HEADER_TOKEN, sessionId) - .header(SessionConstants.CSRF_TOKEN, csrfToken) - .content(JSON.toJSONString(bug)) - .contentType(MediaType.APPLICATION_JSON)) + MockMvcRequestBuilders.post("/bug/add") + .header(SessionConstants.HEADER_TOKEN, sessionId) + .header(SessionConstants.CSRF_TOKEN, csrfToken) + .content(JSON.toJSONString(bug)) + .contentType(MediaType.APPLICATION_JSON)) // 检查状态 .andExpect(status().isOk()) // 检查响应头 .andExpect(content().contentType(MediaType.APPLICATION_JSON)) // 检查数据 .andExpect(jsonPath("$.data.title").value("test")) - ; + ; // 缺陷已存在校验 mockMvc.perform( - MockMvcRequestBuilders.post("/bug/add") - .header(SessionConstants.HEADER_TOKEN, sessionId) - .header(SessionConstants.CSRF_TOKEN, csrfToken) - .content(JSON.toJSONString(bug)) - .contentType(MediaType.APPLICATION_JSON)) + MockMvcRequestBuilders.post("/bug/add") + .header(SessionConstants.HEADER_TOKEN, sessionId) + .header(SessionConstants.CSRF_TOKEN, csrfToken) + .content(JSON.toJSONString(bug)) + .contentType(MediaType.APPLICATION_JSON)) // 检查失败状态码 .andExpect(status().is5xxServerError()) // 检查响应头 .andExpect(content().contentType(MediaType.APPLICATION_JSON)) // 检查业务状态码 .andExpect(jsonPath("$.code").value(108001)) - ; + ; } @Test diff --git a/backend/services/bug-management/src/test/resources/bootstrap.properties b/backend/services/bug-management/src/test/resources/bootstrap.properties index 62e94d254a..df85de4cef 100644 --- a/backend/services/bug-management/src/test/resources/bootstrap.properties +++ b/backend/services/bug-management/src/test/resources/bootstrap.properties @@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci # redis embedded.redis.enabled=true # kafka -embedded.kafka.enabled=false +embedded.kafka.enabled=true # minio embedded.minio.enabled=true \ No newline at end of file diff --git a/backend/services/case-management/pom.xml b/backend/services/case-management/pom.xml index 730502da82..ea512a8681 100644 --- a/backend/services/case-management/pom.xml +++ b/backend/services/case-management/pom.xml @@ -18,7 +18,16 @@ metersphere-sdk ${revision} - + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-project-management + ${revision} + diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CleanupCaseResourceService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CleanupCaseResourceService.java index 25d2145ca4..5be106ea5f 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CleanupCaseResourceService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CleanupCaseResourceService.java @@ -1,6 +1,6 @@ package io.metersphere.functional.service; -import io.metersphere.sdk.service.CleanupProjectResourceService; +import io.metersphere.system.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; import org.springframework.stereotype.Component; diff --git a/backend/services/case-management/src/test/java/io/metersphere/functional/Application.java b/backend/services/case-management/src/test/java/io/metersphere/functional/Application.java index f492be102c..d766547753 100644 --- a/backend/services/case-management/src/test/java/io/metersphere/functional/Application.java +++ b/backend/services/case-management/src/test/java/io/metersphere/functional/Application.java @@ -20,7 +20,7 @@ import org.springframework.context.annotation.ComponentScan; MinioProperties.class }) @ServletComponentScan -@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.functional"}) +@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.functional", "io.metersphere.system"}) public class Application { public static void main(String[] args) { diff --git a/backend/services/case-management/src/test/resources/bootstrap.properties b/backend/services/case-management/src/test/resources/bootstrap.properties index 62e94d254a..df85de4cef 100644 --- a/backend/services/case-management/src/test/resources/bootstrap.properties +++ b/backend/services/case-management/src/test/resources/bootstrap.properties @@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci # redis embedded.redis.enabled=true # kafka -embedded.kafka.enabled=false +embedded.kafka.enabled=true # minio embedded.minio.enabled=true \ No newline at end of file diff --git a/backend/services/load-test/pom.xml b/backend/services/load-test/pom.xml index d59d64298e..e4775c0c53 100644 --- a/backend/services/load-test/pom.xml +++ b/backend/services/load-test/pom.xml @@ -18,7 +18,16 @@ metersphere-sdk ${revision} - + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-project-management + ${revision} + diff --git a/backend/services/project-management/pom.xml b/backend/services/project-management/pom.xml index e7dce9180e..9cee5fc5cd 100644 --- a/backend/services/project-management/pom.xml +++ b/backend/services/project-management/pom.xml @@ -21,7 +21,7 @@ io.metersphere - metersphere-sdk + metersphere-system-setting ${revision} tests test-jar diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/NoticeMessageTaskController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/NoticeMessageTaskController.java index 55e93e2440..4725559c58 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/NoticeMessageTaskController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/NoticeMessageTaskController.java @@ -3,7 +3,7 @@ package io.metersphere.project.controller; import io.metersphere.project.dto.MessageTaskDTO; import io.metersphere.project.service.NoticeMessageTaskService; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.request.MessageTaskRequest; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.validation.groups.Created; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java index 7630bba123..ac65a770e2 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java @@ -5,8 +5,8 @@ import io.metersphere.project.request.ProjectApplicationRequest; import io.metersphere.project.service.ProjectApplicationService; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.OptionDTO; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.User; import io.metersphere.validation.groups.Updated; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectLogController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectLogController.java index 230ac84404..a6119281da 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectLogController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectLogController.java @@ -4,9 +4,9 @@ package io.metersphere.project.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.log.vo.OperationLogRequest; -import io.metersphere.sdk.log.vo.OperationLogResponse; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.log.vo.OperationLogRequest; +import io.metersphere.system.log.vo.OperationLogResponse; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectUserRoleController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectUserRoleController.java index d132e45910..c09942c2c5 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectUserRoleController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectUserRoleController.java @@ -13,8 +13,8 @@ import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/enums/result/ProjectResultCode.java b/backend/services/project-management/src/main/java/io/metersphere/project/enums/result/ProjectResultCode.java index 53649a51bb..ae947158b5 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/enums/result/ProjectResultCode.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/enums/result/ProjectResultCode.java @@ -1,6 +1,6 @@ package io.metersphere.project.enums.result; -import io.metersphere.sdk.controller.handler.result.IResultCode; +import io.metersphere.sdk.exception.IResultCode; /** * @author guoyuqi diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/job/CleanUpReportJob.java b/backend/services/project-management/src/main/java/io/metersphere/project/job/CleanUpReportJob.java index 0f56783ea3..658a8883e0 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/job/CleanUpReportJob.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/job/CleanUpReportJob.java @@ -1,6 +1,6 @@ package io.metersphere.project.job; -import io.metersphere.sdk.sechedule.BaseScheduleJob; +import io.metersphere.system.sechedule.BaseScheduleJob; import org.quartz.JobExecutionContext; import org.quartz.JobKey; import org.quartz.TriggerKey; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml index f5a3e063dd..16e290cd6d 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml @@ -37,7 +37,7 @@ and urr.role_id in - + diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupEnvironmentResourceService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupEnvironmentResourceService.java index 3ca8d646b6..c82f8777ed 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupEnvironmentResourceService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupEnvironmentResourceService.java @@ -5,7 +5,7 @@ import io.metersphere.sdk.domain.ProjectParametersExample; import io.metersphere.sdk.mapper.EnvironmentBlobMapper; import io.metersphere.sdk.mapper.EnvironmentMapper; import io.metersphere.sdk.mapper.ProjectParametersMapper; -import io.metersphere.sdk.service.CleanupProjectResourceService; +import io.metersphere.system.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; import jakarta.annotation.Resource; import org.springframework.stereotype.Component; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupRobotResourceService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupRobotResourceService.java index dcf8cedd28..4e0ea41b6d 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupRobotResourceService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/CleanupRobotResourceService.java @@ -2,7 +2,7 @@ package io.metersphere.project.service; import io.metersphere.project.domain.ProjectRobotExample; import io.metersphere.project.mapper.ProjectRobotMapper; -import io.metersphere.sdk.service.CleanupProjectResourceService; +import io.metersphere.system.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; import jakarta.annotation.Resource; import org.springframework.stereotype.Component; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateRobotResourceService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateRobotResourceService.java index 98e195436c..8878b6e7a8 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateRobotResourceService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateRobotResourceService.java @@ -3,8 +3,8 @@ package io.metersphere.project.service; import io.metersphere.project.domain.ProjectRobot; import io.metersphere.project.enums.ProjectRobotPlatform; import io.metersphere.project.mapper.ProjectRobotMapper; -import io.metersphere.sdk.service.CreateProjectResourceService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.service.CreateProjectResourceService; +import io.metersphere.system.uid.UUID; import jakarta.annotation.Resource; import org.springframework.stereotype.Component; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/NoticeMessageTaskService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/NoticeMessageTaskService.java index de4869cc0d..a2059ff50c 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/NoticeMessageTaskService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/NoticeMessageTaskService.java @@ -10,10 +10,10 @@ import io.metersphere.project.mapper.MessageTaskBlobMapper; import io.metersphere.project.mapper.MessageTaskMapper; import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.project.mapper.ProjectRobotMapper; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.request.MessageTaskRequest; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserRoleRelation; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java index 27a32b5ed7..a7818da804 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java @@ -13,12 +13,12 @@ import io.metersphere.sdk.constants.ProjectApplicationType; import io.metersphere.sdk.constants.ScheduleType; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.OptionDTO; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.sechedule.BaseScheduleService; -import io.metersphere.sdk.service.PluginLoadService; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.sechedule.BaseScheduleService; +import io.metersphere.system.service.PluginLoadService; import io.metersphere.sdk.util.JSON; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.*; import io.metersphere.system.mapper.ExtPluginMapper; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectMemberService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectMemberService.java index 7e3f68a481..7acdf68551 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectMemberService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectMemberService.java @@ -15,10 +15,10 @@ import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Translator; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectRobotService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectRobotService.java index 291ae3b991..c0c9a9cabb 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectRobotService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectRobotService.java @@ -17,7 +17,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; @Service @Transactional diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java index 831dda5b9e..060a436294 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java @@ -10,7 +10,7 @@ import io.metersphere.sdk.dto.ProjectExtendDTO; import io.metersphere.sdk.dto.SessionUser; import io.metersphere.sdk.dto.UserDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BaseUserService; +import io.metersphere.system.service.BaseUserService; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleLogService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleLogService.java index 0445623041..b08d9701c2 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleLogService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleLogService.java @@ -7,8 +7,8 @@ import io.metersphere.project.request.ProjectUserRoleMemberEditRequest; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.UserRole; import io.metersphere.system.domain.UserRoleExample; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleService.java index 95779af3bc..607c95f667 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectUserRoleService.java @@ -11,8 +11,8 @@ import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BaseUserRoleService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.service.BaseUserRoleService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.*; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java index 4137754793..7dbf3603d6 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java @@ -1,7 +1,7 @@ package io.metersphere.project.controller; import io.metersphere.project.service.CleanupEnvironmentResourceService; -import io.metersphere.sdk.invoker.ProjectServiceInvoker; +import io.metersphere.system.invoker.ProjectServiceInvoker; import jakarta.annotation.Resource; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java index 121956705d..996f9025e0 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java @@ -3,11 +3,11 @@ package io.metersphere.project.controller; import io.metersphere.project.domain.ProjectRobot; import io.metersphere.project.request.ProjectRobotRequest; import io.metersphere.project.service.CleanupRobotResourceService; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import jakarta.annotation.Resource; import org.apache.commons.collections.CollectionUtils; import org.junit.jupiter.api.*; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java index bd88c1a191..cd128cf230 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java @@ -2,12 +2,12 @@ package io.metersphere.project.controller; import io.metersphere.project.domain.ProjectRobot; import io.metersphere.project.request.ProjectRobotRequest; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; -import io.metersphere.sdk.invoker.ProjectServiceInvoker; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; +import io.metersphere.system.invoker.ProjectServiceInvoker; import org.junit.jupiter.api.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java index d0bc77ea69..6ab64c62b3 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java @@ -1,6 +1,6 @@ package io.metersphere.project.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.TestMethodOrder; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java index 949b830c3a..cd8cb8fdcf 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java @@ -1,10 +1,8 @@ package io.metersphere.project.controller; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; import io.metersphere.sdk.constants.VariableTypeConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.domain.ProjectParameters; import io.metersphere.sdk.domain.ProjectParametersExample; import io.metersphere.sdk.dto.environment.GlobalParamsDTO; @@ -13,6 +11,8 @@ import io.metersphere.sdk.dto.environment.KeyValue; import io.metersphere.sdk.dto.environment.variables.CommonVariables; import io.metersphere.sdk.mapper.ProjectParametersMapper; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import jakarta.annotation.Resource; import org.junit.jupiter.api.*; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java index e5cb5780fe..532eb94335 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java @@ -5,12 +5,12 @@ import io.metersphere.project.domain.MessageTask; import io.metersphere.project.domain.MessageTaskExample; import io.metersphere.project.dto.MessageTaskDTO; import io.metersphere.project.mapper.MessageTaskMapper; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.dto.request.MessageTaskRequest; -import io.metersphere.sdk.notice.constants.NoticeConstants; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; +import io.metersphere.system.notice.constants.NoticeConstants; import jakarta.annotation.Resource; import org.apache.commons.collections.CollectionUtils; import org.junit.jupiter.api.*; @@ -216,7 +216,7 @@ public class NoticeMessageTaskControllerTests extends BaseTest { ResultHolder resultHolder = JSON.parseObject(contentAsString, ResultHolder.class); List messageTaskDTOList = JSON.parseArray(JSON.toJSONString(resultHolder.getData()), MessageTaskDTO.class); Assertions.assertTrue(CollectionUtils.isNotEmpty(messageTaskDTOList)); - Assertions.assertEquals(messageTaskDTOList.get(0).getTaskType(),NoticeConstants.TaskType.API_DEFINITION_TASK); + Assertions.assertEquals(messageTaskDTOList.get(0).getTaskType(), NoticeConstants.TaskType.API_DEFINITION_TASK); } @Test diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java index 0262dbc7c8..fdde6154fe 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java @@ -4,10 +4,10 @@ import io.metersphere.project.controller.param.ProjectApplicationDefinition; import io.metersphere.project.controller.param.ProjectApplicationRequestDefinition; import io.metersphere.project.domain.ProjectApplication; import io.metersphere.project.request.ProjectApplicationRequest; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.ProjectApplicationType; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.system.domain.Plugin; import io.metersphere.system.request.PluginUpdateRequest; import io.metersphere.system.service.PluginService; @@ -298,8 +298,8 @@ public class ProjectApplicationControllerTests extends BaseTest { @Order(19) public void testGetApi() throws Exception { List types = Arrays.asList(ProjectApplicationType.APPLICATION_API_URL_REPEATABLE.name(), ProjectApplicationType.APPLICATION_CLEAN_API_REPORT.name(), ProjectApplicationType.APPLICATION_SHARE_API_REPORT.name(), - ProjectApplicationType.APPLICATION_API_RESOURCE_POOL.name(), ProjectApplicationType.APPLICATION_API_SCRIPT_REVIEWER.name(), ProjectApplicationType.APPLICATION_API_ERROR_REPORT_RULE.name(), - ProjectApplicationType.APPLICATION_API_SYNC_CASE.name()); + ProjectApplicationType.APPLICATION_API_RESOURCE_POOL.name(), ProjectApplicationType.APPLICATION_API_SCRIPT_REVIEWER.name(), ProjectApplicationType.APPLICATION_API_ERROR_REPORT_RULE.name(), + ProjectApplicationType.APPLICATION_API_SYNC_CASE.name()); ProjectApplicationRequest request = this.getRequest(types); this.requestPostWithOkAndReturn(GET_API_URL, request); } @@ -323,7 +323,6 @@ public class ProjectApplicationControllerTests extends BaseTest { */ - /** * ==========用例管理 start========== */ @@ -377,13 +376,14 @@ public class ProjectApplicationControllerTests extends BaseTest { @Order(26) public void testGetPlatformInfo() throws Exception { plugin = addPlugin(); - MvcResult mvcResult = this.requestGetWithOkAndReturn(GET_PLATFORM_INFO_URL + "/"+plugin.getId()); + MvcResult mvcResult = this.requestGetWithOkAndReturn(GET_PLATFORM_INFO_URL + "/" + plugin.getId()); // 获取返回值 String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8); ResultHolder resultHolder = JSON.parseObject(returnData, ResultHolder.class); // 返回请求正常 Assertions.assertNotNull(resultHolder); } + /** * ==========用例管理 start========== */ diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java index 973e05a8ba..2b0d7e21b5 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java @@ -5,13 +5,13 @@ import io.metersphere.project.domain.Project; import io.metersphere.project.domain.ProjectExample; import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.project.request.ProjectSwitchRequest; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.dto.ProjectExtendDTO; import io.metersphere.sdk.dto.UserDTO; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import jakarta.annotation.Resource; import org.junit.jupiter.api.*; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java index 01634c14c1..b2e0e16c5b 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java @@ -1,9 +1,9 @@ package io.metersphere.project.controller; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.vo.OperationLogRequest; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.log.vo.OperationLogRequest; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -28,7 +28,7 @@ public class ProjectLogControllerTests extends BaseTest { @Order(1) public void testProjectUserList() throws Exception { String keyword = "o"; - this.requestGetWithOkAndReturn(PROJECT_USER_LIST+ "/default-organization-member-test" + "?keyword=" + keyword); + this.requestGetWithOkAndReturn(PROJECT_USER_LIST + "/default-organization-member-test" + "?keyword=" + keyword); } @Test diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java index c1438eef66..63a8cf8d96 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java @@ -5,13 +5,13 @@ import io.metersphere.project.request.ProjectMemberAddRequest; import io.metersphere.project.request.ProjectMemberBatchDeleteRequest; import io.metersphere.project.request.ProjectMemberEditRequest; import io.metersphere.project.request.ProjectMemberRequest; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; -import io.metersphere.sdk.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; +import io.metersphere.system.log.constants.OperationLogType; import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.*; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -46,7 +46,7 @@ public class ProjectMemberControllerTests extends BaseTest { @Test @Order(1) @Sql(scripts = {"/dml/init_project_member.sql"}, config = @SqlConfig(encoding = "utf-8", transactionMode = SqlConfig.TransactionMode.ISOLATED)) - public void testListMemberSuccess() throws Exception{ + public void testListMemberSuccess() throws Exception { ProjectMemberRequest request = new ProjectMemberRequest(); request.setProjectId("default-project-member-test"); request.setCurrent(1); diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java index b1e7596b9c..393fce26de 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java @@ -5,14 +5,12 @@ import io.metersphere.project.dto.ProjectRobotDTO; import io.metersphere.project.enums.ProjectRobotPlatform; import io.metersphere.project.enums.ProjectRobotType; import io.metersphere.project.request.ProjectRobotRequest; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; - import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; - +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.*; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -219,7 +217,7 @@ public class ProjectRobotControllerTests extends BaseTest { setCustomRobot("测试删除"); ProjectRobot projectRobot = getRobot("测试删除"); String projectRobotId = projectRobot.getId(); - mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_DELETE+"/"+ projectRobotId) + mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_DELETE + "/" + projectRobotId) .header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.CSRF_TOKEN, csrfToken)) .andExpect(status().isOk()) @@ -235,7 +233,7 @@ public class ProjectRobotControllerTests extends BaseTest { @Test @Order(17) void deleteRobotFail() throws Exception { - mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_DELETE+"/no_id") + mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_DELETE + "/no_id") .header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.CSRF_TOKEN, csrfToken)) .andExpect(status().is5xxServerError()) @@ -245,7 +243,7 @@ public class ProjectRobotControllerTests extends BaseTest { @Test @Order(18) void getDetailFail() throws Exception { - mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_DETAIL+"/no_id") + mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_DETAIL + "/no_id") .header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.CSRF_TOKEN, csrfToken)) .andExpect(status().is5xxServerError()) @@ -264,7 +262,7 @@ public class ProjectRobotControllerTests extends BaseTest { .andExpect(content().contentType(MediaType.APPLICATION_JSON)).andReturn(); ProjectRobot result = getResult(mvcResult); Assertions.assertTrue(StringUtils.equals(result.getName(), "测试获取详情")); - Assertions.assertTrue(StringUtils.equals(result.getWebhook(),"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=2b67ccf4-e0da-4cd6-ae74-8d42657865f8")); + Assertions.assertTrue(StringUtils.equals(result.getWebhook(), "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=2b67ccf4-e0da-4cd6-ae74-8d42657865f8")); } @Test @@ -275,7 +273,7 @@ public class ProjectRobotControllerTests extends BaseTest { request.setPageSize(5); Pager sortPageData = getPager(request); List projectRobots = JSON.parseArray(JSON.toJSONString(sortPageData.getList()), ProjectRobot.class); - Assertions.assertTrue(projectRobots.size()>0); + Assertions.assertTrue(projectRobots.size() > 0); } @Test @@ -314,7 +312,7 @@ public class ProjectRobotControllerTests extends BaseTest { setCustomRobot("测试Enable"); ProjectRobot projectRobot = getRobot("测试Enable"); String projectRobotId = projectRobot.getId(); - mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_ENABLE+"/"+ projectRobotId) + mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_ENABLE + "/" + projectRobotId) .header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.CSRF_TOKEN, csrfToken)) .andExpect(status().isOk()) @@ -326,7 +324,7 @@ public class ProjectRobotControllerTests extends BaseTest { @Test @Order(21) void setEnableFail() throws Exception { - mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_ENABLE+"/no_id") + mockMvc.perform(MockMvcRequestBuilders.get(ROBOT_ENABLE + "/no_id") .header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.CSRF_TOKEN, csrfToken)) .andExpect(status().is5xxServerError()) @@ -335,7 +333,8 @@ public class ProjectRobotControllerTests extends BaseTest { } private static ProjectRobot getResult(MvcResult mvcResult) throws UnsupportedEncodingException { - String contentAsString = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);; + String contentAsString = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8); + ; ResultHolder resultHolder = JSON.parseObject(contentAsString, ResultHolder.class); return JSON.parseObject(JSON.toJSONString(resultHolder.getData()), ProjectRobot.class); } diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java index 489e958f0e..f6afbfbcfe 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java @@ -5,17 +5,17 @@ import io.metersphere.project.request.ProjectUserRoleEditRequest; import io.metersphere.project.request.ProjectUserRoleMemberEditRequest; import io.metersphere.project.request.ProjectUserRoleMemberRequest; import io.metersphere.project.request.ProjectUserRoleRequest; -import io.metersphere.sdk.base.BaseTest; import io.metersphere.sdk.constants.InternalUserRole; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; -import io.metersphere.sdk.service.BaseUserRolePermissionService; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.system.domain.User; import io.metersphere.system.request.OrganizationUserRoleEditRequest; +import io.metersphere.system.service.BaseUserRolePermissionService; import jakarta.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -36,7 +36,7 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; +import static io.metersphere.system.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; import static io.metersphere.system.controller.result.SystemResultCode.NO_PROJECT_USER_ROLE_PERMISSION; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; diff --git a/backend/services/system-setting/pom.xml b/backend/services/system-setting/pom.xml index bba7b2bd85..f958a7809b 100644 --- a/backend/services/system-setting/pom.xml +++ b/backend/services/system-setting/pom.xml @@ -18,18 +18,21 @@ metersphere-sdk ${revision} - - io.metersphere - metersphere-sdk - ${revision} - tests - test-jar - test - + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + org.apache.maven.plugins maven-antrun-plugin diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/I18nConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/I18nConfig.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/I18nConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/I18nConfig.java index e098078a78..8640d6f20b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/I18nConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/I18nConfig.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.sdk.util.Translator; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ModuleOpenApiConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/ModuleOpenApiConfig.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ModuleOpenApiConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/ModuleOpenApiConfig.java index 7266f26d36..21eb82c54c 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ModuleOpenApiConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/ModuleOpenApiConfig.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import org.springdoc.core.models.GroupedOpenApi; import org.springframework.context.annotation.Bean; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/MybatisConfig.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/MybatisConfig.java index 5111fa9374..cc6e141ee7 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/MybatisConfig.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import com.fit2cloud.quartz.anno.QuartzDataSource; import com.github.pagehelper.PageInterceptor; import com.zaxxer.hikari.HikariDataSource; -import io.metersphere.sdk.interceptor.MybatisInterceptor; -import io.metersphere.sdk.interceptor.UserDesensitizationInterceptor; +import io.metersphere.system.interceptor.MybatisInterceptor; +import io.metersphere.system.interceptor.UserDesensitizationInterceptor; import io.metersphere.sdk.util.MybatisInterceptorConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/OpenApiConfig.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/OpenApiConfig.java index 313e119968..b5ad57b64b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/OpenApiConfig.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import io.metersphere.sdk.constants.SessionConstants; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/PermissionConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/PermissionConfig.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/PermissionConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/PermissionConfig.java index 5d257d13f9..b3e21ab0f4 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/PermissionConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/PermissionConfig.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.util.JSON; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/RsaConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/RsaConfig.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/RsaConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/RsaConfig.java index 48bf78fd33..36a717252d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/RsaConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/RsaConfig.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import io.metersphere.sdk.file.FileCenter; import io.metersphere.sdk.file.FileRepository; import io.metersphere.sdk.file.FileRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogModule; import io.metersphere.sdk.util.RsaKey; import io.metersphere.sdk.util.RsaUtil; import org.apache.commons.lang3.SerializationUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ScheduleConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/ScheduleConfig.java similarity index 82% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ScheduleConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/ScheduleConfig.java index 440eb9636b..8724e2423b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ScheduleConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/ScheduleConfig.java @@ -1,7 +1,7 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; -import io.metersphere.sdk.sechedule.BaseScheduleService; -import io.metersphere.sdk.sechedule.ScheduleManager; +import io.metersphere.system.sechedule.BaseScheduleService; +import io.metersphere.system.sechedule.ScheduleManager; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/SessionConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/SessionConfig.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/SessionConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/SessionConfig.java index f32717a0f2..56781d4476 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/SessionConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/SessionConfig.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import com.fit2cloud.quartz.anno.QuartzScheduled; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ShiroConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/ShiroConfig.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ShiroConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/ShiroConfig.java index 3518d93f63..02c48f4d63 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/ShiroConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/ShiroConfig.java @@ -1,11 +1,11 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; -import io.metersphere.sdk.security.ApiKeyFilter; -import io.metersphere.sdk.security.CsrfFilter; -import io.metersphere.sdk.security.MsPermissionAnnotationMethodInterceptor; -import io.metersphere.sdk.security.TotpFilter; -import io.metersphere.sdk.security.realm.LocalRealm; +import io.metersphere.system.security.ApiKeyFilter; +import io.metersphere.system.security.CsrfFilter; +import io.metersphere.system.security.MsPermissionAnnotationMethodInterceptor; +import io.metersphere.system.security.TotpFilter; +import io.metersphere.system.security.realm.LocalRealm; import io.metersphere.sdk.util.FilterChainUtils; import jakarta.servlet.DispatcherType; import jakarta.servlet.Filter; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/TOTPConfig.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/TOTPConfig.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/TOTPConfig.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/TOTPConfig.java index d43227e026..8e4a67331d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/TOTPConfig.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/TOTPConfig.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config; +package io.metersphere.system.config; import com.bastiaanjansen.otp.HMACAlgorithm; import com.bastiaanjansen.otp.TOTPGenerator; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/ApiTestInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/ApiTestInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java index 3e10f6ce02..cc26234051 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/ApiTestInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config.interceptor; +package io.metersphere.system.config.interceptor; import io.metersphere.api.domain.*; import io.metersphere.sdk.util.CompressUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/LoadTestInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/LoadTestInterceptor.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/LoadTestInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/LoadTestInterceptor.java index 81671d5a50..6d85086d33 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/LoadTestInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/LoadTestInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config.interceptor; +package io.metersphere.system.config.interceptor; import io.metersphere.load.domain.*; import io.metersphere.sdk.util.CompressUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/ProjectInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ProjectInterceptor.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/ProjectInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ProjectInterceptor.java index 4b7b17f9c8..f9b09c46a5 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/ProjectInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ProjectInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config.interceptor; +package io.metersphere.system.config.interceptor; import io.metersphere.project.domain.CustomFunctionBlob; import io.metersphere.project.domain.FileMetadataBlob; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/SdkInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/SdkInterceptor.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/SdkInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/SdkInterceptor.java index 077516abc1..14e3b63998 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/SdkInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/SdkInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config.interceptor; +package io.metersphere.system.config.interceptor; import io.metersphere.sdk.domain.OperationLogBlob; import io.metersphere.sdk.util.CompressUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/SystemInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/SystemInterceptor.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/SystemInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/SystemInterceptor.java index b08888078f..436ba1174c 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/SystemInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/SystemInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config.interceptor; +package io.metersphere.system.config.interceptor; import io.metersphere.sdk.util.CompressUtils; import io.metersphere.sdk.util.MybatisInterceptorConfig; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/UiInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/UiInterceptor.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/UiInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/UiInterceptor.java index d61dbb3b1d..aa00c77bbf 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/interceptor/UiInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/UiInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.config.interceptor; +package io.metersphere.system.config.interceptor; import io.metersphere.load.domain.*; import io.metersphere.sdk.util.CompressUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/AuthSourceController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/AuthSourceController.java index 357892f142..b4cbf605fe 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/AuthSourceController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/AuthSourceController.java @@ -4,11 +4,11 @@ import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.BasePageRequest; -import io.metersphere.sdk.ldap.service.LdapService; -import io.metersphere.sdk.ldap.vo.LdapLoginRequest; -import io.metersphere.sdk.ldap.vo.LdapRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.ldap.service.LdapService; +import io.metersphere.system.ldap.vo.LdapLoginRequest; +import io.metersphere.system.ldap.vo.LdapRequest; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.system.domain.AuthSource; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleController.java index 40f8862813..8f1951d46c 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleController.java @@ -4,8 +4,8 @@ import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.dto.request.UserRoleUpdateRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.UserRole; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleRelationController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleRelationController.java index 49fa038ac2..f156572a3d 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleRelationController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/GlobalUserRoleRelationController.java @@ -6,8 +6,8 @@ import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.UserExcludeOptionDTO; import io.metersphere.sdk.dto.UserRoleRelationUserDTO; import io.metersphere.sdk.dto.request.GlobalUserRoleRelationUpdateRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LicenseController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/LicenseController.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LicenseController.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/LicenseController.java index 5df57db7ac..ac5f9d8d98 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LicenseController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/LicenseController.java @@ -1,8 +1,8 @@ -package io.metersphere.sdk.controller; +package io.metersphere.system.controller; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.LicenseDTO; -import io.metersphere.sdk.service.LicenseService; +import io.metersphere.system.service.LicenseService; import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.sdk.util.SessionUtils; import io.swagger.v3.oas.annotations.Operation; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/LoginController.java similarity index 92% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/LoginController.java index 28142c12a4..dd21e85ef9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/LoginController.java @@ -1,16 +1,16 @@ -package io.metersphere.sdk.controller; +package io.metersphere.system.controller; import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.constants.UserSource; -import io.metersphere.sdk.controller.handler.ResultHolder; -import io.metersphere.sdk.controller.handler.result.MsHttpResultCode; +import io.metersphere.system.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.result.MsHttpResultCode; import io.metersphere.sdk.dto.LoginRequest; import io.metersphere.sdk.dto.SessionUser; import io.metersphere.sdk.dto.UserDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BaseUserService; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.BaseUserService; import io.metersphere.sdk.util.RsaKey; import io.metersphere.sdk.util.RsaUtil; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/NotificationController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/NotificationController.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/NotificationController.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/NotificationController.java index 56c59ce9cd..48115b9469 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/NotificationController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/NotificationController.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.controller; +package io.metersphere.system.controller; import com.github.pagehelper.Page; @@ -6,7 +6,7 @@ import com.github.pagehelper.PageHelper; import io.metersphere.project.domain.Notification; import io.metersphere.sdk.dto.request.NotificationRequest; -import io.metersphere.sdk.service.NotificationService; +import io.metersphere.system.service.NotificationService; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OperationLogController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OperationLogController.java index 9d60362a81..da6aae5fb6 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OperationLogController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OperationLogController.java @@ -4,9 +4,9 @@ package io.metersphere.system.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.log.vo.OperationLogRequest; -import io.metersphere.sdk.log.vo.OperationLogResponse; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.log.vo.OperationLogRequest; +import io.metersphere.system.log.vo.OperationLogResponse; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.system.domain.User; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationController.java index f7edd1d36f..9f0d3f009c 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationController.java @@ -4,8 +4,8 @@ import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.OptionDTO; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationCustomFieldController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationCustomFieldController.java index 9e86adc9bf..2ad613538e 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationCustomFieldController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationCustomFieldController.java @@ -4,8 +4,8 @@ package io.metersphere.system.controller; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.CustomFieldDTO; import io.metersphere.sdk.dto.request.CustomFieldUpdateRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.CustomField; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationLogController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationLogController.java index bb9589d5f8..b37001ece9 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationLogController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationLogController.java @@ -4,9 +4,9 @@ package io.metersphere.system.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.log.vo.OperationLogRequest; -import io.metersphere.sdk.log.vo.OperationLogResponse; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.log.vo.OperationLogRequest; +import io.metersphere.system.log.vo.OperationLogResponse; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java index 7446ed200e..8bb3763b9e 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java @@ -6,8 +6,8 @@ import com.github.pagehelper.PageHelper; import io.metersphere.project.domain.Project; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.*; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationTemplateController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationTemplateController.java index 74b11089ba..ed26895040 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationTemplateController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationTemplateController.java @@ -3,8 +3,8 @@ package io.metersphere.system.controller; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.TemplateDTO; import io.metersphere.sdk.dto.request.TemplateUpdateRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.Template; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationUserRoleController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationUserRoleController.java index 8e4f5dd2b9..7508bef783 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationUserRoleController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationUserRoleController.java @@ -5,8 +5,8 @@ import com.github.pagehelper.PageHelper; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/PluginController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/PluginController.java index cebd976eb0..e3bfe3abb8 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/PluginController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/PluginController.java @@ -1,8 +1,8 @@ package io.metersphere.system.controller; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.Plugin; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/ServiceIntegrationController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/ServiceIntegrationController.java index d89e41e030..daa6a4c17a 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/ServiceIntegrationController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/ServiceIntegrationController.java @@ -1,8 +1,8 @@ package io.metersphere.system.controller; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.system.domain.ServiceIntegration; import io.metersphere.system.dto.ServiceIntegrationDTO; import io.metersphere.system.request.ServiceIntegrationUpdateRequest; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemParameterController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemParameterController.java index c72e3e962c..53407281c4 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemParameterController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemParameterController.java @@ -4,9 +4,9 @@ package io.metersphere.system.controller; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.BaseSystemConfigDTO; import io.metersphere.sdk.dto.EMailInfoDto; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.SystemParameterService; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.SystemParameterService; import io.metersphere.system.domain.SystemParameter; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java index 7a839b4b5f..47c0bcd335 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java @@ -6,8 +6,8 @@ import com.github.pagehelper.PageHelper; import io.metersphere.project.domain.Project; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.*; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java index dae5d49390..83642ab223 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/TestResourcePoolController.java @@ -7,9 +7,9 @@ import io.metersphere.sdk.dto.QueryResourcePoolRequest; import io.metersphere.sdk.dto.TestResourcePoolDTO; import io.metersphere.sdk.dto.TestResourcePoolRequest; import io.metersphere.sdk.dto.TestResourcePoolReturnDTO; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.TestResourcePoolService; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.TestResourcePoolService; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java index 7042acf0ac..3b8eb41e35 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java @@ -7,8 +7,8 @@ import io.metersphere.project.domain.Project; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.UserSource; import io.metersphere.sdk.dto.*; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/environment/EnvironmentController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/environment/EnvironmentController.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/environment/EnvironmentController.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/environment/EnvironmentController.java index be9a5768c2..344cb29e19 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/environment/EnvironmentController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/environment/EnvironmentController.java @@ -1,11 +1,11 @@ -package io.metersphere.sdk.controller.environment; +package io.metersphere.system.controller.environment; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.domain.Environment; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.dto.environment.EnvironmentConfigRequest; import io.metersphere.sdk.dto.environment.dataSource.DataSource; -import io.metersphere.sdk.service.environment.EnvironmentService; +import io.metersphere.system.service.environment.EnvironmentService; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.validation.groups.Created; import io.swagger.v3.oas.annotations.Operation; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/environment/GlobalParamsController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/environment/GlobalParamsController.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/environment/GlobalParamsController.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/environment/GlobalParamsController.java index 5cdf19a3a8..9e74451fd2 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/environment/GlobalParamsController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/environment/GlobalParamsController.java @@ -1,8 +1,8 @@ -package io.metersphere.sdk.controller.environment; +package io.metersphere.system.controller.environment; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.environment.GlobalParamsRequest; -import io.metersphere.sdk.service.environment.GlobalParamsService; +import io.metersphere.system.service.environment.GlobalParamsService; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/RestControllerExceptionHandler.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/RestControllerExceptionHandler.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java index a76820e9bc..ce8e463ca7 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/RestControllerExceptionHandler.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/RestControllerExceptionHandler.java @@ -1,9 +1,9 @@ -package io.metersphere.sdk.controller.handler; +package io.metersphere.system.controller.handler; -import io.metersphere.sdk.controller.handler.result.IResultCode; -import io.metersphere.sdk.controller.handler.result.MsHttpResultCode; +import io.metersphere.sdk.exception.IResultCode; +import io.metersphere.system.controller.handler.result.MsHttpResultCode; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.sdk.util.Translator; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/ResultHolder.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/ResultHolder.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/ResultHolder.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/ResultHolder.java index 865dcb324f..72fad8e620 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/ResultHolder.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/ResultHolder.java @@ -1,6 +1,6 @@ -package io.metersphere.sdk.controller.handler; +package io.metersphere.system.controller.handler; -import io.metersphere.sdk.controller.handler.result.MsHttpResultCode; +import io.metersphere.system.controller.handler.result.MsHttpResultCode; import lombok.Data; @Data diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/ResultResponseBodyAdvice.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/ResultResponseBodyAdvice.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/ResultResponseBodyAdvice.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/ResultResponseBodyAdvice.java index 42bf19a958..782ad87c3f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/ResultResponseBodyAdvice.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/ResultResponseBodyAdvice.java @@ -1,6 +1,6 @@ -package io.metersphere.sdk.controller.handler; +package io.metersphere.system.controller.handler; -import io.metersphere.sdk.controller.handler.annotation.NoResultHolder; +import io.metersphere.system.controller.handler.annotation.NoResultHolder; import io.metersphere.sdk.util.JSON; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/annotation/NoResultHolder.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/annotation/NoResultHolder.java similarity index 72% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/annotation/NoResultHolder.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/annotation/NoResultHolder.java index 41db712e98..fee9b451a9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/annotation/NoResultHolder.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/annotation/NoResultHolder.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.controller.handler.annotation; +package io.metersphere.system.controller.handler.annotation; import java.lang.annotation.*; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/CommonResultCode.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/result/CommonResultCode.java similarity index 92% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/CommonResultCode.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/result/CommonResultCode.java index 46ca5d2bf2..6139b0ee0e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/CommonResultCode.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/result/CommonResultCode.java @@ -1,4 +1,6 @@ -package io.metersphere.sdk.controller.handler.result; +package io.metersphere.system.controller.handler.result; + +import io.metersphere.sdk.exception.IResultCode; /** * 通用功能状态码 diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/MsHttpResultCode.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/result/MsHttpResultCode.java similarity index 88% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/MsHttpResultCode.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/result/MsHttpResultCode.java index ae74d774b7..af7cce57e6 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/handler/result/MsHttpResultCode.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/handler/result/MsHttpResultCode.java @@ -1,4 +1,6 @@ -package io.metersphere.sdk.controller.handler.result; +package io.metersphere.system.controller.handler.result; + +import io.metersphere.sdk.exception.IResultCode; /** * 具有 Http 含义的状态码 diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/result/SystemResultCode.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/result/SystemResultCode.java index 220fbc7a75..aace8805c8 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/result/SystemResultCode.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/result/SystemResultCode.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller.result; -import io.metersphere.sdk.controller.handler.result.IResultCode; +import io.metersphere.sdk.exception.IResultCode; /** * @author jianxing diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/interceptor/MybatisInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/MybatisInterceptor.java similarity index 99% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/interceptor/MybatisInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/MybatisInterceptor.java index fc01c7b8b4..d88fe7d647 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/interceptor/MybatisInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/MybatisInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.interceptor; +package io.metersphere.system.interceptor; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.MybatisInterceptorConfig; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/interceptor/UserDesensitizationInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/UserDesensitizationInterceptor.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/interceptor/UserDesensitizationInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/UserDesensitizationInterceptor.java index 747890e891..1f42d0bb72 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/interceptor/UserDesensitizationInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/UserDesensitizationInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.interceptor; +package io.metersphere.system.interceptor; import io.metersphere.system.domain.User; import org.apache.ibatis.cache.CacheKey; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/invoker/ProjectServiceInvoker.java b/backend/services/system-setting/src/main/java/io/metersphere/system/invoker/ProjectServiceInvoker.java similarity index 86% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/invoker/ProjectServiceInvoker.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/invoker/ProjectServiceInvoker.java index e5cca59b6f..abae89c9b3 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/invoker/ProjectServiceInvoker.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/invoker/ProjectServiceInvoker.java @@ -1,7 +1,7 @@ -package io.metersphere.sdk.invoker; +package io.metersphere.system.invoker; -import io.metersphere.sdk.service.CleanupProjectResourceService; -import io.metersphere.sdk.service.CreateProjectResourceService; +import io.metersphere.system.service.CleanupProjectResourceService; +import io.metersphere.system.service.CreateProjectResourceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/CustomSSLSocketFactory.java b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/CustomSSLSocketFactory.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/CustomSSLSocketFactory.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/ldap/CustomSSLSocketFactory.java index fdcc449bcf..8ffe847218 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/CustomSSLSocketFactory.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/CustomSSLSocketFactory.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.ldap; +package io.metersphere.system.ldap; import javax.net.SocketFactory; import javax.net.ssl.SSLContext; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/SSLLdapContextSource.java b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/SSLLdapContextSource.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/SSLLdapContextSource.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/ldap/SSLLdapContextSource.java index 3aaed16068..d141df15f1 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/SSLLdapContextSource.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/SSLLdapContextSource.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.ldap; +package io.metersphere.system.ldap; import org.springframework.ldap.core.support.LdapContextSource; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/service/LdapService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/service/LdapService.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/service/LdapService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/ldap/service/LdapService.java index e5b703f7aa..af7dfef57e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/service/LdapService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/service/LdapService.java @@ -1,9 +1,9 @@ -package io.metersphere.sdk.ldap.service; +package io.metersphere.system.ldap.service; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.ldap.SSLLdapContextSource; -import io.metersphere.sdk.ldap.vo.LdapLoginRequest; -import io.metersphere.sdk.ldap.vo.LdapRequest; +import io.metersphere.system.ldap.SSLLdapContextSource; +import io.metersphere.system.ldap.vo.LdapLoginRequest; +import io.metersphere.system.ldap.vo.LdapRequest; import io.metersphere.sdk.util.*; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.realm.ldap.LdapUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/vo/LdapLoginRequest.java b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/vo/LdapLoginRequest.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/vo/LdapLoginRequest.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/ldap/vo/LdapLoginRequest.java index d6bbf991eb..9383028abf 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/vo/LdapLoginRequest.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/vo/LdapLoginRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.ldap.vo; +package io.metersphere.system.ldap.vo; import io.metersphere.sdk.dto.LoginRequest; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/vo/LdapRequest.java b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/vo/LdapRequest.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/vo/LdapRequest.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/ldap/vo/LdapRequest.java index 05df020686..d142687d7e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/ldap/vo/LdapRequest.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/ldap/vo/LdapRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.ldap.vo; +package io.metersphere.system.ldap.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/listener/PluginListener.java b/backend/services/system-setting/src/main/java/io/metersphere/system/listener/PluginListener.java index 2f3ba8c294..95fc56d003 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/listener/PluginListener.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/listener/PluginListener.java @@ -3,7 +3,7 @@ package io.metersphere.system.listener; import io.metersphere.sdk.constants.KafkaPluginTopicType; import io.metersphere.sdk.constants.KafkaTopicConstants; -import io.metersphere.sdk.service.PluginLoadService; +import io.metersphere.system.service.PluginLoadService; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.dto.PluginNotifiedDTO; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/annotation/Log.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/annotation/Log.java similarity index 75% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/annotation/Log.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/annotation/Log.java index 17e2d05680..c4ee9d352b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/annotation/Log.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/annotation/Log.java @@ -1,7 +1,6 @@ -package io.metersphere.sdk.log.annotation; +package io.metersphere.system.log.annotation; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogType; import java.lang.annotation.*; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/aspect/OperationLogAspect.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/aspect/OperationLogAspect.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java index 29aeeb5ceb..037e00864f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/aspect/OperationLogAspect.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/aspect/OperationLogAspect.java @@ -1,9 +1,9 @@ -package io.metersphere.sdk.log.aspect; +package io.metersphere.system.log.aspect; import io.metersphere.sdk.dto.LogDTO; -import io.metersphere.sdk.log.annotation.Log; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; +import io.metersphere.system.log.annotation.Log; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; import io.metersphere.sdk.util.SessionUtils; @@ -71,7 +71,7 @@ public class OperationLogAspect { /** * 定义切点 @Pointcut 在注解的位置切入代码 */ - @Pointcut("@annotation(io.metersphere.sdk.log.annotation.Log)") + @Pointcut("@annotation(io.metersphere.system.log.annotation.Log)") public void logPointCut() { } diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java similarity index 99% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java index d38974c4c9..87f583d33c 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogModule.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.log.constants; +package io.metersphere.system.log.constants; public class OperationLogModule { public static final String UNKNOWN_MODULE = "UNKNOWN_MODULE"; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogType.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogType.java similarity index 87% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogType.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogType.java index 8b969aec60..5773501337 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/constants/OperationLogType.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogType.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.log.constants; +package io.metersphere.system.log.constants; public enum OperationLogType { ADD, diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/service/OperationLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/service/OperationLogService.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/service/OperationLogService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/service/OperationLogService.java index bd969c1db2..a8168bbbbc 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/service/OperationLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/service/OperationLogService.java @@ -1,15 +1,19 @@ -package io.metersphere.sdk.log.service; +package io.metersphere.system.log.service; import io.metersphere.project.domain.Project; import io.metersphere.sdk.domain.OperationLogBlob; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.vo.OperationLogRequest; -import io.metersphere.sdk.log.vo.OperationLogResponse; +import io.metersphere.system.log.vo.OperationLogRequest; +import io.metersphere.system.log.vo.OperationLogResponse; import io.metersphere.sdk.mapper.*; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.Organization; +import io.metersphere.system.mapper.BaseOperationLogMapper; +import io.metersphere.system.mapper.BaseOrganizationMapper; +import io.metersphere.system.mapper.BaseProjectMapper; +import io.metersphere.system.mapper.BaseUserMapper; import jakarta.annotation.Resource; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/vo/OperationLogRequest.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/vo/OperationLogRequest.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/vo/OperationLogRequest.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/vo/OperationLogRequest.java index ab319800c6..149f26509a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/vo/OperationLogRequest.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/vo/OperationLogRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.log.vo; +package io.metersphere.system.log.vo; import io.metersphere.sdk.constants.UserRoleType; import io.metersphere.sdk.dto.BasePageRequest; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/vo/OperationLogResponse.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/vo/OperationLogResponse.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/log/vo/OperationLogResponse.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/log/vo/OperationLogResponse.java index a6f3968cea..acd4385250 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/log/vo/OperationLogResponse.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/vo/OperationLogResponse.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.log.vo; +package io.metersphere.system.log.vo; import lombok.Data; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.java b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.java new file mode 100644 index 0000000000..aa034c5ffd --- /dev/null +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.java @@ -0,0 +1,4 @@ +package io.metersphere.system.mapper; + +public interface BaseMapper { +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseMapper.xml rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml index 84743ff960..b571dedb9d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseNotificationMapper.java b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseNotificationMapper.java similarity index 91% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseNotificationMapper.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseNotificationMapper.java index 21c80ad02f..da0cf5172a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseNotificationMapper.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseNotificationMapper.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.mapper; +package io.metersphere.system.mapper; import io.metersphere.project.domain.Notification; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseNotificationMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseNotificationMapper.xml similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseNotificationMapper.xml rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseNotificationMapper.xml index 95e89c1c7c..bdb626b770 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseNotificationMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseNotificationMapper.xml @@ -1,6 +1,6 @@ - + + SELECT id, name diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseProjectMapper.java b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseProjectMapper.java similarity index 84% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseProjectMapper.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseProjectMapper.java index 4809bb6f3d..bbae46c72f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseProjectMapper.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseProjectMapper.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.mapper; +package io.metersphere.system.mapper; import io.metersphere.project.domain.Project; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseProjectMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseProjectMapper.xml similarity index 88% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseProjectMapper.xml rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseProjectMapper.xml index d7fc7865fe..502e102fb0 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseProjectMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseProjectMapper.xml @@ -1,6 +1,6 @@ - + select user_id, source_id, role_id from user_role_relation diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseWorkerNodeMapper.java b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseWorkerNodeMapper.java similarity index 75% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseWorkerNodeMapper.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseWorkerNodeMapper.java index 0ac4cdb0c3..5fc5410f88 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseWorkerNodeMapper.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseWorkerNodeMapper.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.mapper; +package io.metersphere.system.mapper; import io.metersphere.sdk.domain.WorkerNode; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseWorkerNodeMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseWorkerNodeMapper.xml similarity index 87% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseWorkerNodeMapper.xml rename to backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseWorkerNodeMapper.xml index 7461a19492..db3e48b1a0 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseWorkerNodeMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseWorkerNodeMapper.xml @@ -1,6 +1,6 @@ - + insert into worker_node (host_name, port, type, launch_date, modified, created) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtOrganizationMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtOrganizationMapper.xml index 4de1e10e1e..452b8e7656 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtOrganizationMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtOrganizationMapper.xml @@ -153,7 +153,7 @@ and o.create_user in - + @@ -165,7 +165,7 @@ and o.create_user - + diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtSystemProjectMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtSystemProjectMapper.xml index 60a760440b..f06ac94cb0 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtSystemProjectMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtSystemProjectMapper.xml @@ -95,7 +95,7 @@ and p.create_user in - + @@ -107,7 +107,7 @@ and p.create_user - + diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/MessageDetail.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/MessageDetail.java similarity index 92% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/MessageDetail.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/MessageDetail.java index 4213c4c8ba..8e40d00ca7 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/MessageDetail.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/MessageDetail.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice; +package io.metersphere.system.notice; import lombok.Data; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/NoticeModel.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/NoticeModel.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/NoticeModel.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/NoticeModel.java index ac3d368155..288e94c427 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/NoticeModel.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/NoticeModel.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice; +package io.metersphere.system.notice; import lombok.Builder; import lombok.Data; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/Receiver.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/Receiver.java similarity index 84% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/Receiver.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/Receiver.java index d8a0044674..830617ff00 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/Receiver.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/Receiver.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice; +package io.metersphere.system.notice; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/annotation/SendNotice.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/annotation/SendNotice.java similarity index 92% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/annotation/SendNotice.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/annotation/SendNotice.java index 6980fd3fc9..2a494d0359 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/annotation/SendNotice.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/annotation/SendNotice.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.annotation; +package io.metersphere.system.notice.annotation; import java.lang.annotation.*; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/constants/NoticeConstants.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/constants/NoticeConstants.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java index 51838d7c43..2a95951446 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/constants/NoticeConstants.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.constants; +package io.metersphere.system.notice.constants; public interface NoticeConstants { diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/constants/NotificationConstants.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NotificationConstants.java similarity index 76% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/constants/NotificationConstants.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NotificationConstants.java index d617dc4b52..2195e3e257 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/constants/NotificationConstants.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NotificationConstants.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.constants; +package io.metersphere.system.notice.constants; public class NotificationConstants { diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/AbstractNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/AbstractNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java index 8e86c862e5..b7f9b39b6d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/AbstractNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AbstractNoticeSender.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.sender; +package io.metersphere.system.notice.sender; import io.metersphere.api.domain.*; @@ -13,11 +13,11 @@ import io.metersphere.load.mapper.LoadTestFollowerMapper; import io.metersphere.plan.domain.TestPlanFollower; import io.metersphere.plan.domain.TestPlanFollowerExample; import io.metersphere.plan.mapper.TestPlanFollowerMapper; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.Receiver; -import io.metersphere.sdk.notice.constants.NoticeConstants; -import io.metersphere.sdk.notice.constants.NotificationConstants; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.Receiver; +import io.metersphere.system.notice.constants.NoticeConstants; +import io.metersphere.system.notice.constants.NotificationConstants; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.domain.CustomField; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/AfterReturningNoticeSendService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AfterReturningNoticeSendService.java similarity index 91% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/AfterReturningNoticeSendService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AfterReturningNoticeSendService.java index cec9ec2dfb..6f94398f97 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/AfterReturningNoticeSendService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/AfterReturningNoticeSendService.java @@ -1,13 +1,13 @@ -package io.metersphere.sdk.notice.sender; +package io.metersphere.system.notice.sender; import io.metersphere.sdk.dto.BaseSystemConfigDTO; import io.metersphere.sdk.dto.SessionUser; -import io.metersphere.sdk.notice.annotation.SendNotice; -import io.metersphere.sdk.notice.constants.NoticeConstants; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.service.NoticeSendService; -import io.metersphere.sdk.service.SystemParameterService; +import io.metersphere.system.notice.annotation.SendNotice; +import io.metersphere.system.notice.constants.NoticeConstants; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.service.NoticeSendService; +import io.metersphere.system.service.SystemParameterService; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.annotation.Async; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/NoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/NoticeSender.java new file mode 100644 index 0000000000..c19643a33d --- /dev/null +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/NoticeSender.java @@ -0,0 +1,9 @@ +package io.metersphere.system.notice.sender; + + +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; + +public interface NoticeSender { + void send(MessageDetail messageDetail, NoticeModel noticeModel); +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/SendNoticeAspect.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/SendNoticeAspect.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java index 4762d8f45f..9e276ad3bb 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/SendNoticeAspect.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/SendNoticeAspect.java @@ -1,8 +1,8 @@ -package io.metersphere.sdk.notice.sender; +package io.metersphere.system.notice.sender; import io.metersphere.sdk.dto.SessionUser; -import io.metersphere.sdk.notice.annotation.SendNotice; +import io.metersphere.system.notice.annotation.SendNotice; import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; @@ -40,7 +40,7 @@ public class SendNoticeAspect { private StandardReflectionParameterNameDiscoverer discoverer = new StandardReflectionParameterNameDiscoverer(); private ThreadLocal source = new ThreadLocal<>(); - @Pointcut("@annotation(io.metersphere.sdk.notice.annotation.SendNotice)") + @Pointcut("@annotation(io.metersphere.system.notice.annotation.SendNotice)") public void pointcut() { } diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/DingCustomNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/DingCustomNoticeSender.java similarity index 79% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/DingCustomNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/DingCustomNoticeSender.java index f280b7c45b..23b9eb39e1 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/DingCustomNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/DingCustomNoticeSender.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.Receiver; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; -import io.metersphere.sdk.notice.utils.DingClient; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.Receiver; +import io.metersphere.system.notice.sender.AbstractNoticeSender; +import io.metersphere.system.notice.utils.DingClient; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.domain.User; import org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/DingEnterPriseNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/DingEnterPriseNoticeSender.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/DingEnterPriseNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/DingEnterPriseNoticeSender.java index e2d2ab1984..449b073c8b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/DingEnterPriseNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/DingEnterPriseNoticeSender.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponse; import com.aliyun.dingtalkrobot_1_0.Client; @@ -8,9 +8,9 @@ import com.aliyun.tea.TeaException; import com.aliyun.teaopenapi.models.Config; import com.aliyun.teautil.Common; import com.aliyun.teautil.models.RuntimeOptions; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.sender.AbstractNoticeSender; import io.metersphere.sdk.util.LogUtils; import org.springframework.stereotype.Component; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/InSiteNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/InSiteNoticeSender.java similarity index 85% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/InSiteNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/InSiteNoticeSender.java index 2d92526707..6201a40c9a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/InSiteNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/InSiteNoticeSender.java @@ -1,13 +1,13 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; import io.metersphere.project.domain.Notification; -import io.metersphere.sdk.notice.constants.NotificationConstants; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.Receiver; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; -import io.metersphere.sdk.service.NotificationService; +import io.metersphere.system.notice.constants.NotificationConstants; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.Receiver; +import io.metersphere.system.notice.sender.AbstractNoticeSender; +import io.metersphere.system.service.NotificationService; import io.metersphere.sdk.util.LogUtils; import jakarta.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/LarkNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/LarkNoticeSender.java similarity index 79% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/LarkNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/LarkNoticeSender.java index 3905aa9a1f..559ded82d1 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/LarkNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/LarkNoticeSender.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; -import io.metersphere.sdk.notice.Receiver; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; -import io.metersphere.sdk.notice.utils.LarkClient; +import io.metersphere.system.notice.Receiver; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.sender.AbstractNoticeSender; +import io.metersphere.system.notice.utils.LarkClient; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.domain.User; import org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/MailNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/MailNoticeSender.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/MailNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/MailNoticeSender.java index 6e2ab319e6..5a0e690276 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/MailNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/MailNoticeSender.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; import io.metersphere.sdk.constants.ParamConstants; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.sender.AbstractNoticeSender; import io.metersphere.sdk.util.EncryptUtils; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.domain.SystemParameter; @@ -19,7 +19,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.MimeMessageHelper; -import io.metersphere.sdk.notice.Receiver; +import io.metersphere.system.notice.Receiver; import org.springframework.stereotype.Component; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/WeComNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/WeComNoticeSender.java similarity index 78% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/WeComNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/WeComNoticeSender.java index 208c982cd9..4679f82ab5 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/WeComNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/WeComNoticeSender.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.Receiver; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; -import io.metersphere.sdk.notice.utils.WeComClient; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.Receiver; +import io.metersphere.system.notice.sender.AbstractNoticeSender; +import io.metersphere.system.notice.utils.WeComClient; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.domain.User; import org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/WebhookNoticeSender.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/WebhookNoticeSender.java similarity index 89% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/WebhookNoticeSender.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/WebhookNoticeSender.java index 2c4a518089..fee9827934 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/sender/impl/WebhookNoticeSender.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/sender/impl/WebhookNoticeSender.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.notice.sender.impl; +package io.metersphere.system.notice.sender.impl; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.NoticeModel; -import io.metersphere.sdk.notice.Receiver; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.NoticeModel; +import io.metersphere.system.notice.Receiver; +import io.metersphere.system.notice.sender.AbstractNoticeSender; import io.metersphere.sdk.util.LogUtils; import org.apache.commons.collections4.CollectionUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/ClientPost.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/ClientPost.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/ClientPost.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/ClientPost.java index 61a8052207..06eac0434f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/ClientPost.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/ClientPost.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.utils; +package io.metersphere.system.notice.utils; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/DingClient.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/DingClient.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/DingClient.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/DingClient.java index 4b0a972457..1024220242 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/DingClient.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/DingClient.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.utils; +package io.metersphere.system.notice.utils; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.HttpClients; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/LarkClient.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/LarkClient.java similarity index 92% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/LarkClient.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/LarkClient.java index b99918050c..66c1f4456b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/LarkClient.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/LarkClient.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.utils; +package io.metersphere.system.notice.utils; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.HttpClients; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/WeComClient.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/WeComClient.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/WeComClient.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/WeComClient.java index a30e60298c..0c171ec479 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/notice/utils/WeComClient.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/utils/WeComClient.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.notice.utils; +package io.metersphere.system.notice.utils; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.HttpClients; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverPluginDescriptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverPluginDescriptor.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverPluginDescriptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverPluginDescriptor.java index 976b12b8c1..49587c954a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverPluginDescriptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverPluginDescriptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.plugin; +package io.metersphere.system.plugin; import org.pf4j.DefaultPluginDescriptor; import org.pf4j.PluginDescriptor; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverPluginDescriptorFinder.java b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverPluginDescriptorFinder.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverPluginDescriptorFinder.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverPluginDescriptorFinder.java index 1e1ba1502c..6173087a8b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverPluginDescriptorFinder.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverPluginDescriptorFinder.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.plugin; +package io.metersphere.system.plugin; import org.apache.commons.io.IOUtils; import org.pf4j.ManifestPluginDescriptorFinder; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverServiceProviderExtensionFinder.java b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverServiceProviderExtensionFinder.java similarity index 99% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverServiceProviderExtensionFinder.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverServiceProviderExtensionFinder.java index 37328a2ed8..14b2731abe 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/JdbcDriverServiceProviderExtensionFinder.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/JdbcDriverServiceProviderExtensionFinder.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.plugin; +package io.metersphere.system.plugin; import io.metersphere.sdk.util.LogUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/MsPluginManager.java b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/MsPluginManager.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/MsPluginManager.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/plugin/MsPluginManager.java index f266068e3c..54ff1895c7 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/plugin/MsPluginManager.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/plugin/MsPluginManager.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.plugin; +package io.metersphere.system.plugin; import org.pf4j.*; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/BaseScheduleJob.java b/backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/BaseScheduleJob.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/BaseScheduleJob.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/BaseScheduleJob.java index db38b52bc9..9f5bd77af9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/BaseScheduleJob.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/BaseScheduleJob.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.sechedule; +package io.metersphere.system.sechedule; import io.metersphere.sdk.util.LogUtils; import org.quartz.*; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/BaseScheduleService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/BaseScheduleService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/BaseScheduleService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/BaseScheduleService.java index fcb40b4099..a17306a8f7 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/BaseScheduleService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/BaseScheduleService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.sechedule; +package io.metersphere.system.sechedule; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.util.SessionUtils; @@ -15,7 +15,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Optional; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; @Transactional(rollbackFor = Exception.class) public class BaseScheduleService { diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/ScheduleManager.java b/backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/ScheduleManager.java similarity index 99% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/ScheduleManager.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/ScheduleManager.java index b99b766f0c..a325d1d6c5 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/sechedule/ScheduleManager.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/sechedule/ScheduleManager.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.sechedule; +package io.metersphere.system.sechedule; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.util.LogUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/ApiKeyFilter.java b/backend/services/system-setting/src/main/java/io/metersphere/system/security/ApiKeyFilter.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/security/ApiKeyFilter.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/security/ApiKeyFilter.java index 9470733397..a06f6e82a3 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/ApiKeyFilter.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/security/ApiKeyFilter.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.security; +package io.metersphere.system.security; import io.metersphere.sdk.constants.SessionConstants; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/ApiKeyHandler.java b/backend/services/system-setting/src/main/java/io/metersphere/system/security/ApiKeyHandler.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/security/ApiKeyHandler.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/security/ApiKeyHandler.java index ea756a6d6d..474457823d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/ApiKeyHandler.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/security/ApiKeyHandler.java @@ -1,9 +1,9 @@ -package io.metersphere.sdk.security; +package io.metersphere.system.security; -import io.metersphere.sdk.service.UserKeyService; import io.metersphere.sdk.util.CodingUtil; import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.system.domain.UserKey; +import io.metersphere.system.service.UserKeyService; import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/CsrfFilter.java b/backend/services/system-setting/src/main/java/io/metersphere/system/security/CsrfFilter.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/security/CsrfFilter.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/security/CsrfFilter.java index 380b586221..47464c63e5 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/CsrfFilter.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/security/CsrfFilter.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.security; +package io.metersphere.system.security; import io.metersphere.sdk.constants.SessionConstants; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/MsPermissionAnnotationMethodInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/security/MsPermissionAnnotationMethodInterceptor.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/security/MsPermissionAnnotationMethodInterceptor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/security/MsPermissionAnnotationMethodInterceptor.java index 439966568a..98aeb2b8e9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/MsPermissionAnnotationMethodInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/security/MsPermissionAnnotationMethodInterceptor.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.security; +package io.metersphere.system.security; import io.metersphere.project.domain.Project; import io.metersphere.sdk.util.SessionUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/TotpFilter.java b/backend/services/system-setting/src/main/java/io/metersphere/system/security/TotpFilter.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/security/TotpFilter.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/security/TotpFilter.java index ee016f6937..e432b9689b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/TotpFilter.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/security/TotpFilter.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.security; +package io.metersphere.system.security; import com.bastiaanjansen.otp.TOTPGenerator; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/realm/LocalRealm.java b/backend/services/system-setting/src/main/java/io/metersphere/system/security/realm/LocalRealm.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/security/realm/LocalRealm.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/security/realm/LocalRealm.java index c62fdc7ce0..824d9856b5 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/security/realm/LocalRealm.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/security/realm/LocalRealm.java @@ -1,13 +1,13 @@ -package io.metersphere.sdk.security.realm; +package io.metersphere.system.security.realm; import io.metersphere.sdk.constants.SessionConstants; import io.metersphere.sdk.constants.UserSource; import io.metersphere.sdk.dto.SessionUser; import io.metersphere.sdk.dto.UserDTO; -import io.metersphere.sdk.service.BaseUserService; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.sdk.util.Translator; +import io.metersphere.system.service.BaseUserService; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceLogService.java index 79d7069c19..d22601858c 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceLogService.java @@ -3,8 +3,8 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.AuthSource; import io.metersphere.system.mapper.AuthSourceMapper; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceService.java index c655fbee04..fc3edc75f5 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/AuthSourceService.java @@ -2,7 +2,7 @@ package io.metersphere.system.service; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.AuthSource; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldOptionService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseCustomFieldOptionService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldOptionService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseCustomFieldOptionService.java index 891cc1ecae..14b6327e6b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldOptionService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseCustomFieldOptionService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.request.CustomFieldOptionRequest; import io.metersphere.sdk.util.BeanUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseCustomFieldService.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseCustomFieldService.java index 8d0a4df48e..9057f6d5f9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseCustomFieldService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseCustomFieldService.java @@ -1,11 +1,11 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.TemplateScene; import io.metersphere.sdk.dto.CustomFieldDTO; import io.metersphere.sdk.dto.request.CustomFieldOptionRequest; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.util.BeanUtils; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.CustomField; import io.metersphere.system.domain.CustomFieldExample; @@ -17,8 +17,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; -import io.metersphere.sdk.uid.UUID; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.*; +import io.metersphere.system.uid.UUID; +import static io.metersphere.system.controller.handler.result.CommonResultCode.*; /** * @author jianxing diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseDisplayService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseDisplayService.java index 5c0a90d060..92bfbd5259 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseDisplayService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseDisplayService.java @@ -3,12 +3,11 @@ package io.metersphere.system.service; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.file.FileRequest; import io.metersphere.sdk.file.MinioRepository; -import io.metersphere.sdk.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogModule; import io.metersphere.system.domain.SystemParameter; import io.metersphere.system.mapper.SystemParameterMapper; import jakarta.annotation.Resource; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BasePluginOrganizationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BasePluginOrganizationService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BasePluginOrganizationService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BasePluginOrganizationService.java index 78f3bdb9a8..766eb1cd0c 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BasePluginOrganizationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BasePluginOrganizationService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.system.domain.PluginOrganization; import io.metersphere.system.domain.PluginOrganizationExample; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BasePluginService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BasePluginService.java similarity index 92% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BasePluginService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BasePluginService.java index 7df63a16c5..afddddd31a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BasePluginService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BasePluginService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.PluginScenarioType; import io.metersphere.sdk.exception.MSException; @@ -16,8 +16,8 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.PLUGIN_ENABLE; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.PLUGIN_PERMISSION; +import static io.metersphere.system.controller.handler.result.CommonResultCode.PLUGIN_ENABLE; +import static io.metersphere.system.controller.handler.result.CommonResultCode.PLUGIN_PERMISSION; /** * @author jianxing diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateCustomFieldService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTemplateCustomFieldService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateCustomFieldService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTemplateCustomFieldService.java index 72fdeef3d3..40fbf23bae 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateCustomFieldService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTemplateCustomFieldService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.request.TemplateCustomFieldRequest; import io.metersphere.sdk.util.BeanUtils; @@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Set; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTemplateService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTemplateService.java index e4c7a82b55..8a3e9b5a09 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseTemplateService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTemplateService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.TemplateScene; import io.metersphere.sdk.dto.TemplateCustomFieldDTO; @@ -6,7 +6,7 @@ import io.metersphere.sdk.dto.TemplateDTO; import io.metersphere.sdk.dto.request.TemplateCustomFieldRequest; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.util.BeanUtils; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.CustomField; import io.metersphere.system.domain.Template; @@ -22,10 +22,10 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; import java.util.Map; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import java.util.stream.Collectors; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.*; +import static io.metersphere.system.controller.handler.result.CommonResultCode.*; /** * @author jianxing diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRolePermissionService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRolePermissionService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRolePermissionService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRolePermissionService.java index 2f78a0658c..8bb06dab77 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRolePermissionService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRolePermissionService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.system.domain.UserRolePermission; @@ -10,7 +10,7 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Set; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import java.util.stream.Collectors; /** diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRoleRelationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRoleRelationService.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRoleRelationService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRoleRelationService.java index fc7941ac45..e145d0e70e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRoleRelationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRoleRelationService.java @@ -1,8 +1,8 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.UserExcludeOptionDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.mapper.BaseUserRoleRelationMapper; +import io.metersphere.system.mapper.BaseUserRoleRelationMapper; import io.metersphere.system.domain.UserRole; import io.metersphere.system.domain.UserRoleRelation; import io.metersphere.system.domain.UserRoleRelationExample; @@ -20,8 +20,8 @@ import java.util.Set; import java.util.stream.Collectors; import static io.metersphere.sdk.constants.InternalUserRole.ADMIN; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_EXIST; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_REMOVE_ADMIN_USER_PERMISSION; +import static io.metersphere.system.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_EXIST; +import static io.metersphere.system.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_REMOVE_ADMIN_USER_PERMISSION; /** * @author jianxing diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRoleService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRoleService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRoleService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRoleService.java index 4cd9738eba..ade7f6212b 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserRoleService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserRoleService.java @@ -1,14 +1,14 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.UserRoleEnum; import io.metersphere.sdk.dto.Permission; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.PermissionCache; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserRole; @@ -24,10 +24,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; -import io.metersphere.sdk.uid.UUID; import java.util.stream.Collectors; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; +import static io.metersphere.system.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; /** * @author jianxing diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java index ca35be6aac..95ea82b01f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseUserService.java @@ -1,17 +1,17 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.project.domain.Project; import io.metersphere.project.domain.ProjectExample; import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.sdk.constants.*; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.*; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.mapper.BaseProjectMapper; -import io.metersphere.sdk.mapper.BaseUserMapper; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.mapper.BaseProjectMapper; +import io.metersphere.system.mapper.BaseUserMapper; import io.metersphere.sdk.util.CodingUtil; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.sdk.util.Translator; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/CleanupProjectResourceService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CleanupProjectResourceService.java similarity index 86% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/CleanupProjectResourceService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/CleanupProjectResourceService.java index e606b395b7..8ddd154b65 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/CleanupProjectResourceService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CleanupProjectResourceService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; /** * 清理项目资源 diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java index f3f9792c16..23538a62e0 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CommonProjectService.java @@ -10,12 +10,11 @@ import io.metersphere.sdk.constants.UserRoleType; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.dto.*; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.invoker.ProjectServiceInvoker; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.service.BaseUserService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.invoker.ProjectServiceInvoker; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/CreateProjectResourceService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CreateProjectResourceService.java similarity index 76% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/CreateProjectResourceService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/CreateProjectResourceService.java index da8fdd45e9..016b851aed 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/CreateProjectResourceService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/CreateProjectResourceService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; /** * 新增项目资源 diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleLogService.java index b5103d2dfe..a99fbc083b 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleLogService.java @@ -4,9 +4,8 @@ import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.dto.request.UserRoleUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BaseUserRoleService; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.UserRole; import jakarta.annotation.Resource; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationLogService.java index 248dfa4d0b..25cd50510f 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationLogService.java @@ -5,9 +5,9 @@ import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.dto.UserDTO; import io.metersphere.sdk.dto.request.GlobalUserRoleRelationUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.mapper.BaseUserMapper; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.mapper.BaseUserMapper; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.UserRole; import io.metersphere.system.domain.UserRoleRelation; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationService.java index aefce71b8d..58ce2ef6ba 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleRelationService.java @@ -6,9 +6,7 @@ import io.metersphere.sdk.dto.UserExcludeOptionDTO; import io.metersphere.sdk.dto.UserRoleRelationUserDTO; import io.metersphere.sdk.dto.request.GlobalUserRoleRelationUpdateRequest; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BaseUserRoleRelationService; -import io.metersphere.sdk.service.BaseUserRoleService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.UserRole; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleService.java index c2183eafef..0098c60cf8 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/GlobalUserRoleService.java @@ -5,7 +5,6 @@ import io.metersphere.sdk.constants.UserRoleType; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BaseUserRoleService; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.UserRole; import io.metersphere.system.domain.UserRoleExample; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/JdbcDriverPluginService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/JdbcDriverPluginService.java similarity index 99% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/JdbcDriverPluginService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/JdbcDriverPluginService.java index 543193977f..d206d17735 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/JdbcDriverPluginService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/JdbcDriverPluginService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.PluginScenarioType; import io.metersphere.sdk.dto.OptionDTO; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/KubernetesResourcePoolService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/KubernetesResourcePoolService.java similarity index 82% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/KubernetesResourcePoolService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/KubernetesResourcePoolService.java index 5c80b58d99..10f94b32c1 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/KubernetesResourcePoolService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/KubernetesResourcePoolService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.TestResourceDTO; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/LicenseService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/LicenseService.java similarity index 84% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/LicenseService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/LicenseService.java index ae8181b563..1e17eaf3e7 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/LicenseService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/LicenseService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.LicenseDTO; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/MessageDetailService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/MessageDetailService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/MessageDetailService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/MessageDetailService.java index 3703daee13..32e61976d5 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/MessageDetailService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/MessageDetailService.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.project.domain.*; import io.metersphere.project.mapper.MessageTaskBlobMapper; import io.metersphere.project.mapper.MessageTaskMapper; import io.metersphere.project.mapper.ProjectRobotMapper; -import io.metersphere.sdk.notice.MessageDetail; +import io.metersphere.system.notice.MessageDetail; import io.metersphere.sdk.util.LogUtils; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NodeResourcePoolService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NodeResourcePoolService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NodeResourcePoolService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/NodeResourcePoolService.java index 302e620c9d..8b2ef7569c 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NodeResourcePoolService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NodeResourcePoolService.java @@ -1,9 +1,9 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import com.bastiaanjansen.otp.TOTPGenerator; import io.metersphere.sdk.constants.MsHttpHeaders; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.TestResourceDTO; import io.metersphere.sdk.dto.TestResourceNodeDTO; import io.metersphere.sdk.exception.MSException; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NoticeSendService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NoticeSendService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java index 4066499bd0..a438a0003f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NoticeSendService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NoticeSendService.java @@ -1,18 +1,18 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.project.domain.Project; -import io.metersphere.sdk.notice.constants.NoticeConstants; -import io.metersphere.sdk.notice.MessageDetail; -import io.metersphere.sdk.notice.sender.AbstractNoticeSender; -import io.metersphere.sdk.notice.sender.impl.*; +import io.metersphere.system.notice.constants.NoticeConstants; +import io.metersphere.system.notice.MessageDetail; +import io.metersphere.system.notice.sender.AbstractNoticeSender; import io.metersphere.sdk.util.LogUtils; +import io.metersphere.system.notice.sender.impl.*; import jakarta.annotation.Resource; import org.apache.commons.lang3.SerializationUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import io.metersphere.sdk.notice.NoticeModel; +import io.metersphere.system.notice.NoticeModel; import java.util.ArrayList; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NotificationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NotificationService.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NotificationService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/NotificationService.java index d0deb6c977..8f1142a1c1 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/NotificationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/NotificationService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; @@ -6,8 +6,8 @@ import io.metersphere.project.domain.Notification; import io.metersphere.project.domain.NotificationExample; import io.metersphere.project.mapper.NotificationMapper; import io.metersphere.sdk.dto.request.NotificationRequest; -import io.metersphere.sdk.mapper.BaseNotificationMapper; -import io.metersphere.sdk.notice.constants.NotificationConstants; +import io.metersphere.system.mapper.BaseNotificationMapper; +import io.metersphere.system.notice.constants.NotificationConstants; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldLogService.java index 762658054c..f1defc8e21 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldLogService.java @@ -3,8 +3,8 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.request.CustomFieldUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.CustomField; import jakarta.annotation.Resource; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldService.java index dfa1151989..7f658a9df8 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationCustomFieldService.java @@ -3,7 +3,6 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.TemplateScopeType; import io.metersphere.sdk.dto.CustomFieldDTO; import io.metersphere.sdk.dto.request.CustomFieldOptionRequest; -import io.metersphere.sdk.service.BaseCustomFieldService; import io.metersphere.system.domain.CustomField; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java index fed78bf025..04f8113bbb 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectLogService.java @@ -6,8 +6,8 @@ import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.dto.AddProjectRequest; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.UpdateProjectRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java index f68eec1f5f..cab42b6d4d 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationProjectService.java @@ -2,8 +2,8 @@ package io.metersphere.system.service; import io.metersphere.sdk.dto.*; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.UserRoleRelation; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationService.java index 39bee9ee50..caf6b64fc3 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationService.java @@ -8,14 +8,13 @@ import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.service.BaseUserService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.*; import io.metersphere.system.dto.*; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateLogService.java index 7a781c1ea7..a2bdc50e95 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateLogService.java @@ -3,8 +3,8 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.request.TemplateUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.Template; import jakarta.annotation.Resource; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateService.java index 8017ce3ac5..efd4d625f3 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationTemplateService.java @@ -3,7 +3,6 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.TemplateScopeType; import io.metersphere.sdk.dto.TemplateDTO; import io.metersphere.sdk.dto.request.TemplateCustomFieldRequest; -import io.metersphere.sdk.service.BaseTemplateService; import io.metersphere.system.domain.Template; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleLogService.java index 60cd8cb1a5..42cc7308ac 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleLogService.java @@ -3,8 +3,8 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.UserRole; import io.metersphere.system.domain.UserRoleExample; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleService.java index 8458fac168..7ac3cbef46 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/OrganizationUserRoleService.java @@ -7,8 +7,7 @@ import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BaseUserRoleService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.*; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/PlatformPluginService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/PlatformPluginService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java index 690b4bb792..a5b6b1cfdd 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/PlatformPluginService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.plugin.platform.api.Platform; import io.metersphere.plugin.platform.dto.PlatformRequest; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/PluginLoadService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLoadService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/PluginLoadService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLoadService.java index dd69629313..e07df19fa9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/PluginLoadService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLoadService.java @@ -1,12 +1,12 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.plugin.sdk.api.MsPlugin; import io.metersphere.sdk.constants.StorageType; -import io.metersphere.sdk.controller.handler.result.CommonResultCode; +import io.metersphere.system.controller.handler.result.CommonResultCode; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.file.FileCenter; import io.metersphere.sdk.file.FileRequest; -import io.metersphere.sdk.plugin.MsPluginManager; +import io.metersphere.system.plugin.MsPluginManager; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; import io.metersphere.sdk.util.MsFileUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLogService.java index d9c965683a..15777df572 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginLogService.java @@ -4,8 +4,8 @@ import io.metersphere.system.domain.Plugin; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import io.metersphere.sdk.constants.OperationLogConstants; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.util.JSON; import org.springframework.transaction.annotation.Transactional; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginScriptService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginScriptService.java index bbf06bab2c..e61648cbfd 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginScriptService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginScriptService.java @@ -2,7 +2,7 @@ package io.metersphere.system.service; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.PluginScript; import io.metersphere.system.domain.PluginScriptExample; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginService.java index 288bb76448..9a7874ef8d 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PluginService.java @@ -7,15 +7,12 @@ import io.metersphere.plugin.sdk.api.MsPlugin; import io.metersphere.sdk.constants.KafkaPluginTopicType; import io.metersphere.sdk.constants.KafkaTopicConstants; import io.metersphere.sdk.constants.PluginScenarioType; -import io.metersphere.sdk.controller.handler.result.CommonResultCode; +import io.metersphere.system.controller.handler.result.CommonResultCode; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BaseUserService; -import io.metersphere.sdk.service.JdbcDriverPluginService; -import io.metersphere.sdk.service.PluginLoadService; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.system.domain.Plugin; import io.metersphere.system.domain.PluginExample; import io.metersphere.system.dto.PluginDTO; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationLogService.java index cf69987d2a..d5af375bdb 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationLogService.java @@ -2,9 +2,8 @@ package io.metersphere.system.service; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BasePluginService; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.ServiceIntegration; import io.metersphere.system.request.ServiceIntegrationUpdateRequest; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationService.java index fe2d6183e7..eab09a46a8 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/ServiceIntegrationService.java @@ -3,13 +3,10 @@ package io.metersphere.system.service; import io.metersphere.plugin.platform.api.AbstractPlatformPlugin; import io.metersphere.plugin.platform.api.Platform; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.service.BasePluginService; -import io.metersphere.sdk.service.PlatformPluginService; -import io.metersphere.sdk.service.PluginLoadService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.JSON; -import io.metersphere.sdk.util.ServiceUtils; +import io.metersphere.system.utils.ServiceUtils; import io.metersphere.system.domain.Plugin; import io.metersphere.system.domain.ServiceIntegration; import io.metersphere.system.domain.ServiceIntegrationExample; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/SystemParameterService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemParameterService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/SystemParameterService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemParameterService.java index e1f1e3a518..90b9ad6235 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/SystemParameterService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemParameterService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.constants.OperationLogConstants; @@ -7,10 +7,10 @@ import io.metersphere.sdk.dto.BaseSystemConfigDTO; import io.metersphere.sdk.dto.EMailInfoDto; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.mapper.BaseSystemParameterMapper; -import io.metersphere.sdk.notice.sender.impl.MailNoticeSender; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.mapper.BaseSystemParameterMapper; +import io.metersphere.system.notice.sender.impl.MailNoticeSender; import io.metersphere.sdk.util.EncryptUtils; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java index a6c3694ab3..9825beeab4 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectLogService.java @@ -7,8 +7,8 @@ import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.AddProjectRequest; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.UpdateProjectRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java index b91bf3002b..9ee403ba6c 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SystemProjectService.java @@ -5,8 +5,8 @@ import io.metersphere.sdk.dto.AddProjectRequest; import io.metersphere.sdk.dto.ProjectDTO; import io.metersphere.sdk.dto.ProjectExtendDTO; import io.metersphere.sdk.dto.UpdateProjectRequest; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.Translator; import io.metersphere.system.dto.OrganizationProjectOptionsDTO; import io.metersphere.sdk.dto.UserExtend; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java index af9b0eef73..5a89c73206 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/TestResourcePoolService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TestResourcePoolService.java @@ -1,12 +1,12 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.constants.HttpMethodConstants; import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.constants.ResourcePoolTypeEnum; import io.metersphere.sdk.dto.*; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.CommonBeanFactory; import io.metersphere.sdk.util.JSON; @@ -28,7 +28,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; @Service @Transactional diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/UiResourceService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UiResourceService.java similarity index 78% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/UiResourceService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/UiResourceService.java index 07bca93e7b..f88430cb7f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/UiResourceService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UiResourceService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.dto.TestResourceDTO; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserInviteService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserInviteService.java index 8852638749..21fee525e6 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserInviteService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserInviteService.java @@ -1,6 +1,6 @@ package io.metersphere.system.service; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.UserInvite; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/UserKeyService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserKeyService.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/UserKeyService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/UserKeyService.java index 41a444fa94..140bd9ed49 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/UserKeyService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserKeyService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service; +package io.metersphere.system.service; import io.metersphere.sdk.exception.MSException; @@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; @Service @Transactional(rollbackFor = Exception.class) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLogService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLogService.java index 5ac6de8b6f..f07990e378 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLogService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLogService.java @@ -8,9 +8,9 @@ import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.dto.LogDTO; import io.metersphere.sdk.dto.TableBatchProcessDTO; import io.metersphere.sdk.dto.builder.LogDTOBuilder; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.*; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserRoleRelationService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserRoleRelationService.java index 26dc3029e0..505705c289 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserRoleRelationService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserRoleRelationService.java @@ -4,10 +4,10 @@ import io.metersphere.sdk.constants.OperationLogConstants; import io.metersphere.sdk.constants.UserRoleEnum; import io.metersphere.sdk.constants.UserRoleScope; import io.metersphere.sdk.dto.LogDTO; -import io.metersphere.sdk.log.constants.OperationLogModule; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.system.domain.*; import io.metersphere.system.mapper.ExtUserRoleRelationMapper; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java index e3e628809b..49596907b2 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java @@ -6,10 +6,10 @@ import io.metersphere.sdk.constants.UserSource; import io.metersphere.sdk.dto.UserExtend; import io.metersphere.sdk.dto.*; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.service.OperationLogService; -import io.metersphere.sdk.mapper.BaseUserMapper; -import io.metersphere.sdk.notice.sender.impl.MailNoticeSender; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.log.service.OperationLogService; +import io.metersphere.system.mapper.BaseUserMapper; +import io.metersphere.system.notice.sender.impl.MailNoticeSender; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.*; import io.metersphere.system.domain.*; import io.metersphere.system.dto.UserBatchCreateDTO; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserToolService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserToolService.java index 0c55737a57..dd1e75613e 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserToolService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserToolService.java @@ -1,7 +1,7 @@ package io.metersphere.system.service; import io.metersphere.sdk.dto.TableBatchProcessDTO; -import io.metersphere.sdk.mapper.BaseUserMapper; +import io.metersphere.system.mapper.BaseUserMapper; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserExample; import io.metersphere.system.mapper.UserMapper; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/environment/EnvironmentService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/environment/EnvironmentService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/environment/EnvironmentService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/environment/EnvironmentService.java index 9be22827b0..ec9078e3d1 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/environment/EnvironmentService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/environment/EnvironmentService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service.environment; +package io.metersphere.system.service.environment; import io.metersphere.sdk.domain.Environment; import io.metersphere.sdk.domain.EnvironmentBlob; @@ -13,8 +13,8 @@ import io.metersphere.sdk.file.FileRequest; import io.metersphere.sdk.file.MinioRepository; import io.metersphere.sdk.mapper.EnvironmentBlobMapper; import io.metersphere.sdk.mapper.EnvironmentMapper; -import io.metersphere.sdk.service.JdbcDriverPluginService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.service.JdbcDriverPluginService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.LogUtils; import io.metersphere.sdk.util.Translator; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/environment/GlobalParamsService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/environment/GlobalParamsService.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/service/environment/GlobalParamsService.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/service/environment/GlobalParamsService.java index ecf67ba271..5f60a89312 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/environment/GlobalParamsService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/environment/GlobalParamsService.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.service.environment; +package io.metersphere.system.service.environment; import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.sdk.domain.ProjectParameters; @@ -7,7 +7,7 @@ import io.metersphere.sdk.dto.environment.GlobalParamsDTO; import io.metersphere.sdk.dto.environment.GlobalParamsRequest; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.mapper.ProjectParametersMapper; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Translator; import jakarta.annotation.Resource; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/BitsAllocator.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/BitsAllocator.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/BitsAllocator.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/BitsAllocator.java index 24d5cc871d..848e90d97e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/BitsAllocator.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/BitsAllocator.java @@ -1,5 +1,5 @@ -package io.metersphere.sdk.uid; +package io.metersphere.system.uid; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/UUID.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/UUID.java similarity index 85% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/UUID.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/UUID.java index 00a398a6df..93e96fd21a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/UUID.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/UUID.java @@ -1,6 +1,6 @@ -package io.metersphere.sdk.uid; +package io.metersphere.system.uid; -import io.metersphere.sdk.uid.impl.CachedUidGenerator; +import io.metersphere.system.uid.impl.CachedUidGenerator; import io.metersphere.sdk.util.CommonBeanFactory; public class UUID { diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/BufferPaddingExecutor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/BufferPaddingExecutor.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/BufferPaddingExecutor.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/BufferPaddingExecutor.java index 211920cef6..da929440b0 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/BufferPaddingExecutor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/BufferPaddingExecutor.java @@ -1,8 +1,8 @@ -package io.metersphere.sdk.uid.buffer; +package io.metersphere.system.uid.buffer; -import io.metersphere.sdk.uid.utils.NamingThreadFactory; -import io.metersphere.sdk.uid.utils.PaddedAtomicLong; +import io.metersphere.system.uid.utils.NamingThreadFactory; +import io.metersphere.system.uid.utils.PaddedAtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.Assert; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/BufferedUidProvider.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/BufferedUidProvider.java similarity index 86% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/BufferedUidProvider.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/BufferedUidProvider.java index 74aeaf89c1..4af3eef25f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/BufferedUidProvider.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/BufferedUidProvider.java @@ -1,5 +1,5 @@ -package io.metersphere.sdk.uid.buffer; +package io.metersphere.system.uid.buffer; import java.util.List; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RejectedPutBufferHandler.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RejectedPutBufferHandler.java similarity index 90% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RejectedPutBufferHandler.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RejectedPutBufferHandler.java index a57ab83994..e3363f016f 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RejectedPutBufferHandler.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RejectedPutBufferHandler.java @@ -1,5 +1,5 @@ -package io.metersphere.sdk.uid.buffer; +package io.metersphere.system.uid.buffer; /** * If tail catches the cursor it means that the ring buffer is full, any more buffer put request will be rejected. diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RejectedTakeBufferHandler.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RejectedTakeBufferHandler.java similarity index 89% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RejectedTakeBufferHandler.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RejectedTakeBufferHandler.java index 7b6fd78a8e..4a2e1ec2fe 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RejectedTakeBufferHandler.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RejectedTakeBufferHandler.java @@ -1,5 +1,5 @@ -package io.metersphere.sdk.uid.buffer; +package io.metersphere.system.uid.buffer; /** * If cursor catches the tail it means that the ring buffer is empty, any more buffer take request will be rejected. diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RingBuffer.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RingBuffer.java similarity index 98% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RingBuffer.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RingBuffer.java index 879ac20eff..2b0ae25e06 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/buffer/RingBuffer.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/buffer/RingBuffer.java @@ -1,7 +1,7 @@ -package io.metersphere.sdk.uid.buffer; +package io.metersphere.system.uid.buffer; -import io.metersphere.sdk.uid.utils.PaddedAtomicLong; +import io.metersphere.system.uid.utils.PaddedAtomicLong; import lombok.Getter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/impl/CachedUidGenerator.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/impl/CachedUidGenerator.java similarity index 93% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/impl/CachedUidGenerator.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/impl/CachedUidGenerator.java index 7319584f70..1c1f4e2771 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/impl/CachedUidGenerator.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/impl/CachedUidGenerator.java @@ -1,12 +1,12 @@ -package io.metersphere.sdk.uid.impl; +package io.metersphere.system.uid.impl; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.uid.BitsAllocator; -import io.metersphere.sdk.uid.buffer.BufferPaddingExecutor; -import io.metersphere.sdk.uid.buffer.RejectedPutBufferHandler; -import io.metersphere.sdk.uid.buffer.RejectedTakeBufferHandler; -import io.metersphere.sdk.uid.buffer.RingBuffer; +import io.metersphere.system.uid.BitsAllocator; +import io.metersphere.system.uid.buffer.BufferPaddingExecutor; +import io.metersphere.system.uid.buffer.RejectedPutBufferHandler; +import io.metersphere.system.uid.buffer.RejectedTakeBufferHandler; +import io.metersphere.system.uid.buffer.RingBuffer; import io.metersphere.sdk.util.LogUtils; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/impl/DefaultUidGenerator.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/impl/DefaultUidGenerator.java similarity index 96% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/impl/DefaultUidGenerator.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/impl/DefaultUidGenerator.java index 92b4a8815a..420f6baf15 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/impl/DefaultUidGenerator.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/impl/DefaultUidGenerator.java @@ -1,10 +1,10 @@ -package io.metersphere.sdk.uid.impl; +package io.metersphere.system.uid.impl; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.uid.BitsAllocator; -import io.metersphere.sdk.uid.utils.TimeUtils; -import io.metersphere.sdk.uid.worker.WorkerIdAssigner; +import io.metersphere.system.uid.BitsAllocator; +import io.metersphere.system.uid.utils.TimeUtils; +import io.metersphere.system.uid.worker.WorkerIdAssigner; import io.metersphere.sdk.util.LogUtils; import jakarta.annotation.Resource; import org.apache.commons.lang.StringUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/DockerUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/DockerUtils.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/DockerUtils.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/DockerUtils.java index 9e4c2dff5e..4d8e450314 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/DockerUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/DockerUtils.java @@ -1,90 +1,90 @@ - -package io.metersphere.sdk.uid.utils; - -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * DockerUtils - * - - */ -public abstract class DockerUtils { - private static final Logger LOGGER = LoggerFactory.getLogger(DockerUtils.class); - - /** Environment param keys */ - private static final String ENV_KEY_HOST = "JPAAS_HOST"; - private static final String ENV_KEY_PORT = "JPAAS_HTTP_PORT"; - private static final String ENV_KEY_PORT_ORIGINAL = "JPAAS_HOST_PORT_8080"; - - /** Docker host & port */ - private static String DOCKER_HOST = ""; - private static String DOCKER_PORT = ""; - - /** Whether is docker */ - private static boolean IS_DOCKER; - - static { - retrieveFromEnv(); - } - - /** - * Retrieve docker host - * - * @return empty string if not a docker - */ - public static String getDockerHost() { - return DOCKER_HOST; - } - - /** - * Retrieve docker port - * - * @return empty string if not a docker - */ - public static String getDockerPort() { - return DOCKER_PORT; - } - - /** - * Whether a docker - * - * @return - */ - public static boolean isDocker() { - return IS_DOCKER; - } - - /** - * Retrieve host & port from environment - */ - private static void retrieveFromEnv() { - // retrieve host & port from environment - DOCKER_HOST = System.getenv(ENV_KEY_HOST); - DOCKER_PORT = System.getenv(ENV_KEY_PORT); - - // not found from 'JPAAS_HTTP_PORT', then try to find from 'JPAAS_HOST_PORT_8080' - if (StringUtils.isBlank(DOCKER_PORT)) { - DOCKER_PORT = System.getenv(ENV_KEY_PORT_ORIGINAL); - } - - boolean hasEnvHost = StringUtils.isNotBlank(DOCKER_HOST); - boolean hasEnvPort = StringUtils.isNotBlank(DOCKER_PORT); - - // docker can find both host & port from environment - if (hasEnvHost && hasEnvPort) { - IS_DOCKER = true; - - // found nothing means not a docker, maybe an actual machine - } else if (!hasEnvHost && !hasEnvPort) { - IS_DOCKER = false; - - } else { - LOGGER.error("Missing host or port from env for Docker. host:{}, port:{}", DOCKER_HOST, DOCKER_PORT); - throw new RuntimeException( - "Missing host or port from env for Docker. host:" + DOCKER_HOST + ", port:" + DOCKER_PORT); - } - } - -} + +package io.metersphere.system.uid.utils; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * DockerUtils + * + + */ +public abstract class DockerUtils { + private static final Logger LOGGER = LoggerFactory.getLogger(DockerUtils.class); + + /** Environment param keys */ + private static final String ENV_KEY_HOST = "JPAAS_HOST"; + private static final String ENV_KEY_PORT = "JPAAS_HTTP_PORT"; + private static final String ENV_KEY_PORT_ORIGINAL = "JPAAS_HOST_PORT_8080"; + + /** Docker host & port */ + private static String DOCKER_HOST = ""; + private static String DOCKER_PORT = ""; + + /** Whether is docker */ + private static boolean IS_DOCKER; + + static { + retrieveFromEnv(); + } + + /** + * Retrieve docker host + * + * @return empty string if not a docker + */ + public static String getDockerHost() { + return DOCKER_HOST; + } + + /** + * Retrieve docker port + * + * @return empty string if not a docker + */ + public static String getDockerPort() { + return DOCKER_PORT; + } + + /** + * Whether a docker + * + * @return + */ + public static boolean isDocker() { + return IS_DOCKER; + } + + /** + * Retrieve host & port from environment + */ + private static void retrieveFromEnv() { + // retrieve host & port from environment + DOCKER_HOST = System.getenv(ENV_KEY_HOST); + DOCKER_PORT = System.getenv(ENV_KEY_PORT); + + // not found from 'JPAAS_HTTP_PORT', then try to find from 'JPAAS_HOST_PORT_8080' + if (StringUtils.isBlank(DOCKER_PORT)) { + DOCKER_PORT = System.getenv(ENV_KEY_PORT_ORIGINAL); + } + + boolean hasEnvHost = StringUtils.isNotBlank(DOCKER_HOST); + boolean hasEnvPort = StringUtils.isNotBlank(DOCKER_PORT); + + // docker can find both host & port from environment + if (hasEnvHost && hasEnvPort) { + IS_DOCKER = true; + + // found nothing means not a docker, maybe an actual machine + } else if (!hasEnvHost && !hasEnvPort) { + IS_DOCKER = false; + + } else { + LOGGER.error("Missing host or port from env for Docker. host:{}, port:{}", DOCKER_HOST, DOCKER_PORT); + throw new RuntimeException( + "Missing host or port from env for Docker. host:" + DOCKER_HOST + ", port:" + DOCKER_PORT); + } + } + +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/EnumUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/EnumUtils.java similarity index 91% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/EnumUtils.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/EnumUtils.java index e65bb4e7d1..ae8b9c56fe 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/EnumUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/EnumUtils.java @@ -1,39 +1,39 @@ - -package io.metersphere.sdk.uid.utils; - -import org.springframework.util.Assert; - -/** - * EnumUtils provides the operations for {@link ValuedEnum} such as Parse, value of... - */ -public abstract class EnumUtils { - - /** - * Parse the bounded value into ValuedEnum - */ - public static , V> T parse(Class clz, V value) { - Assert.notNull(clz, "clz can not be null"); - if (value == null) { - return null; - } - - for (T t : clz.getEnumConstants()) { - if (value.equals(t.value())) { - return t; - } - } - return null; - } - - /** - * Null-safe valueOf function - */ - public static > T valueOf(Class enumType, String name) { - if (name == null) { - return null; - } - - return Enum.valueOf(enumType, name); - } - -} + +package io.metersphere.system.uid.utils; + +import org.springframework.util.Assert; + +/** + * EnumUtils provides the operations for {@link ValuedEnum} such as Parse, value of... + */ +public abstract class EnumUtils { + + /** + * Parse the bounded value into ValuedEnum + */ + public static , V> T parse(Class clz, V value) { + Assert.notNull(clz, "clz can not be null"); + if (value == null) { + return null; + } + + for (T t : clz.getEnumConstants()) { + if (value.equals(t.value())) { + return t; + } + } + return null; + } + + /** + * Null-safe valueOf function + */ + public static > T valueOf(Class enumType, String name) { + if (name == null) { + return null; + } + + return Enum.valueOf(enumType, name); + } + +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/NamingThreadFactory.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/NamingThreadFactory.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/NamingThreadFactory.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/NamingThreadFactory.java index 4b833c5aa2..59b99be01d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/NamingThreadFactory.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/NamingThreadFactory.java @@ -1,148 +1,148 @@ - -package io.metersphere.sdk.uid.utils; - -import org.apache.commons.lang.ClassUtils; -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.lang.Thread.UncaughtExceptionHandler; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicLong; - -/** - * Named thread in ThreadFactory. If there is no specified name for thread, it - * will auto detect using the invoker classname instead. - */ -public class NamingThreadFactory implements ThreadFactory { - private static final Logger LOGGER = LoggerFactory.getLogger(NamingThreadFactory.class); - - /** - * Thread name pre - */ - private String name; - /** - * Is daemon thread - */ - private boolean daemon; - /** - * UncaughtExceptionHandler - */ - private UncaughtExceptionHandler uncaughtExceptionHandler; - /** - * Sequences for multi thread name prefix - */ - private final ConcurrentHashMap sequences; - - /** - * Constructors - */ - public NamingThreadFactory() { - this(null, false, null); - } - - public NamingThreadFactory(String name) { - this(name, false, null); - } - - public NamingThreadFactory(String name, boolean daemon) { - this(name, daemon, null); - } - - public NamingThreadFactory(String name, boolean daemon, UncaughtExceptionHandler handler) { - this.name = name; - this.daemon = daemon; - this.uncaughtExceptionHandler = handler; - this.sequences = new ConcurrentHashMap(); - } - - @Override - public Thread newThread(Runnable r) { - Thread thread = new Thread(r); - thread.setDaemon(this.daemon); - - // If there is no specified name for thread, it will auto detect using the invoker classname instead. - // Notice that auto detect may cause some performance overhead - String prefix = this.name; - if (StringUtils.isBlank(prefix)) { - prefix = getInvoker(2); - } - thread.setName(prefix + "-" + getSequence(prefix)); - - // no specified uncaughtExceptionHandler, just do logging. - if (this.uncaughtExceptionHandler != null) { - thread.setUncaughtExceptionHandler(this.uncaughtExceptionHandler); - } else { - thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { - public void uncaughtException(Thread t, Throwable e) { - LOGGER.error("unhandled exception in thread: " + t.getId() + ":" + t.getName(), e); - } - }); - } - - return thread; - } - - /** - * Get the method invoker's class name - * - * @param depth - * @return - */ - private String getInvoker(int depth) { - Exception e = new Exception(); - StackTraceElement[] stes = e.getStackTrace(); - if (stes.length > depth) { - return ClassUtils.getShortClassName(stes[depth].getClassName()); - } - return getClass().getSimpleName(); - } - - /** - * Get sequence for different naming prefix - * - * @param invoker - * @return - */ - private long getSequence(String invoker) { - AtomicLong r = this.sequences.get(invoker); - if (r == null) { - r = new AtomicLong(0); - AtomicLong previous = this.sequences.putIfAbsent(invoker, r); - if (previous != null) { - r = previous; - } - } - - return r.incrementAndGet(); - } - - /** - * Getters & Setters - */ - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isDaemon() { - return daemon; - } - - public void setDaemon(boolean daemon) { - this.daemon = daemon; - } - - public UncaughtExceptionHandler getUncaughtExceptionHandler() { - return uncaughtExceptionHandler; - } - - public void setUncaughtExceptionHandler(UncaughtExceptionHandler handler) { - this.uncaughtExceptionHandler = handler; - } - -} + +package io.metersphere.system.uid.utils; + +import org.apache.commons.lang.ClassUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.lang.Thread.UncaughtExceptionHandler; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicLong; + +/** + * Named thread in ThreadFactory. If there is no specified name for thread, it + * will auto detect using the invoker classname instead. + */ +public class NamingThreadFactory implements ThreadFactory { + private static final Logger LOGGER = LoggerFactory.getLogger(NamingThreadFactory.class); + + /** + * Thread name pre + */ + private String name; + /** + * Is daemon thread + */ + private boolean daemon; + /** + * UncaughtExceptionHandler + */ + private UncaughtExceptionHandler uncaughtExceptionHandler; + /** + * Sequences for multi thread name prefix + */ + private final ConcurrentHashMap sequences; + + /** + * Constructors + */ + public NamingThreadFactory() { + this(null, false, null); + } + + public NamingThreadFactory(String name) { + this(name, false, null); + } + + public NamingThreadFactory(String name, boolean daemon) { + this(name, daemon, null); + } + + public NamingThreadFactory(String name, boolean daemon, UncaughtExceptionHandler handler) { + this.name = name; + this.daemon = daemon; + this.uncaughtExceptionHandler = handler; + this.sequences = new ConcurrentHashMap(); + } + + @Override + public Thread newThread(Runnable r) { + Thread thread = new Thread(r); + thread.setDaemon(this.daemon); + + // If there is no specified name for thread, it will auto detect using the invoker classname instead. + // Notice that auto detect may cause some performance overhead + String prefix = this.name; + if (StringUtils.isBlank(prefix)) { + prefix = getInvoker(2); + } + thread.setName(prefix + "-" + getSequence(prefix)); + + // no specified uncaughtExceptionHandler, just do logging. + if (this.uncaughtExceptionHandler != null) { + thread.setUncaughtExceptionHandler(this.uncaughtExceptionHandler); + } else { + thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + public void uncaughtException(Thread t, Throwable e) { + LOGGER.error("unhandled exception in thread: " + t.getId() + ":" + t.getName(), e); + } + }); + } + + return thread; + } + + /** + * Get the method invoker's class name + * + * @param depth + * @return + */ + private String getInvoker(int depth) { + Exception e = new Exception(); + StackTraceElement[] stes = e.getStackTrace(); + if (stes.length > depth) { + return ClassUtils.getShortClassName(stes[depth].getClassName()); + } + return getClass().getSimpleName(); + } + + /** + * Get sequence for different naming prefix + * + * @param invoker + * @return + */ + private long getSequence(String invoker) { + AtomicLong r = this.sequences.get(invoker); + if (r == null) { + r = new AtomicLong(0); + AtomicLong previous = this.sequences.putIfAbsent(invoker, r); + if (previous != null) { + r = previous; + } + } + + return r.incrementAndGet(); + } + + /** + * Getters & Setters + */ + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public boolean isDaemon() { + return daemon; + } + + public void setDaemon(boolean daemon) { + this.daemon = daemon; + } + + public UncaughtExceptionHandler getUncaughtExceptionHandler() { + return uncaughtExceptionHandler; + } + + public void setUncaughtExceptionHandler(UncaughtExceptionHandler handler) { + this.uncaughtExceptionHandler = handler; + } + +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/NetUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/NetUtils.java similarity index 94% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/NetUtils.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/NetUtils.java index 4db73e9060..6b31b5526a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/NetUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/NetUtils.java @@ -1,70 +1,70 @@ - -package io.metersphere.sdk.uid.utils; - -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.net.SocketException; -import java.util.Enumeration; - -/** - * NetUtils - * - - */ -public abstract class NetUtils { - - /** - * Pre-loaded local address - */ - public static InetAddress localAddress; - - static { - try { - localAddress = getLocalInetAddress(); - } catch (SocketException e) { - throw new RuntimeException("fail to get local ip."); - } - } - - /** - * Retrieve the first validated local ip address(the Public and LAN ip addresses are validated). - * - * @return the local address - * @throws SocketException the socket exception - */ - public static InetAddress getLocalInetAddress() throws SocketException { - // enumerates all network interfaces - Enumeration enu = NetworkInterface.getNetworkInterfaces(); - - while (enu.hasMoreElements()) { - NetworkInterface ni = enu.nextElement(); - if (ni.isLoopback()) { - continue; - } - - Enumeration addressEnumeration = ni.getInetAddresses(); - while (addressEnumeration.hasMoreElements()) { - InetAddress address = addressEnumeration.nextElement(); - - // ignores all invalidated addresses - if (address.isLinkLocalAddress() || address.isLoopbackAddress() || address.isAnyLocalAddress()) { - continue; - } - - return address; - } - } - - throw new RuntimeException("No validated local address!"); - } - - /** - * Retrieve local address - * - * @return the string local address - */ - public static String getLocalAddress() { - return localAddress.getHostAddress(); - } - -} + +package io.metersphere.system.uid.utils; + +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.Enumeration; + +/** + * NetUtils + * + + */ +public abstract class NetUtils { + + /** + * Pre-loaded local address + */ + public static InetAddress localAddress; + + static { + try { + localAddress = getLocalInetAddress(); + } catch (SocketException e) { + throw new RuntimeException("fail to get local ip."); + } + } + + /** + * Retrieve the first validated local ip address(the Public and LAN ip addresses are validated). + * + * @return the local address + * @throws SocketException the socket exception + */ + public static InetAddress getLocalInetAddress() throws SocketException { + // enumerates all network interfaces + Enumeration enu = NetworkInterface.getNetworkInterfaces(); + + while (enu.hasMoreElements()) { + NetworkInterface ni = enu.nextElement(); + if (ni.isLoopback()) { + continue; + } + + Enumeration addressEnumeration = ni.getInetAddresses(); + while (addressEnumeration.hasMoreElements()) { + InetAddress address = addressEnumeration.nextElement(); + + // ignores all invalidated addresses + if (address.isLinkLocalAddress() || address.isLoopbackAddress() || address.isAnyLocalAddress()) { + continue; + } + + return address; + } + } + + throw new RuntimeException("No validated local address!"); + } + + /** + * Retrieve local address + * + * @return the string local address + */ + public static String getLocalAddress() { + return localAddress.getHostAddress(); + } + +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/PaddedAtomicLong.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/PaddedAtomicLong.java similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/PaddedAtomicLong.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/PaddedAtomicLong.java index 7f96d0fe47..e7d1290c0e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/PaddedAtomicLong.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/PaddedAtomicLong.java @@ -1,5 +1,5 @@ -package io.metersphere.sdk.uid.utils; +package io.metersphere.system.uid.utils; import java.util.concurrent.atomic.AtomicLong; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/TimeUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/TimeUtils.java similarity index 97% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/TimeUtils.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/TimeUtils.java index 4b173010f7..472413df6d 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/TimeUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/TimeUtils.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.uid.utils; +package io.metersphere.system.uid.utils; import org.apache.commons.lang.time.DateFormatUtils; diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/ValuedEnum.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/ValuedEnum.java similarity index 87% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/ValuedEnum.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/ValuedEnum.java index d729b2de1a..5fe9f7b024 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/utils/ValuedEnum.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/utils/ValuedEnum.java @@ -1,5 +1,5 @@ -package io.metersphere.sdk.uid.utils; +package io.metersphere.system.uid.utils; /** * {@code ValuedEnum} defines an enumeration which is bounded to a value, you diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/DisposableWorkerIdAssigner.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/DisposableWorkerIdAssigner.java similarity index 91% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/DisposableWorkerIdAssigner.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/DisposableWorkerIdAssigner.java index 2ab0edce85..aecb92bf07 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/DisposableWorkerIdAssigner.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/DisposableWorkerIdAssigner.java @@ -1,11 +1,11 @@ -package io.metersphere.sdk.uid.worker; +package io.metersphere.system.uid.worker; import io.metersphere.sdk.domain.WorkerNode; -import io.metersphere.sdk.mapper.BaseWorkerNodeMapper; -import io.metersphere.sdk.uid.utils.DockerUtils; -import io.metersphere.sdk.uid.utils.NetUtils; import io.metersphere.sdk.util.LogUtils; +import io.metersphere.system.mapper.BaseWorkerNodeMapper; +import io.metersphere.system.uid.utils.DockerUtils; +import io.metersphere.system.uid.utils.NetUtils; import jakarta.annotation.Resource; import org.apache.commons.lang.math.RandomUtils; import org.springframework.stereotype.Service; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/WorkerIdAssigner.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/WorkerIdAssigner.java new file mode 100644 index 0000000000..276addae58 --- /dev/null +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/WorkerIdAssigner.java @@ -0,0 +1,20 @@ + +package io.metersphere.system.uid.worker; + +import io.metersphere.system.uid.impl.DefaultUidGenerator; + +/** + * Represents a worker id assigner for {@link DefaultUidGenerator} + * + + */ +public interface WorkerIdAssigner { + + /** + * Assign worker id for {@link DefaultUidGenerator} + * + * @return assigned worker id + */ + long assignWorkerId(); + +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/WorkerNodeType.java b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/WorkerNodeType.java similarity index 83% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/WorkerNodeType.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/WorkerNodeType.java index 5e34536a9d..74051d804c 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/uid/worker/WorkerNodeType.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/uid/worker/WorkerNodeType.java @@ -1,7 +1,7 @@ -package io.metersphere.sdk.uid.worker; +package io.metersphere.system.uid.worker; -import io.metersphere.sdk.uid.utils.ValuedEnum; +import io.metersphere.system.uid.utils.ValuedEnum; /** * WorkerNodeType diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/ServiceUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java similarity index 87% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/util/ServiceUtils.java rename to backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java index fdb7ef7bd5..54554685d9 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/ServiceUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java @@ -1,8 +1,8 @@ -package io.metersphere.sdk.util; +package io.metersphere.system.utils; import io.metersphere.sdk.exception.MSException; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; public class ServiceUtils { diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/BaseTest.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java similarity index 97% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/BaseTest.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java index 8266da6d18..766f2d46b7 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/BaseTest.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java @@ -1,23 +1,23 @@ -package io.metersphere.sdk.base; +package io.metersphere.system.base; import com.jayway.jsonpath.JsonPath; -import io.metersphere.sdk.base.param.InvalidateParamInfo; -import io.metersphere.sdk.base.param.ParamGeneratorFactory; import io.metersphere.sdk.constants.SessionConstants; import io.metersphere.sdk.constants.UserRoleType; -import io.metersphere.sdk.controller.handler.result.IResultCode; import io.metersphere.sdk.domain.OperationLogExample; +import io.metersphere.sdk.exception.IResultCode; import io.metersphere.sdk.exception.MSException; -import io.metersphere.sdk.log.constants.OperationLogType; import io.metersphere.sdk.mapper.OperationLogMapper; -import io.metersphere.sdk.uid.UUID; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; +import io.metersphere.system.base.param.InvalidateParamInfo; +import io.metersphere.system.base.param.ParamGeneratorFactory; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserRolePermission; import io.metersphere.system.domain.UserRolePermissionExample; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.system.mapper.UserMapper; import io.metersphere.system.mapper.UserRolePermissionMapper; +import io.metersphere.system.uid.UUID; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import jakarta.annotation.Resource; @@ -53,7 +53,6 @@ import java.util.List; import java.util.Map; import java.util.function.Supplier; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; @SpringBootTest @@ -529,9 +528,9 @@ public abstract class BaseTest { private MockHttpServletRequestBuilder setRequestBuilderHeader(MockHttpServletRequestBuilder requestBuilder, AuthInfo authInfo) { return requestBuilder - .header(SessionConstants.HEADER_TOKEN, authInfo.getSessionId()) - .header(SessionConstants.CSRF_TOKEN, authInfo.getCsrfToken()) - .header(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN"); + .header(SessionConstants.HEADER_TOKEN, authInfo.getSessionId()) + .header(SessionConstants.CSRF_TOKEN, authInfo.getCsrfToken()) + .header(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN"); } private AuthInfo getPermissionAuthInfo(String roleId) { diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/EmailParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/EmailParamGenerator.java similarity index 89% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/EmailParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/EmailParamGenerator.java index cf1aa0b7d4..9a1ae67f53 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/EmailParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/EmailParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import java.lang.annotation.Annotation; import java.lang.reflect.Field; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/EnumValueParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/EnumValueParamGenerator.java similarity index 96% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/EnumValueParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/EnumValueParamGenerator.java index 02b57ae097..a6e648cf51 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/EnumValueParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/EnumValueParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import io.metersphere.sdk.constants.ValueEnum; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/InvalidateParamInfo.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/InvalidateParamInfo.java similarity index 88% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/InvalidateParamInfo.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/InvalidateParamInfo.java index ef7ce8a063..4d37957bb8 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/InvalidateParamInfo.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/InvalidateParamInfo.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import lombok.Data; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/MaxParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/MaxParamGenerator.java similarity index 94% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/MaxParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/MaxParamGenerator.java index c2dddc5b0f..f9e6ad9595 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/MaxParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/MaxParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import jakarta.validation.constraints.Max; import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/MinParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/MinParamGenerator.java similarity index 94% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/MinParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/MinParamGenerator.java index a82e9cfb6d..8cabc849fb 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/MinParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/MinParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import jakarta.validation.constraints.Min; import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotBlankParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotBlankParamGenerator.java similarity index 90% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotBlankParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotBlankParamGenerator.java index f854257658..70a2644de0 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotBlankParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotBlankParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import org.testcontainers.shaded.org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotEmptyParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotEmptyParamGenerator.java similarity index 94% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotEmptyParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotEmptyParamGenerator.java index 6fb01f3dec..35c81c7963 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotEmptyParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotEmptyParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import java.lang.annotation.Annotation; import java.lang.reflect.Field; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotNullParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotNullParamGenerator.java similarity index 88% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotNullParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotNullParamGenerator.java index bda309738d..652ccc8119 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/NotNullParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/NotNullParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import java.lang.annotation.Annotation; import java.lang.reflect.Field; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/ParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/ParamGenerator.java similarity index 98% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/ParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/ParamGenerator.java index 12232149b8..49b7b5b52c 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/ParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/ParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import org.testcontainers.shaded.org.apache.commons.lang3.StringUtils; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/ParamGeneratorFactory.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/ParamGeneratorFactory.java similarity index 99% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/ParamGeneratorFactory.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/ParamGeneratorFactory.java index c3aef27683..be024c00e7 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/ParamGeneratorFactory.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/ParamGeneratorFactory.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.valid.EnumValue; diff --git a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/SizeParamGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/SizeParamGenerator.java similarity index 94% rename from backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/SizeParamGenerator.java rename to backend/services/system-setting/src/test/java/io/metersphere/system/base/param/SizeParamGenerator.java index 784aca661c..c666de62b9 100644 --- a/backend/framework/sdk/src/test/java/io/metersphere/sdk/base/param/SizeParamGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/param/SizeParamGenerator.java @@ -1,4 +1,4 @@ -package io.metersphere.sdk.base.param; +package io.metersphere.system.base.param; import jakarta.validation.constraints.Size; import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java index e6d8d38191..d1de0eae1b 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java @@ -1,13 +1,13 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.BasePageRequest; -import io.metersphere.sdk.ldap.service.LdapService; -import io.metersphere.sdk.ldap.vo.LdapLoginRequest; -import io.metersphere.sdk.ldap.vo.LdapRequest; +import io.metersphere.system.ldap.service.LdapService; +import io.metersphere.system.ldap.vo.LdapLoginRequest; +import io.metersphere.system.ldap.vo.LdapRequest; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; import io.metersphere.system.domain.AuthSource; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java index b384c62cba..43144c1290 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java @@ -1,10 +1,10 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.SessionConstants; import io.metersphere.sdk.file.FileRequest; import io.metersphere.sdk.file.MinioRepository; -import io.metersphere.sdk.log.constants.OperationLogModule; +import io.metersphere.system.log.constants.OperationLogModule; import jakarta.annotation.Resource; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.MethodOrderer; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java index 0b367e60d5..db95751f89 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.invoker.ProjectServiceInvoker; +import io.metersphere.system.invoker.ProjectServiceInvoker; import io.metersphere.system.mock.CleanupTestResourceService; import jakarta.annotation.Resource; import org.junit.jupiter.api.MethodOrderer; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java index e10aaa36aa..98cc42f5d1 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.system.controller.param.BasePageRequestDefinition; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.MethodOrderer; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java index 3268f3196b..ceb90cc6a2 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.invoker.ProjectServiceInvoker; +import io.metersphere.system.invoker.ProjectServiceInvoker; import io.metersphere.system.mock.CreateTestResourceService; import jakarta.annotation.Resource; import org.junit.jupiter.api.MethodOrderer; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java index 8f40f23b25..d2bf085599 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java @@ -1,15 +1,15 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.*; import io.metersphere.sdk.dto.Permission; import io.metersphere.sdk.dto.PermissionDefinitionItem; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; import io.metersphere.sdk.dto.request.UserRoleUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BaseUserRolePermissionService; -import io.metersphere.sdk.service.BaseUserRoleRelationService; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.BaseUserRolePermissionService; +import io.metersphere.system.service.BaseUserRoleRelationService; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.controller.param.PermissionSettingUpdateRequestDefinition; @@ -34,8 +34,8 @@ import java.util.stream.Collectors; import static io.metersphere.sdk.constants.InternalUserRole.ADMIN; import static io.metersphere.sdk.constants.InternalUserRole.MEMBER; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; import static io.metersphere.system.controller.result.SystemResultCode.GLOBAL_USER_ROLE_EXIST; import static io.metersphere.system.controller.result.SystemResultCode.GLOBAL_USER_ROLE_PERMISSION; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java index d157101055..6409cbae5a 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java @@ -1,14 +1,14 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.UserRoleScope; import io.metersphere.sdk.dto.UserExcludeOptionDTO; import io.metersphere.sdk.dto.UserRoleRelationUserDTO; import io.metersphere.sdk.dto.request.GlobalUserRoleRelationUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.mapper.BaseUserRoleRelationMapper; -import io.metersphere.sdk.service.BaseUserService; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.mapper.BaseUserRoleRelationMapper; +import io.metersphere.system.service.BaseUserService; import io.metersphere.sdk.util.Pager; import io.metersphere.system.controller.param.GlobalUserRoleRelationQueryRequestDefinition; import io.metersphere.system.controller.param.GlobalUserRoleRelationUpdateRequestDefinition; @@ -31,14 +31,14 @@ import org.springframework.test.web.servlet.MvcResult; import java.util.Arrays; import java.util.List; import java.util.Set; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.uid.UUID; import java.util.stream.Collectors; import static io.metersphere.sdk.constants.InternalUserRole.ADMIN; import static io.metersphere.sdk.constants.InternalUserRole.ORG_ADMIN; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_EXIST; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_REMOVE_ADMIN_USER_PERMISSION; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_EXIST; +import static io.metersphere.system.controller.handler.result.CommonResultCode.USER_ROLE_RELATION_REMOVE_ADMIN_USER_PERMISSION; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; import static io.metersphere.system.controller.result.SystemResultCode.*; @SpringBootTest diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java index 5d35706cf4..db5e7df288 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java @@ -1,8 +1,8 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.vo.OperationLogRequest; +import io.metersphere.system.log.vo.OperationLogRequest; import io.metersphere.system.controller.param.OperationLogRequestDefinition; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java index a28496884d..dd09a6aa7d 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java @@ -1,9 +1,9 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.InternalUserRole; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.OptionDTO; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java index 56e9065f2c..e4cc6a999d 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.CustomFieldType; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.TemplateScene; @@ -8,10 +8,10 @@ import io.metersphere.sdk.constants.TemplateScopeType; import io.metersphere.sdk.dto.CustomFieldDTO; import io.metersphere.sdk.dto.request.CustomFieldOptionRequest; import io.metersphere.sdk.dto.request.CustomFieldUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BaseCustomFieldOptionService; -import io.metersphere.sdk.service.BaseCustomFieldService; -import io.metersphere.sdk.service.BaseUserService; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.BaseCustomFieldOptionService; +import io.metersphere.system.service.BaseCustomFieldService; +import io.metersphere.system.service.BaseUserService; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.system.controller.param.CustomFieldUpdateRequestDefinition; import io.metersphere.system.domain.CustomField; @@ -30,8 +30,8 @@ import java.util.List; import java.util.Map; import static io.metersphere.sdk.constants.InternalUserRole.ADMIN; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.*; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.CommonResultCode.*; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; /** * @author jianxing diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java index bbb624b966..337d88e08b 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java @@ -1,8 +1,8 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.vo.OperationLogRequest; +import io.metersphere.system.log.vo.OperationLogRequest; import io.metersphere.system.controller.param.OperationLogRequestDefinition; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java index 636e1d29d3..20d414af54 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java @@ -3,13 +3,13 @@ package io.metersphere.system.controller; import io.metersphere.project.domain.Project; import io.metersphere.project.domain.ProjectExample; import io.metersphere.project.mapper.ProjectMapper; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.InternalUserRole; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.*; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; import io.metersphere.system.domain.User; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java index b7272e77b5..54c09c1cbd 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.TemplateScene; import io.metersphere.sdk.constants.TemplateScopeType; @@ -8,11 +8,11 @@ import io.metersphere.sdk.dto.TemplateCustomFieldDTO; import io.metersphere.sdk.dto.TemplateDTO; import io.metersphere.sdk.dto.request.TemplateCustomFieldRequest; import io.metersphere.sdk.dto.request.TemplateUpdateRequest; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BaseCustomFieldService; -import io.metersphere.sdk.service.BaseTemplateCustomFieldService; -import io.metersphere.sdk.service.BaseTemplateService; -import io.metersphere.sdk.service.BaseUserService; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.BaseCustomFieldService; +import io.metersphere.system.service.BaseTemplateCustomFieldService; +import io.metersphere.system.service.BaseTemplateService; +import io.metersphere.system.service.BaseUserService; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.system.controller.param.TemplateUpdateRequestDefinition; import io.metersphere.system.domain.CustomField; @@ -32,8 +32,8 @@ import java.util.List; import java.util.Map; import static io.metersphere.sdk.constants.InternalUserRole.ADMIN; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.*; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.CommonResultCode.*; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; /** * @author jianxing diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java index 70d1ebd9d5..07cd98b8d8 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java @@ -1,12 +1,12 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.InternalUserRole; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest; -import io.metersphere.sdk.service.BaseUserRolePermissionService; +import io.metersphere.system.service.BaseUserRolePermissionService; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; import io.metersphere.system.domain.User; @@ -35,7 +35,7 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; +import static io.metersphere.system.controller.handler.result.CommonResultCode.INTERNAL_USER_ROLE_PERMISSION; import static io.metersphere.system.controller.result.SystemResultCode.NO_ORG_USER_ROLE_PERMISSION; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java index 1a2dd3746c..cab9238b94 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java @@ -1,12 +1,12 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.PluginScenarioType; import io.metersphere.sdk.dto.OptionDTO; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.BaseUserService; -import io.metersphere.sdk.service.JdbcDriverPluginService; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.BaseUserService; +import io.metersphere.system.service.JdbcDriverPluginService; import io.metersphere.sdk.util.JSON; import io.metersphere.system.controller.param.PluginUpdateRequestDefinition; import io.metersphere.system.domain.*; @@ -29,8 +29,8 @@ import java.io.File; import java.util.*; import java.util.stream.Collectors; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.FILE_NAME_ILLEGAL; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.CommonResultCode.FILE_NAME_ILLEGAL; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; import static io.metersphere.system.controller.result.SystemResultCode.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java index e20de07288..911a8d9a30 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java @@ -1,10 +1,10 @@ package io.metersphere.system.controller; import io.metersphere.plugin.platform.api.AbstractPlatformPlugin; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.service.PluginLoadService; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.service.PluginLoadService; import io.metersphere.sdk.util.JSON; import io.metersphere.system.controller.param.ServiceIntegrationUpdateRequestDefinition; import io.metersphere.system.domain.Organization; @@ -36,9 +36,9 @@ import java.util.List; import java.util.Map; import static io.metersphere.sdk.constants.InternalUserRole.ADMIN; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.PLUGIN_ENABLE; -import static io.metersphere.sdk.controller.handler.result.CommonResultCode.PLUGIN_PERMISSION; -import static io.metersphere.sdk.controller.handler.result.MsHttpResultCode.NOT_FOUND; +import static io.metersphere.system.controller.handler.result.CommonResultCode.PLUGIN_ENABLE; +import static io.metersphere.system.controller.handler.result.CommonResultCode.PLUGIN_PERMISSION; +import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; import static io.metersphere.system.controller.result.SystemResultCode.SERVICE_INTEGRATION_EXIST; import static io.metersphere.system.service.ServiceIntegrationService.PLUGIN_IMAGE_GET_PATH; import static org.mockserver.model.HttpRequest.request; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java index 57c9ad4f37..ffefc36d06 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java @@ -1,11 +1,11 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.ProjectDTO; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; import io.metersphere.system.dto.OrganizationDTO; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java index 7d21a838ff..602e069ef1 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; import io.metersphere.sdk.util.JSON; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java index 241462de9f..08c3db13b2 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java @@ -3,13 +3,13 @@ package io.metersphere.system.controller; import io.metersphere.project.domain.Project; import io.metersphere.project.domain.ProjectExample; import io.metersphere.project.mapper.ProjectMapper; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.InternalUserRole; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.*; -import io.metersphere.sdk.log.constants.OperationLogType; +import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; import io.metersphere.system.domain.User; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java index 01d692544c..0abf8b8c66 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.SessionConstants; import jakarta.annotation.Resource; import org.junit.jupiter.api.MethodOrderer; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java index 98dd6e061c..9edb77162e 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java @@ -1,9 +1,9 @@ package io.metersphere.system.controller; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.ResourcePoolTypeEnum; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.*; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java index 9d99d20626..e64d0b4778 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java @@ -1,6 +1,6 @@ package io.metersphere.system.controller.user; -import io.metersphere.sdk.base.BaseTest; +import io.metersphere.system.base.BaseTest; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.dto.TableBatchProcessDTO; import io.metersphere.system.dto.UserCreateInfo; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java index a3be8028d2..cb82395012 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java @@ -2,11 +2,11 @@ package io.metersphere.system.controller.user; import io.metersphere.project.domain.Project; import io.metersphere.project.mapper.ProjectMapper; -import io.metersphere.sdk.base.BaseTest; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.base.BaseTest; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.*; -import io.metersphere.sdk.log.constants.OperationLogType; -import io.metersphere.sdk.uid.UUID; +import io.metersphere.system.log.constants.OperationLogType; +import io.metersphere.system.uid.UUID; import io.metersphere.sdk.util.*; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserExample; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CleanupTestResourceService.java b/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CleanupTestResourceService.java index 13ac4e0493..eb2bb373cb 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CleanupTestResourceService.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CleanupTestResourceService.java @@ -1,6 +1,6 @@ package io.metersphere.system.mock; -import io.metersphere.sdk.service.CleanupProjectResourceService; +import io.metersphere.system.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; import org.springframework.stereotype.Component; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CreateTestResourceService.java b/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CreateTestResourceService.java index 328b515143..b365866d32 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CreateTestResourceService.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/mock/CreateTestResourceService.java @@ -1,6 +1,6 @@ package io.metersphere.system.mock; -import io.metersphere.sdk.service.CreateProjectResourceService; +import io.metersphere.system.service.CreateProjectResourceService; import io.metersphere.sdk.util.LogUtils; import org.springframework.stereotype.Component; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/utils/user/UserRequestUtils.java b/backend/services/system-setting/src/test/java/io/metersphere/system/utils/user/UserRequestUtils.java index a44e198ed2..fbacdfb641 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/utils/user/UserRequestUtils.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/utils/user/UserRequestUtils.java @@ -1,7 +1,7 @@ package io.metersphere.system.utils.user; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; +import io.metersphere.system.controller.handler.ResultHolder; import io.metersphere.sdk.dto.BasePageRequest; import io.metersphere.sdk.util.JSON; import io.metersphere.sdk.util.Pager; diff --git a/backend/services/test-plan/pom.xml b/backend/services/test-plan/pom.xml index b859c7541c..5850900c7c 100644 --- a/backend/services/test-plan/pom.xml +++ b/backend/services/test-plan/pom.xml @@ -18,7 +18,16 @@ metersphere-sdk ${revision} - + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-project-management + ${revision} + diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/CleanupPlanResourceService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/CleanupPlanResourceService.java index 8dbc688414..f90360b178 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/CleanupPlanResourceService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/CleanupPlanResourceService.java @@ -1,7 +1,7 @@ package io.metersphere.plan.service; -import io.metersphere.sdk.service.CleanupProjectResourceService; import io.metersphere.sdk.util.LogUtils; +import io.metersphere.system.service.CleanupProjectResourceService; import org.springframework.stereotype.Component; @Component diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java index 06f2d082c2..e5b36145a0 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -9,18 +9,18 @@ import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.domain.User; +import io.metersphere.system.uid.UUID; import jakarta.annotation.Resource; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; -import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; -import io.metersphere.sdk.uid.UUID; @Service @Transactional(rollbackFor = Exception.class) diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/Application.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/Application.java index 2893be99dd..06060d0727 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/Application.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/Application.java @@ -19,7 +19,7 @@ import org.springframework.context.annotation.ComponentScan; MinioProperties.class }) @ServletComponentScan -@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.plan"}) +@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.plan", "io.metersphere.system"}) public class Application { public static void main(String[] args) { diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java index 4e6eb8013b..2cca9c1254 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java @@ -1,29 +1,11 @@ package io.metersphere.plan.controller; -import com.jayway.jsonpath.JsonPath; -import io.metersphere.plan.dto.TestPlanApiCaseDTO; -import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.util.JSON; -import jakarta.annotation.Resource; import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Order; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.MediaType; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.SqlConfig; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.result.MockMvcResultHandlers; -import org.springframework.test.web.servlet.result.MockMvcResultMatchers; - -import io.metersphere.sdk.uid.UUID; - -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest @AutoConfigureMockMvc diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java index 1dde8e246a..95eb701dd0 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java @@ -4,8 +4,9 @@ import com.jayway.jsonpath.JsonPath; import io.metersphere.plan.domain.TestPlan; import io.metersphere.plan.dto.TestPlanDTO; import io.metersphere.sdk.constants.SessionConstants; -import io.metersphere.sdk.controller.handler.ResultHolder; import io.metersphere.sdk.util.JSON; +import io.metersphere.system.controller.handler.ResultHolder; +import io.metersphere.system.uid.UUID; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.*; @@ -19,8 +20,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import java.util.ArrayList; import java.util.List; -import io.metersphere.sdk.uid.UUID; - import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; diff --git a/backend/services/test-plan/src/test/resources/bootstrap.properties b/backend/services/test-plan/src/test/resources/bootstrap.properties index 62e94d254a..df85de4cef 100644 --- a/backend/services/test-plan/src/test/resources/bootstrap.properties +++ b/backend/services/test-plan/src/test/resources/bootstrap.properties @@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci # redis embedded.redis.enabled=true # kafka -embedded.kafka.enabled=false +embedded.kafka.enabled=true # minio embedded.minio.enabled=true \ No newline at end of file diff --git a/backend/services/ui-test/pom.xml b/backend/services/ui-test/pom.xml index dd0913782d..7532df36d9 100644 --- a/backend/services/ui-test/pom.xml +++ b/backend/services/ui-test/pom.xml @@ -18,6 +18,16 @@ metersphere-sdk ${revision} + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-project-management + ${revision} + org.seleniumhq.selenium diff --git a/backend/services/workstation/pom.xml b/backend/services/workstation/pom.xml index e7413778b2..716faa89b8 100644 --- a/backend/services/workstation/pom.xml +++ b/backend/services/workstation/pom.xml @@ -18,7 +18,16 @@ metersphere-sdk ${revision} - + + io.metersphere + metersphere-system-setting + ${revision} + + + io.metersphere + metersphere-project-management + ${revision} +