build: 保留工具相关的代码在SDK中
This commit is contained in:
parent
9522889ece
commit
2f9640750d
|
@ -2,7 +2,7 @@ package io.metersphere.listener;
|
||||||
|
|
||||||
import io.metersphere.api.event.APIEventSource;
|
import io.metersphere.api.event.APIEventSource;
|
||||||
import io.metersphere.plan.listener.ExecEventListener;
|
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.CommonBeanFactory;
|
||||||
import io.metersphere.sdk.util.LogUtils;
|
import io.metersphere.sdk.util.LogUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
|
@ -407,17 +407,6 @@
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>test-jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mybatis.generator</groupId>
|
<groupId>org.mybatis.generator</groupId>
|
||||||
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.controller.handler.result;
|
package io.metersphere.sdk.exception;
|
||||||
|
|
||||||
import io.metersphere.sdk.util.Translator;
|
import io.metersphere.sdk.util.Translator;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.metersphere.sdk.exception;
|
package io.metersphere.sdk.exception;
|
||||||
|
|
||||||
import io.metersphere.sdk.controller.handler.result.IResultCode;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
public class MSException extends RuntimeException {
|
public class MSException extends RuntimeException {
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
package io.metersphere.sdk.mapper;
|
|
||||||
|
|
||||||
public interface BaseMapper {
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
|
|
||||||
}
|
|
|
@ -18,6 +18,24 @@
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
<artifactId>metersphere-sdk</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-system-setting</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-system-setting</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
<classifier>tests</classifier>
|
||||||
|
<type>test-jar</type>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-project-management</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.jmeter</groupId>
|
<groupId>org.apache.jmeter</groupId>
|
||||||
<artifactId>ApacheJMeter_components</artifactId>
|
<artifactId>ApacheJMeter_components</artifactId>
|
||||||
|
|
|
@ -4,8 +4,8 @@ import io.metersphere.api.dto.definition.ApiDefinitionDTO;
|
||||||
import io.metersphere.api.service.APIDefinitionLogService;
|
import io.metersphere.api.service.APIDefinitionLogService;
|
||||||
import io.metersphere.api.service.APIDefinitionService;
|
import io.metersphere.api.service.APIDefinitionService;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.validation.groups.Created;
|
import io.metersphere.validation.groups.Created;
|
||||||
import io.metersphere.validation.groups.Updated;
|
import io.metersphere.validation.groups.Updated;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
|
@ -6,9 +6,9 @@ import io.metersphere.api.dto.definition.ApiDefinitionDTO;
|
||||||
import io.metersphere.api.mapper.ApiDefinitionMapper;
|
import io.metersphere.api.mapper.ApiDefinitionMapper;
|
||||||
import io.metersphere.sdk.constants.HttpMethodConstants;
|
import io.metersphere.sdk.constants.HttpMethodConstants;
|
||||||
import io.metersphere.sdk.dto.LogDTO;
|
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.sdk.util.JSON;
|
||||||
|
import io.metersphere.system.log.constants.OperationLogModule;
|
||||||
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ public class APIDefinitionLogService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量更新接口日志
|
* 批量更新接口日志
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<LogDTO> batchUpdateLog(List<String> ids) {
|
public List<LogDTO> batchUpdateLog(List<String> ids) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package io.metersphere.api.service;
|
package io.metersphere.api.service;
|
||||||
|
|
||||||
import io.metersphere.sdk.service.CleanupProjectResourceService;
|
|
||||||
import io.metersphere.sdk.util.LogUtils;
|
import io.metersphere.sdk.util.LogUtils;
|
||||||
|
import io.metersphere.system.service.CleanupProjectResourceService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||||
MinioProperties.class
|
MinioProperties.class
|
||||||
})
|
})
|
||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.api"})
|
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.api", "io.metersphere.system"})
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -4,12 +4,12 @@ import io.metersphere.api.dto.jmeter.processors.MSJSR223Processor;
|
||||||
import io.metersphere.api.dto.jmeter.sampler.MSDebugSampler;
|
import io.metersphere.api.dto.jmeter.sampler.MSDebugSampler;
|
||||||
import io.metersphere.api.util.JSONUtils;
|
import io.metersphere.api.util.JSONUtils;
|
||||||
import io.metersphere.plugin.api.dto.TestElementDTO;
|
import io.metersphere.plugin.api.dto.TestElementDTO;
|
||||||
|
import io.metersphere.system.uid.UUID;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import io.metersphere.sdk.uid.UUID;
|
|
||||||
|
|
||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
|
|
|
@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci
|
||||||
# redis
|
# redis
|
||||||
embedded.redis.enabled=true
|
embedded.redis.enabled=true
|
||||||
# kafka
|
# kafka
|
||||||
embedded.kafka.enabled=false
|
embedded.kafka.enabled=true
|
||||||
# minio
|
# minio
|
||||||
embedded.minio.enabled=true
|
embedded.minio.enabled=true
|
|
@ -18,7 +18,16 @@
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
<artifactId>metersphere-sdk</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-system-setting</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-project-management</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package io.metersphere.bug.controller.result;
|
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 {
|
public enum BugMgtResultCode implements IResultCode {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.bug.service;
|
package io.metersphere.bug.service;
|
||||||
|
|
||||||
import io.metersphere.sdk.service.CleanupProjectResourceService;
|
import io.metersphere.system.service.CleanupProjectResourceService;
|
||||||
import io.metersphere.sdk.util.LogUtils;
|
import io.metersphere.sdk.util.LogUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||||
MinioProperties.class
|
MinioProperties.class
|
||||||
})
|
})
|
||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.bug"})
|
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.bug", "io.metersphere.system"})
|
||||||
public class Application {
|
public class Application {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(Application.class, args);
|
SpringApplication.run(Application.class, args);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.jayway.jsonpath.JsonPath;
|
||||||
import io.metersphere.bug.domain.Bug;
|
import io.metersphere.bug.domain.Bug;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
|
import io.metersphere.system.uid.UUID;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.junit.jupiter.api.MethodOrderer;
|
import org.junit.jupiter.api.MethodOrderer;
|
||||||
import org.junit.jupiter.api.Order;
|
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.MvcResult;
|
||||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||||
|
|
||||||
import io.metersphere.sdk.uid.UUID;
|
|
||||||
|
|
||||||
|
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci
|
||||||
# redis
|
# redis
|
||||||
embedded.redis.enabled=true
|
embedded.redis.enabled=true
|
||||||
# kafka
|
# kafka
|
||||||
embedded.kafka.enabled=false
|
embedded.kafka.enabled=true
|
||||||
# minio
|
# minio
|
||||||
embedded.minio.enabled=true
|
embedded.minio.enabled=true
|
|
@ -18,7 +18,16 @@
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
<artifactId>metersphere-sdk</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-system-setting</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-project-management</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.functional.service;
|
package io.metersphere.functional.service;
|
||||||
|
|
||||||
import io.metersphere.sdk.service.CleanupProjectResourceService;
|
import io.metersphere.system.service.CleanupProjectResourceService;
|
||||||
import io.metersphere.sdk.util.LogUtils;
|
import io.metersphere.sdk.util.LogUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||||
MinioProperties.class
|
MinioProperties.class
|
||||||
})
|
})
|
||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.functional"})
|
@ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.functional", "io.metersphere.system"})
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -8,6 +8,6 @@ embedded.mysql.collation=utf8mb4_general_ci
|
||||||
# redis
|
# redis
|
||||||
embedded.redis.enabled=true
|
embedded.redis.enabled=true
|
||||||
# kafka
|
# kafka
|
||||||
embedded.kafka.enabled=false
|
embedded.kafka.enabled=true
|
||||||
# minio
|
# minio
|
||||||
embedded.minio.enabled=true
|
embedded.minio.enabled=true
|
|
@ -18,7 +18,16 @@
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
<artifactId>metersphere-sdk</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-system-setting</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.metersphere</groupId>
|
||||||
|
<artifactId>metersphere-project-management</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.metersphere</groupId>
|
<groupId>io.metersphere</groupId>
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
<artifactId>metersphere-system-setting</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<classifier>tests</classifier>
|
<classifier>tests</classifier>
|
||||||
<type>test-jar</type>
|
<type>test-jar</type>
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.metersphere.project.controller;
|
||||||
|
|
||||||
import io.metersphere.project.dto.MessageTaskDTO;
|
import io.metersphere.project.dto.MessageTaskDTO;
|
||||||
import io.metersphere.project.service.NoticeMessageTaskService;
|
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.dto.request.MessageTaskRequest;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.validation.groups.Created;
|
import io.metersphere.validation.groups.Created;
|
||||||
|
|
|
@ -5,8 +5,8 @@ import io.metersphere.project.request.ProjectApplicationRequest;
|
||||||
import io.metersphere.project.service.ProjectApplicationService;
|
import io.metersphere.project.service.ProjectApplicationService;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.OptionDTO;
|
import io.metersphere.sdk.dto.OptionDTO;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.domain.User;
|
import io.metersphere.system.domain.User;
|
||||||
import io.metersphere.validation.groups.Updated;
|
import io.metersphere.validation.groups.Updated;
|
||||||
|
|
|
@ -4,9 +4,9 @@ package io.metersphere.project.controller;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.log.service.OperationLogService;
|
import io.metersphere.system.log.service.OperationLogService;
|
||||||
import io.metersphere.sdk.log.vo.OperationLogRequest;
|
import io.metersphere.system.log.vo.OperationLogRequest;
|
||||||
import io.metersphere.sdk.log.vo.OperationLogResponse;
|
import io.metersphere.system.log.vo.OperationLogResponse;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -13,8 +13,8 @@ import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
||||||
import io.metersphere.sdk.dto.UserExtend;
|
import io.metersphere.sdk.dto.UserExtend;
|
||||||
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.project.enums.result;
|
package io.metersphere.project.enums.result;
|
||||||
|
|
||||||
import io.metersphere.sdk.controller.handler.result.IResultCode;
|
import io.metersphere.sdk.exception.IResultCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author guoyuqi
|
* @author guoyuqi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.project.job;
|
package io.metersphere.project.job;
|
||||||
|
|
||||||
import io.metersphere.sdk.sechedule.BaseScheduleJob;
|
import io.metersphere.system.sechedule.BaseScheduleJob;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.quartz.JobKey;
|
import org.quartz.JobKey;
|
||||||
import org.quartz.TriggerKey;
|
import org.quartz.TriggerKey;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<choose>
|
<choose>
|
||||||
<when test="key == 'roleIds'">
|
<when test="key == 'roleIds'">
|
||||||
and urr.role_id in
|
and urr.role_id in
|
||||||
<include refid="io.metersphere.sdk.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import io.metersphere.sdk.domain.ProjectParametersExample;
|
||||||
import io.metersphere.sdk.mapper.EnvironmentBlobMapper;
|
import io.metersphere.sdk.mapper.EnvironmentBlobMapper;
|
||||||
import io.metersphere.sdk.mapper.EnvironmentMapper;
|
import io.metersphere.sdk.mapper.EnvironmentMapper;
|
||||||
import io.metersphere.sdk.mapper.ProjectParametersMapper;
|
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 io.metersphere.sdk.util.LogUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package io.metersphere.project.service;
|
||||||
|
|
||||||
import io.metersphere.project.domain.ProjectRobotExample;
|
import io.metersphere.project.domain.ProjectRobotExample;
|
||||||
import io.metersphere.project.mapper.ProjectRobotMapper;
|
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 io.metersphere.sdk.util.LogUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -3,8 +3,8 @@ package io.metersphere.project.service;
|
||||||
import io.metersphere.project.domain.ProjectRobot;
|
import io.metersphere.project.domain.ProjectRobot;
|
||||||
import io.metersphere.project.enums.ProjectRobotPlatform;
|
import io.metersphere.project.enums.ProjectRobotPlatform;
|
||||||
import io.metersphere.project.mapper.ProjectRobotMapper;
|
import io.metersphere.project.mapper.ProjectRobotMapper;
|
||||||
import io.metersphere.sdk.service.CreateProjectResourceService;
|
import io.metersphere.system.service.CreateProjectResourceService;
|
||||||
import io.metersphere.sdk.uid.UUID;
|
import io.metersphere.system.uid.UUID;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@ import io.metersphere.project.mapper.MessageTaskBlobMapper;
|
||||||
import io.metersphere.project.mapper.MessageTaskMapper;
|
import io.metersphere.project.mapper.MessageTaskMapper;
|
||||||
import io.metersphere.project.mapper.ProjectMapper;
|
import io.metersphere.project.mapper.ProjectMapper;
|
||||||
import io.metersphere.project.mapper.ProjectRobotMapper;
|
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.dto.request.MessageTaskRequest;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
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.sdk.util.Translator;
|
||||||
import io.metersphere.system.domain.User;
|
import io.metersphere.system.domain.User;
|
||||||
import io.metersphere.system.domain.UserRoleRelation;
|
import io.metersphere.system.domain.UserRoleRelation;
|
||||||
|
|
|
@ -13,12 +13,12 @@ import io.metersphere.sdk.constants.ProjectApplicationType;
|
||||||
import io.metersphere.sdk.constants.ScheduleType;
|
import io.metersphere.sdk.constants.ScheduleType;
|
||||||
import io.metersphere.sdk.dto.LogDTO;
|
import io.metersphere.sdk.dto.LogDTO;
|
||||||
import io.metersphere.sdk.dto.OptionDTO;
|
import io.metersphere.sdk.dto.OptionDTO;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogModule;
|
import io.metersphere.system.log.constants.OperationLogModule;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.sechedule.BaseScheduleService;
|
import io.metersphere.system.sechedule.BaseScheduleService;
|
||||||
import io.metersphere.sdk.service.PluginLoadService;
|
import io.metersphere.system.service.PluginLoadService;
|
||||||
import io.metersphere.sdk.util.JSON;
|
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.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.domain.*;
|
import io.metersphere.system.domain.*;
|
||||||
import io.metersphere.system.mapper.ExtPluginMapper;
|
import io.metersphere.system.mapper.ExtPluginMapper;
|
||||||
|
|
|
@ -15,10 +15,10 @@ import io.metersphere.sdk.dto.LogDTO;
|
||||||
import io.metersphere.sdk.dto.OptionDTO;
|
import io.metersphere.sdk.dto.OptionDTO;
|
||||||
import io.metersphere.sdk.dto.UserExtend;
|
import io.metersphere.sdk.dto.UserExtend;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
import io.metersphere.sdk.exception.MSException;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogModule;
|
import io.metersphere.system.log.constants.OperationLogModule;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.log.service.OperationLogService;
|
import io.metersphere.system.log.service.OperationLogService;
|
||||||
import io.metersphere.sdk.uid.UUID;
|
import io.metersphere.system.uid.UUID;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.sdk.util.Translator;
|
import io.metersphere.sdk.util.Translator;
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.metersphere.sdk.uid.UUID;
|
import io.metersphere.system.uid.UUID;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
|
@ -10,7 +10,7 @@ import io.metersphere.sdk.dto.ProjectExtendDTO;
|
||||||
import io.metersphere.sdk.dto.SessionUser;
|
import io.metersphere.sdk.dto.SessionUser;
|
||||||
import io.metersphere.sdk.dto.UserDTO;
|
import io.metersphere.sdk.dto.UserDTO;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
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.BeanUtils;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -7,8 +7,8 @@ import io.metersphere.project.request.ProjectUserRoleMemberEditRequest;
|
||||||
import io.metersphere.sdk.constants.OperationLogConstants;
|
import io.metersphere.sdk.constants.OperationLogConstants;
|
||||||
import io.metersphere.sdk.dto.LogDTO;
|
import io.metersphere.sdk.dto.LogDTO;
|
||||||
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogModule;
|
import io.metersphere.system.log.constants.OperationLogModule;
|
||||||
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.JSON;
|
||||||
import io.metersphere.system.domain.UserRole;
|
import io.metersphere.system.domain.UserRole;
|
||||||
import io.metersphere.system.domain.UserRoleExample;
|
import io.metersphere.system.domain.UserRoleExample;
|
||||||
|
|
|
@ -11,8 +11,8 @@ import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
||||||
import io.metersphere.sdk.dto.UserExtend;
|
import io.metersphere.sdk.dto.UserExtend;
|
||||||
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
import io.metersphere.sdk.exception.MSException;
|
||||||
import io.metersphere.sdk.service.BaseUserRoleService;
|
import io.metersphere.system.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.BeanUtils;
|
||||||
import io.metersphere.sdk.util.Translator;
|
import io.metersphere.sdk.util.Translator;
|
||||||
import io.metersphere.system.domain.*;
|
import io.metersphere.system.domain.*;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package io.metersphere.project.controller;
|
package io.metersphere.project.controller;
|
||||||
|
|
||||||
import io.metersphere.project.service.CleanupEnvironmentResourceService;
|
import io.metersphere.project.service.CleanupEnvironmentResourceService;
|
||||||
import io.metersphere.sdk.invoker.ProjectServiceInvoker;
|
import io.metersphere.system.invoker.ProjectServiceInvoker;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.junit.jupiter.api.MethodOrderer;
|
import org.junit.jupiter.api.MethodOrderer;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
|
|
|
@ -3,11 +3,11 @@ package io.metersphere.project.controller;
|
||||||
import io.metersphere.project.domain.ProjectRobot;
|
import io.metersphere.project.domain.ProjectRobot;
|
||||||
import io.metersphere.project.request.ProjectRobotRequest;
|
import io.metersphere.project.request.ProjectRobotRequest;
|
||||||
import io.metersphere.project.service.CleanupRobotResourceService;
|
import io.metersphere.project.service.CleanupRobotResourceService;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
|
import io.metersphere.system.base.BaseTest;
|
||||||
|
import io.metersphere.system.controller.handler.ResultHolder;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
|
|
@ -2,12 +2,12 @@ package io.metersphere.project.controller;
|
||||||
|
|
||||||
import io.metersphere.project.domain.ProjectRobot;
|
import io.metersphere.project.domain.ProjectRobot;
|
||||||
import io.metersphere.project.request.ProjectRobotRequest;
|
import io.metersphere.project.request.ProjectRobotRequest;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
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.JSON;
|
||||||
import io.metersphere.sdk.util.Pager;
|
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.junit.jupiter.api.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.project.controller;
|
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.MethodOrderer;
|
||||||
import org.junit.jupiter.api.TestMethodOrder;
|
import org.junit.jupiter.api.TestMethodOrder;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package io.metersphere.project.controller;
|
package io.metersphere.project.controller;
|
||||||
|
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.constants.VariableTypeConstants;
|
import io.metersphere.sdk.constants.VariableTypeConstants;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.sdk.domain.ProjectParameters;
|
import io.metersphere.sdk.domain.ProjectParameters;
|
||||||
import io.metersphere.sdk.domain.ProjectParametersExample;
|
import io.metersphere.sdk.domain.ProjectParametersExample;
|
||||||
import io.metersphere.sdk.dto.environment.GlobalParamsDTO;
|
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.dto.environment.variables.CommonVariables;
|
||||||
import io.metersphere.sdk.mapper.ProjectParametersMapper;
|
import io.metersphere.sdk.mapper.ProjectParametersMapper;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
|
import io.metersphere.system.base.BaseTest;
|
||||||
|
import io.metersphere.system.controller.handler.ResultHolder;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
|
|
|
@ -5,12 +5,12 @@ import io.metersphere.project.domain.MessageTask;
|
||||||
import io.metersphere.project.domain.MessageTaskExample;
|
import io.metersphere.project.domain.MessageTaskExample;
|
||||||
import io.metersphere.project.dto.MessageTaskDTO;
|
import io.metersphere.project.dto.MessageTaskDTO;
|
||||||
import io.metersphere.project.mapper.MessageTaskMapper;
|
import io.metersphere.project.mapper.MessageTaskMapper;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.sdk.dto.request.MessageTaskRequest;
|
import io.metersphere.sdk.dto.request.MessageTaskRequest;
|
||||||
import io.metersphere.sdk.notice.constants.NoticeConstants;
|
|
||||||
import io.metersphere.sdk.util.JSON;
|
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 jakarta.annotation.Resource;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
|
|
@ -4,10 +4,10 @@ import io.metersphere.project.controller.param.ProjectApplicationDefinition;
|
||||||
import io.metersphere.project.controller.param.ProjectApplicationRequestDefinition;
|
import io.metersphere.project.controller.param.ProjectApplicationRequestDefinition;
|
||||||
import io.metersphere.project.domain.ProjectApplication;
|
import io.metersphere.project.domain.ProjectApplication;
|
||||||
import io.metersphere.project.request.ProjectApplicationRequest;
|
import io.metersphere.project.request.ProjectApplicationRequest;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.ProjectApplicationType;
|
import io.metersphere.sdk.constants.ProjectApplicationType;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.sdk.util.JSON;
|
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.domain.Plugin;
|
||||||
import io.metersphere.system.request.PluginUpdateRequest;
|
import io.metersphere.system.request.PluginUpdateRequest;
|
||||||
import io.metersphere.system.service.PluginService;
|
import io.metersphere.system.service.PluginService;
|
||||||
|
@ -323,7 +323,6 @@ public class ProjectApplicationControllerTests extends BaseTest {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ==========用例管理 start==========
|
* ==========用例管理 start==========
|
||||||
*/
|
*/
|
||||||
|
@ -384,6 +383,7 @@ public class ProjectApplicationControllerTests extends BaseTest {
|
||||||
// 返回请求正常
|
// 返回请求正常
|
||||||
Assertions.assertNotNull(resultHolder);
|
Assertions.assertNotNull(resultHolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ==========用例管理 start==========
|
* ==========用例管理 start==========
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,13 +5,13 @@ import io.metersphere.project.domain.Project;
|
||||||
import io.metersphere.project.domain.ProjectExample;
|
import io.metersphere.project.domain.ProjectExample;
|
||||||
import io.metersphere.project.mapper.ProjectMapper;
|
import io.metersphere.project.mapper.ProjectMapper;
|
||||||
import io.metersphere.project.request.ProjectSwitchRequest;
|
import io.metersphere.project.request.ProjectSwitchRequest;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.sdk.dto.ProjectExtendDTO;
|
import io.metersphere.sdk.dto.ProjectExtendDTO;
|
||||||
import io.metersphere.sdk.dto.UserDTO;
|
import io.metersphere.sdk.dto.UserDTO;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
|
import io.metersphere.system.base.BaseTest;
|
||||||
|
import io.metersphere.system.controller.handler.ResultHolder;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package io.metersphere.project.controller;
|
package io.metersphere.project.controller;
|
||||||
|
|
||||||
|
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
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.MethodOrderer;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -5,13 +5,13 @@ import io.metersphere.project.request.ProjectMemberAddRequest;
|
||||||
import io.metersphere.project.request.ProjectMemberBatchDeleteRequest;
|
import io.metersphere.project.request.ProjectMemberBatchDeleteRequest;
|
||||||
import io.metersphere.project.request.ProjectMemberEditRequest;
|
import io.metersphere.project.request.ProjectMemberEditRequest;
|
||||||
import io.metersphere.project.request.ProjectMemberRequest;
|
import io.metersphere.project.request.ProjectMemberRequest;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
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.JSON;
|
||||||
import io.metersphere.sdk.util.Pager;
|
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.apache.commons.lang3.StringUtils;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
|
|
|
@ -5,14 +5,12 @@ import io.metersphere.project.dto.ProjectRobotDTO;
|
||||||
import io.metersphere.project.enums.ProjectRobotPlatform;
|
import io.metersphere.project.enums.ProjectRobotPlatform;
|
||||||
import io.metersphere.project.enums.ProjectRobotType;
|
import io.metersphere.project.enums.ProjectRobotType;
|
||||||
import io.metersphere.project.request.ProjectRobotRequest;
|
import io.metersphere.project.request.ProjectRobotRequest;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
|
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.sdk.util.Pager;
|
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.apache.commons.lang3.StringUtils;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
|
@ -335,7 +333,8 @@ public class ProjectRobotControllerTests extends BaseTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ProjectRobot getResult(MvcResult mvcResult) throws UnsupportedEncodingException {
|
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);
|
ResultHolder resultHolder = JSON.parseObject(contentAsString, ResultHolder.class);
|
||||||
return JSON.parseObject(JSON.toJSONString(resultHolder.getData()), ProjectRobot.class);
|
return JSON.parseObject(JSON.toJSONString(resultHolder.getData()), ProjectRobot.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,17 +5,17 @@ import io.metersphere.project.request.ProjectUserRoleEditRequest;
|
||||||
import io.metersphere.project.request.ProjectUserRoleMemberEditRequest;
|
import io.metersphere.project.request.ProjectUserRoleMemberEditRequest;
|
||||||
import io.metersphere.project.request.ProjectUserRoleMemberRequest;
|
import io.metersphere.project.request.ProjectUserRoleMemberRequest;
|
||||||
import io.metersphere.project.request.ProjectUserRoleRequest;
|
import io.metersphere.project.request.ProjectUserRoleRequest;
|
||||||
import io.metersphere.sdk.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.InternalUserRole;
|
import io.metersphere.sdk.constants.InternalUserRole;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
||||||
import io.metersphere.sdk.service.BaseUserRolePermissionService;
|
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.sdk.util.Pager;
|
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.domain.User;
|
||||||
import io.metersphere.system.request.OrganizationUserRoleEditRequest;
|
import io.metersphere.system.request.OrganizationUserRoleEditRequest;
|
||||||
|
import io.metersphere.system.service.BaseUserRolePermissionService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -36,7 +36,7 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
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 io.metersphere.system.controller.result.SystemResultCode.NO_PROJECT_USER_ROLE_PERMISSION;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
||||||
|
|
||||||
|
|
|
@ -18,18 +18,21 @@
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
<artifactId>metersphere-sdk</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>io.metersphere</groupId>
|
|
||||||
<artifactId>metersphere-sdk</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
<classifier>tests</classifier>
|
|
||||||
<type>test-jar</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>test-jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
|
|
@ -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.CommonBeanFactory;
|
||||||
import io.metersphere.sdk.util.Translator;
|
import io.metersphere.sdk.util.Translator;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
import org.springdoc.core.models.GroupedOpenApi;
|
import org.springdoc.core.models.GroupedOpenApi;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
|
@ -1,10 +1,10 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
import com.fit2cloud.quartz.anno.QuartzDataSource;
|
import com.fit2cloud.quartz.anno.QuartzDataSource;
|
||||||
import com.github.pagehelper.PageInterceptor;
|
import com.github.pagehelper.PageInterceptor;
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
import io.metersphere.sdk.interceptor.MybatisInterceptor;
|
import io.metersphere.system.interceptor.MybatisInterceptor;
|
||||||
import io.metersphere.sdk.interceptor.UserDesensitizationInterceptor;
|
import io.metersphere.system.interceptor.UserDesensitizationInterceptor;
|
||||||
import io.metersphere.sdk.util.MybatisInterceptorConfig;
|
import io.metersphere.sdk.util.MybatisInterceptorConfig;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
|
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
|
@ -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.FileCenter;
|
||||||
import io.metersphere.sdk.file.FileRepository;
|
import io.metersphere.sdk.file.FileRepository;
|
||||||
import io.metersphere.sdk.file.FileRequest;
|
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.RsaKey;
|
||||||
import io.metersphere.sdk.util.RsaUtil;
|
import io.metersphere.sdk.util.RsaUtil;
|
||||||
import org.apache.commons.lang3.SerializationUtils;
|
import org.apache.commons.lang3.SerializationUtils;
|
|
@ -1,7 +1,7 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
import io.metersphere.sdk.sechedule.BaseScheduleService;
|
import io.metersphere.system.sechedule.BaseScheduleService;
|
||||||
import io.metersphere.sdk.sechedule.ScheduleManager;
|
import io.metersphere.system.sechedule.ScheduleManager;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
|
|
||||||
import com.fit2cloud.quartz.anno.QuartzScheduled;
|
import com.fit2cloud.quartz.anno.QuartzScheduled;
|
|
@ -1,11 +1,11 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
|
|
||||||
import io.metersphere.sdk.security.ApiKeyFilter;
|
import io.metersphere.system.security.ApiKeyFilter;
|
||||||
import io.metersphere.sdk.security.CsrfFilter;
|
import io.metersphere.system.security.CsrfFilter;
|
||||||
import io.metersphere.sdk.security.MsPermissionAnnotationMethodInterceptor;
|
import io.metersphere.system.security.MsPermissionAnnotationMethodInterceptor;
|
||||||
import io.metersphere.sdk.security.TotpFilter;
|
import io.metersphere.system.security.TotpFilter;
|
||||||
import io.metersphere.sdk.security.realm.LocalRealm;
|
import io.metersphere.system.security.realm.LocalRealm;
|
||||||
import io.metersphere.sdk.util.FilterChainUtils;
|
import io.metersphere.sdk.util.FilterChainUtils;
|
||||||
import jakarta.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
import jakarta.servlet.Filter;
|
import jakarta.servlet.Filter;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config;
|
package io.metersphere.system.config;
|
||||||
|
|
||||||
import com.bastiaanjansen.otp.HMACAlgorithm;
|
import com.bastiaanjansen.otp.HMACAlgorithm;
|
||||||
import com.bastiaanjansen.otp.TOTPGenerator;
|
import com.bastiaanjansen.otp.TOTPGenerator;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config.interceptor;
|
package io.metersphere.system.config.interceptor;
|
||||||
|
|
||||||
import io.metersphere.api.domain.*;
|
import io.metersphere.api.domain.*;
|
||||||
import io.metersphere.sdk.util.CompressUtils;
|
import io.metersphere.sdk.util.CompressUtils;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config.interceptor;
|
package io.metersphere.system.config.interceptor;
|
||||||
|
|
||||||
import io.metersphere.load.domain.*;
|
import io.metersphere.load.domain.*;
|
||||||
import io.metersphere.sdk.util.CompressUtils;
|
import io.metersphere.sdk.util.CompressUtils;
|
|
@ -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.CustomFunctionBlob;
|
||||||
import io.metersphere.project.domain.FileMetadataBlob;
|
import io.metersphere.project.domain.FileMetadataBlob;
|
|
@ -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.domain.OperationLogBlob;
|
||||||
import io.metersphere.sdk.util.CompressUtils;
|
import io.metersphere.sdk.util.CompressUtils;
|
|
@ -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.CompressUtils;
|
||||||
import io.metersphere.sdk.util.MybatisInterceptorConfig;
|
import io.metersphere.sdk.util.MybatisInterceptorConfig;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.config.interceptor;
|
package io.metersphere.system.config.interceptor;
|
||||||
|
|
||||||
import io.metersphere.load.domain.*;
|
import io.metersphere.load.domain.*;
|
||||||
import io.metersphere.sdk.util.CompressUtils;
|
import io.metersphere.sdk.util.CompressUtils;
|
|
@ -4,11 +4,11 @@ import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.BasePageRequest;
|
import io.metersphere.sdk.dto.BasePageRequest;
|
||||||
import io.metersphere.sdk.ldap.service.LdapService;
|
import io.metersphere.system.ldap.service.LdapService;
|
||||||
import io.metersphere.sdk.ldap.vo.LdapLoginRequest;
|
import io.metersphere.system.ldap.vo.LdapLoginRequest;
|
||||||
import io.metersphere.sdk.ldap.vo.LdapRequest;
|
import io.metersphere.system.ldap.vo.LdapRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.system.domain.AuthSource;
|
import io.metersphere.system.domain.AuthSource;
|
||||||
|
|
|
@ -4,8 +4,8 @@ import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
||||||
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
||||||
import io.metersphere.sdk.dto.request.UserRoleUpdateRequest;
|
import io.metersphere.sdk.dto.request.UserRoleUpdateRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.domain.UserRole;
|
import io.metersphere.system.domain.UserRole;
|
||||||
|
|
|
@ -6,8 +6,8 @@ import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.UserExcludeOptionDTO;
|
import io.metersphere.sdk.dto.UserExcludeOptionDTO;
|
||||||
import io.metersphere.sdk.dto.UserRoleRelationUserDTO;
|
import io.metersphere.sdk.dto.UserRoleRelationUserDTO;
|
||||||
import io.metersphere.sdk.dto.request.GlobalUserRoleRelationUpdateRequest;
|
import io.metersphere.sdk.dto.request.GlobalUserRoleRelationUpdateRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package io.metersphere.sdk.controller;
|
package io.metersphere.system.controller;
|
||||||
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.LicenseDTO;
|
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.CommonBeanFactory;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
|
@ -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.HttpMethodConstants;
|
||||||
import io.metersphere.sdk.constants.UserSource;
|
import io.metersphere.sdk.constants.UserSource;
|
||||||
import io.metersphere.sdk.controller.handler.ResultHolder;
|
import io.metersphere.system.controller.handler.ResultHolder;
|
||||||
import io.metersphere.sdk.controller.handler.result.MsHttpResultCode;
|
import io.metersphere.system.controller.handler.result.MsHttpResultCode;
|
||||||
import io.metersphere.sdk.dto.LoginRequest;
|
import io.metersphere.sdk.dto.LoginRequest;
|
||||||
import io.metersphere.sdk.dto.SessionUser;
|
import io.metersphere.sdk.dto.SessionUser;
|
||||||
import io.metersphere.sdk.dto.UserDTO;
|
import io.metersphere.sdk.dto.UserDTO;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
import io.metersphere.sdk.exception.MSException;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.service.BaseUserService;
|
import io.metersphere.system.service.BaseUserService;
|
||||||
import io.metersphere.sdk.util.RsaKey;
|
import io.metersphere.sdk.util.RsaKey;
|
||||||
import io.metersphere.sdk.util.RsaUtil;
|
import io.metersphere.sdk.util.RsaUtil;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.controller;
|
package io.metersphere.system.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
|
@ -6,7 +6,7 @@ import com.github.pagehelper.PageHelper;
|
||||||
|
|
||||||
import io.metersphere.project.domain.Notification;
|
import io.metersphere.project.domain.Notification;
|
||||||
import io.metersphere.sdk.dto.request.NotificationRequest;
|
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.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
|
@ -4,9 +4,9 @@ package io.metersphere.system.controller;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.log.service.OperationLogService;
|
import io.metersphere.system.log.service.OperationLogService;
|
||||||
import io.metersphere.sdk.log.vo.OperationLogRequest;
|
import io.metersphere.system.log.vo.OperationLogRequest;
|
||||||
import io.metersphere.sdk.log.vo.OperationLogResponse;
|
import io.metersphere.system.log.vo.OperationLogResponse;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.system.domain.User;
|
import io.metersphere.system.domain.User;
|
||||||
|
|
|
@ -4,8 +4,8 @@ import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.OptionDTO;
|
import io.metersphere.sdk.dto.OptionDTO;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -4,8 +4,8 @@ package io.metersphere.system.controller;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.CustomFieldDTO;
|
import io.metersphere.sdk.dto.CustomFieldDTO;
|
||||||
import io.metersphere.sdk.dto.request.CustomFieldUpdateRequest;
|
import io.metersphere.sdk.dto.request.CustomFieldUpdateRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.domain.CustomField;
|
import io.metersphere.system.domain.CustomField;
|
||||||
|
|
|
@ -4,9 +4,9 @@ package io.metersphere.system.controller;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.log.service.OperationLogService;
|
import io.metersphere.system.log.service.OperationLogService;
|
||||||
import io.metersphere.sdk.log.vo.OperationLogRequest;
|
import io.metersphere.system.log.vo.OperationLogRequest;
|
||||||
import io.metersphere.sdk.log.vo.OperationLogResponse;
|
import io.metersphere.system.log.vo.OperationLogResponse;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -6,8 +6,8 @@ import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.project.domain.Project;
|
import io.metersphere.project.domain.Project;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.*;
|
import io.metersphere.sdk.dto.*;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -3,8 +3,8 @@ package io.metersphere.system.controller;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.TemplateDTO;
|
import io.metersphere.sdk.dto.TemplateDTO;
|
||||||
import io.metersphere.sdk.dto.request.TemplateUpdateRequest;
|
import io.metersphere.sdk.dto.request.TemplateUpdateRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.domain.Template;
|
import io.metersphere.system.domain.Template;
|
||||||
|
|
|
@ -5,8 +5,8 @@ import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
import io.metersphere.sdk.dto.PermissionDefinitionItem;
|
||||||
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
import io.metersphere.sdk.dto.request.PermissionSettingUpdateRequest;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package io.metersphere.system.controller;
|
package io.metersphere.system.controller;
|
||||||
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.domain.Plugin;
|
import io.metersphere.system.domain.Plugin;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package io.metersphere.system.controller;
|
package io.metersphere.system.controller;
|
||||||
|
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.system.domain.ServiceIntegration;
|
import io.metersphere.system.domain.ServiceIntegration;
|
||||||
import io.metersphere.system.dto.ServiceIntegrationDTO;
|
import io.metersphere.system.dto.ServiceIntegrationDTO;
|
||||||
import io.metersphere.system.request.ServiceIntegrationUpdateRequest;
|
import io.metersphere.system.request.ServiceIntegrationUpdateRequest;
|
||||||
|
|
|
@ -4,9 +4,9 @@ package io.metersphere.system.controller;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.BaseSystemConfigDTO;
|
import io.metersphere.sdk.dto.BaseSystemConfigDTO;
|
||||||
import io.metersphere.sdk.dto.EMailInfoDto;
|
import io.metersphere.sdk.dto.EMailInfoDto;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.service.SystemParameterService;
|
import io.metersphere.system.service.SystemParameterService;
|
||||||
import io.metersphere.system.domain.SystemParameter;
|
import io.metersphere.system.domain.SystemParameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
|
|
@ -6,8 +6,8 @@ import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.project.domain.Project;
|
import io.metersphere.project.domain.Project;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.*;
|
import io.metersphere.sdk.dto.*;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -7,9 +7,9 @@ import io.metersphere.sdk.dto.QueryResourcePoolRequest;
|
||||||
import io.metersphere.sdk.dto.TestResourcePoolDTO;
|
import io.metersphere.sdk.dto.TestResourcePoolDTO;
|
||||||
import io.metersphere.sdk.dto.TestResourcePoolRequest;
|
import io.metersphere.sdk.dto.TestResourcePoolRequest;
|
||||||
import io.metersphere.sdk.dto.TestResourcePoolReturnDTO;
|
import io.metersphere.sdk.dto.TestResourcePoolReturnDTO;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.service.TestResourcePoolService;
|
import io.metersphere.system.service.TestResourcePoolService;
|
||||||
import io.metersphere.sdk.util.BeanUtils;
|
import io.metersphere.sdk.util.BeanUtils;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
|
|
|
@ -7,8 +7,8 @@ import io.metersphere.project.domain.Project;
|
||||||
import io.metersphere.sdk.constants.PermissionConstants;
|
import io.metersphere.sdk.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.constants.UserSource;
|
import io.metersphere.sdk.constants.UserSource;
|
||||||
import io.metersphere.sdk.dto.*;
|
import io.metersphere.sdk.dto.*;
|
||||||
import io.metersphere.sdk.log.annotation.Log;
|
import io.metersphere.system.log.annotation.Log;
|
||||||
import io.metersphere.sdk.log.constants.OperationLogType;
|
import io.metersphere.system.log.constants.OperationLogType;
|
||||||
import io.metersphere.sdk.util.PageUtils;
|
import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
|
|
|
@ -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.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.domain.Environment;
|
import io.metersphere.sdk.domain.Environment;
|
||||||
import io.metersphere.sdk.dto.OptionDTO;
|
import io.metersphere.sdk.dto.OptionDTO;
|
||||||
import io.metersphere.sdk.dto.environment.EnvironmentConfigRequest;
|
import io.metersphere.sdk.dto.environment.EnvironmentConfigRequest;
|
||||||
import io.metersphere.sdk.dto.environment.dataSource.DataSource;
|
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.sdk.util.SessionUtils;
|
||||||
import io.metersphere.validation.groups.Created;
|
import io.metersphere.validation.groups.Created;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
|
@ -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.constants.PermissionConstants;
|
||||||
import io.metersphere.sdk.dto.environment.GlobalParamsRequest;
|
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.sdk.util.SessionUtils;
|
||||||
import io.metersphere.validation.groups.Created;
|
import io.metersphere.validation.groups.Created;
|
||||||
import io.metersphere.validation.groups.Updated;
|
import io.metersphere.validation.groups.Updated;
|
|
@ -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.exception.IResultCode;
|
||||||
import io.metersphere.sdk.controller.handler.result.MsHttpResultCode;
|
import io.metersphere.system.controller.handler.result.MsHttpResultCode;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
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 io.metersphere.sdk.util.Translator;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
|
@ -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;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
|
@ -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 io.metersphere.sdk.util.JSON;
|
||||||
import org.springframework.core.MethodParameter;
|
import org.springframework.core.MethodParameter;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
|
@ -1,4 +1,4 @@
|
||||||
package io.metersphere.sdk.controller.handler.annotation;
|
package io.metersphere.system.controller.handler.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
package io.metersphere.sdk.controller.handler.result;
|
package io.metersphere.system.controller.handler.result;
|
||||||
|
|
||||||
|
import io.metersphere.sdk.exception.IResultCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用功能状态码
|
* 通用功能状态码
|
|
@ -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 含义的状态码
|
* 具有 Http 含义的状态码
|
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.system.controller.result;
|
package io.metersphere.system.controller.result;
|
||||||
|
|
||||||
import io.metersphere.sdk.controller.handler.result.IResultCode;
|
import io.metersphere.sdk.exception.IResultCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jianxing
|
* @author jianxing
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue