✨ 添加演示模式.
This commit is contained in:
@@ -55,6 +55,7 @@
|
|||||||
|
|
||||||
⭐ 体验后可以点一下 `star` 这对我很重要!
|
⭐ 体验后可以点一下 `star` 这对我很重要!
|
||||||
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
||||||
|
[github](https://github.com/lijiahangmax/orion-visor) [gitee](https://gitee.com/lijiahangmax/orion-visor)
|
||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ services:
|
|||||||
- REDIS_HOST=orion-visor-redis
|
- REDIS_HOST=orion-visor-redis
|
||||||
- REDIS_PASSWORD=Data@123456
|
- REDIS_PASSWORD=Data@123456
|
||||||
- SECRET_KEY=uQeacXV8b3isvKLK
|
- SECRET_KEY=uQeacXV8b3isvKLK
|
||||||
- PREVIEW=false
|
- DEMO_MODE=false
|
||||||
volumes:
|
volumes:
|
||||||
- /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion:/root/orion
|
- /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion:/root/orion
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
#/bin/bash
|
#/bin/bash
|
||||||
docker compose down
|
docker compose down
|
||||||
sh ./pull.sh
|
sh ./pull.sh
|
||||||
|
# demo 启动
|
||||||
|
if [ "$1" == "demo" ]; then
|
||||||
|
sed -i 's/DEMO_MODE=false/DEMO_MODE=true/g' docker-compose.yml
|
||||||
|
fi
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ FROM nginx:alpine
|
|||||||
USER root
|
USER root
|
||||||
RUN \
|
RUN \
|
||||||
echo "" > /etc/apk/repositories && \
|
echo "" > /etc/apk/repositories && \
|
||||||
echo "http://mirrors.aliyun.com/alpine/v3.8/main" >> /etc/apk/repositories &&\
|
echo "http://mirrors.aliyun.com/alpine/v3.8/main" >> /etc/apk/repositories && \
|
||||||
echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories && \
|
echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories && \
|
||||||
apk update
|
apk update
|
||||||
RUN apk add openjdk8
|
RUN apk add openjdk8
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ version=2.0.2
|
|||||||
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
|
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
|
||||||
mv ../../orion-visor-ui/dist ./dist
|
mv ../../orion-visor-ui/dist ./dist
|
||||||
docker build -t orion-visor-service:${version} .
|
docker build -t orion-visor-service:${version} .
|
||||||
rm -f ./orion-visor-launch.jar
|
rm -rf ./orion-visor-launch.jar
|
||||||
rm -rf ./dist
|
rm -rf ./dist
|
||||||
docker tag orion-visor-service:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}
|
docker tag orion-visor-service:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}
|
||||||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}
|
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
|
|
||||||
⭐ 体验后可以点一下 `star` 这对我很重要!
|
⭐ 体验后可以点一下 `star` 这对我很重要!
|
||||||
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
||||||
|
[github](https://github.com/lijiahangmax/orion-visor) [gitee](https://gitee.com/lijiahangmax/orion-visor)
|
||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
### v2.0.2
|
### v2.0.2
|
||||||
|
|
||||||
* ⭐ 添加预览模式
|
* 🐞 修复 资产授权密钥时间显示错误
|
||||||
|
* 🌈 添加 演示模式
|
||||||
* ⭐ 支持 Chrome PWA
|
* ⭐ 支持 Chrome PWA
|
||||||
|
|
||||||
`2024-05-2` `release`
|
`2024-05-2` `release`
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.orion.visor.framework.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bean 排序常量
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 2023/6/29 16:09
|
||||||
|
*/
|
||||||
|
public interface BeanOrderConst {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公共返回值包装处理器
|
||||||
|
*/
|
||||||
|
int RESPONSE_ADVICE_WRAPPER = Integer.MIN_VALUE + 1000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演示模式切面
|
||||||
|
*/
|
||||||
|
int DEMO_DISABLE_API_ASPECT = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日志切面
|
||||||
|
*/
|
||||||
|
int OPERATOR_LOG_ASPECT = 30;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -86,7 +86,7 @@ public enum ErrorCode implements CodeInfo {
|
|||||||
|
|
||||||
UNSUPPOETED(915, "不支持此操作"),
|
UNSUPPOETED(915, "不支持此操作"),
|
||||||
|
|
||||||
PREVIEW_DISABLE_API(916, "预览模式不支持此功能"),
|
DEMO_DISABLE_API(916, "演示模式不支持此功能"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.orion.visor.framework.common.constant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结果增强器 排序常量
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023/6/29 16:09
|
|
||||||
*/
|
|
||||||
public interface ResponseAdviceOrderConst {
|
|
||||||
|
|
||||||
int WRAPPER = Integer.MIN_VALUE + 1000;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -11,6 +11,7 @@ import com.orion.visor.framework.biz.operator.log.core.model.OperatorType;
|
|||||||
import com.orion.visor.framework.biz.operator.log.core.service.OperatorLogFrameworkService;
|
import com.orion.visor.framework.biz.operator.log.core.service.OperatorLogFrameworkService;
|
||||||
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogFiller;
|
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogFiller;
|
||||||
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs;
|
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs;
|
||||||
|
import com.orion.visor.framework.common.constant.BeanOrderConst;
|
||||||
import com.orion.visor.framework.common.security.LoginUser;
|
import com.orion.visor.framework.common.security.LoginUser;
|
||||||
import com.orion.visor.framework.common.security.SecurityHolder;
|
import com.orion.visor.framework.common.security.SecurityHolder;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -18,6 +19,7 @@ import org.aspectj.lang.ProceedingJoinPoint;
|
|||||||
import org.aspectj.lang.annotation.Around;
|
import org.aspectj.lang.annotation.Around;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.reflect.MethodSignature;
|
import org.aspectj.lang.reflect.MethodSignature;
|
||||||
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestHeader;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
@@ -41,6 +43,7 @@ import java.util.concurrent.ExecutorService;
|
|||||||
*/
|
*/
|
||||||
@Aspect
|
@Aspect
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Order(BeanOrderConst.OPERATOR_LOG_ASPECT)
|
||||||
public class OperatorLogAspect {
|
public class OperatorLogAspect {
|
||||||
|
|
||||||
private static final ExecutorService LOG_SAVER = ExecutorBuilder.create()
|
private static final ExecutorService LOG_SAVER = ExecutorBuilder.create()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class ServerTemplate extends Template {
|
|||||||
table.bizPackage = bizPackage;
|
table.bizPackage = bizPackage;
|
||||||
table.enableUnitTest = true;
|
table.enableUnitTest = true;
|
||||||
table.enableOperatorLog = true;
|
table.enableOperatorLog = true;
|
||||||
table.enablePreviewApi = true;
|
table.enableDemoApi = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,12 +104,12 @@ public class ServerTemplate extends Template {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否生成预览 api 注解
|
* 是否生成演示模式 api 注解
|
||||||
*
|
*
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ServerTemplate disablePreviewApi() {
|
public ServerTemplate disableDemoApi() {
|
||||||
table.enablePreviewApi = false;
|
table.enableDemoApi = false;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ public class Table {
|
|||||||
protected boolean enableOperatorLog;
|
protected boolean enableOperatorLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否生成预览 api 注解
|
* 是否生成演示模式 api 注解
|
||||||
*/
|
*/
|
||||||
protected boolean enablePreviewApi;
|
protected boolean enableDemoApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存的 key
|
* 缓存的 key
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
#end
|
#end
|
||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
#if($meta.enablePreviewApi)
|
#if($meta.enableDemoApi)
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
#end
|
#end
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
@@ -54,8 +54,8 @@ public class ${table.controllerName} {
|
|||||||
@Resource
|
@Resource
|
||||||
private ${type}Service ${typeLower}Service;
|
private ${type}Service ${typeLower}Service;
|
||||||
|
|
||||||
#if($meta.enablePreviewApi)
|
#if($meta.enableDemoApi)
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
#end
|
#end
|
||||||
#if($meta.enableOperatorLog)
|
#if($meta.enableOperatorLog)
|
||||||
@OperatorLog(${type}OperatorType.CREATE)
|
@OperatorLog(${type}OperatorType.CREATE)
|
||||||
@@ -67,8 +67,8 @@ public class ${table.controllerName} {
|
|||||||
return ${typeLower}Service.create${type}(request);
|
return ${typeLower}Service.create${type}(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if($meta.enablePreviewApi)
|
#if($meta.enableDemoApi)
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
#end
|
#end
|
||||||
#if($meta.enableOperatorLog)
|
#if($meta.enableOperatorLog)
|
||||||
@OperatorLog(${type}OperatorType.UPDATE)
|
@OperatorLog(${type}OperatorType.UPDATE)
|
||||||
@@ -114,8 +114,8 @@ public class ${table.controllerName} {
|
|||||||
return ${typeLower}Service.get${type}Page(request);
|
return ${typeLower}Service.get${type}Page(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if($meta.enablePreviewApi)
|
#if($meta.enableDemoApi)
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
#end
|
#end
|
||||||
#if($meta.enableOperatorLog)
|
#if($meta.enableOperatorLog)
|
||||||
@OperatorLog(${type}OperatorType.DELETE)
|
@OperatorLog(${type}OperatorType.DELETE)
|
||||||
@@ -128,8 +128,8 @@ public class ${table.controllerName} {
|
|||||||
return ${typeLower}Service.delete${type}ById(id);
|
return ${typeLower}Service.delete${type}ById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if($meta.enablePreviewApi)
|
#if($meta.enableDemoApi)
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
#end
|
#end
|
||||||
#if($meta.enableOperatorLog)
|
#if($meta.enableOperatorLog)
|
||||||
@OperatorLog(${type}OperatorType.DELETE)
|
@OperatorLog(${type}OperatorType.DELETE)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.orion.lang.utils.collect.Lists;
|
|||||||
import com.orion.visor.framework.common.constant.AutoConfigureOrderConst;
|
import com.orion.visor.framework.common.constant.AutoConfigureOrderConst;
|
||||||
import com.orion.visor.framework.common.constant.FilterOrderConst;
|
import com.orion.visor.framework.common.constant.FilterOrderConst;
|
||||||
import com.orion.visor.framework.common.web.filter.FilterCreator;
|
import com.orion.visor.framework.common.web.filter.FilterCreator;
|
||||||
import com.orion.visor.framework.web.core.aspect.PreviewDisableApiAspect;
|
import com.orion.visor.framework.web.core.aspect.DemoDisableApiAspect;
|
||||||
import com.orion.visor.framework.web.core.filter.TraceIdFilter;
|
import com.orion.visor.framework.web.core.filter.TraceIdFilter;
|
||||||
import com.orion.visor.framework.web.core.handler.GlobalExceptionHandler;
|
import com.orion.visor.framework.web.core.handler.GlobalExceptionHandler;
|
||||||
import com.orion.visor.framework.web.core.handler.WrapperResultHandler;
|
import com.orion.visor.framework.web.core.handler.WrapperResultHandler;
|
||||||
@@ -141,12 +141,12 @@ public class OrionWebAutoConfiguration implements WebMvcConfigurer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return 预览模式禁用 api 切面
|
* @return 演示模式禁用 api 切面
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(value = "orion.preview", havingValue = "true")
|
@ConditionalOnProperty(value = "orion.demo", havingValue = "true")
|
||||||
public PreviewDisableApiAspect previewDisableApiAspect() {
|
public DemoDisableApiAspect demoDisableApiAspect() {
|
||||||
return new PreviewDisableApiAspect();
|
return new DemoDisableApiAspect();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.orion.visor.framework.web.core.annotation;
|
|||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预览禁用 api
|
* 演示模式禁用 api
|
||||||
*
|
*
|
||||||
* @author Jiahang Li
|
* @author Jiahang Li
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
@@ -12,5 +12,5 @@ import java.lang.annotation.*;
|
|||||||
@Target({ElementType.METHOD})
|
@Target({ElementType.METHOD})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
public @interface PreviewDisableApi {
|
public @interface DemoDisableApi {
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.orion.visor.framework.web.core.aspect;
|
||||||
|
|
||||||
|
import com.orion.visor.framework.common.constant.BeanOrderConst;
|
||||||
|
import com.orion.visor.framework.common.constant.ErrorCode;
|
||||||
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.annotation.Before;
|
||||||
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.springframework.core.annotation.Order;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演示模式禁用 api 切面
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 2024/5/21 16:52
|
||||||
|
*/
|
||||||
|
@Aspect
|
||||||
|
@Slf4j
|
||||||
|
@Order(BeanOrderConst.DEMO_DISABLE_API_ASPECT)
|
||||||
|
public class DemoDisableApiAspect {
|
||||||
|
|
||||||
|
public DemoDisableApiAspect() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Pointcut("@annotation(e)")
|
||||||
|
public void disableApi(DemoDisableApi e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before(value = "disableApi(e)", argNames = "e")
|
||||||
|
public void beforeDisableApi(DemoDisableApi e) {
|
||||||
|
throw ErrorCode.DEMO_DISABLE_API.exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package com.orion.visor.framework.web.core.aspect;
|
|
||||||
|
|
||||||
import com.orion.visor.framework.common.constant.ErrorCode;
|
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
|
||||||
import org.aspectj.lang.annotation.Around;
|
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预览禁用 api 切面
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2024/5/21 16:52
|
|
||||||
*/
|
|
||||||
@Aspect
|
|
||||||
@Slf4j
|
|
||||||
public class PreviewDisableApiAspect {
|
|
||||||
|
|
||||||
public PreviewDisableApiAspect() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Around("@annotation(o)")
|
|
||||||
public Object around(ProceedingJoinPoint joinPoint, PreviewDisableApi o) {
|
|
||||||
throw ErrorCode.PREVIEW_DISABLE_API.exception();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ package com.orion.visor.framework.web.core.handler;
|
|||||||
import com.orion.lang.constant.StandardContentType;
|
import com.orion.lang.constant.StandardContentType;
|
||||||
import com.orion.lang.define.wrapper.HttpWrapper;
|
import com.orion.lang.define.wrapper.HttpWrapper;
|
||||||
import com.orion.lang.define.wrapper.RpcWrapper;
|
import com.orion.lang.define.wrapper.RpcWrapper;
|
||||||
import com.orion.visor.framework.common.constant.ResponseAdviceOrderConst;
|
import com.orion.visor.framework.common.constant.BeanOrderConst;
|
||||||
import com.orion.visor.framework.web.core.annotation.IgnoreWrapper;
|
import com.orion.visor.framework.web.core.annotation.IgnoreWrapper;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -23,7 +23,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
|||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @since 2023/6/15 17:38
|
* @since 2023/6/15 17:38
|
||||||
*/
|
*/
|
||||||
@Order(ResponseAdviceOrderConst.WRAPPER)
|
@Order(BeanOrderConst.RESPONSE_ADVICE_WRAPPER)
|
||||||
@ControllerAdvice
|
@ControllerAdvice
|
||||||
public class WrapperResultHandler implements ResponseBodyAdvice<Object> {
|
public class WrapperResultHandler implements ResponseBodyAdvice<Object> {
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
"description": "项目版本."
|
"description": "项目版本."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "orion.preview",
|
"name": "orion.demo",
|
||||||
"type": "java.lang.Boolean",
|
"type": "java.lang.Boolean",
|
||||||
"description": "是否为预览模式.",
|
"description": "是否为演示模式.",
|
||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/orion_visor?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai&autoReconnect=true
|
url: jdbc:mysql://116.62.194.246:3306/orion_visor?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai&autoReconnect=true
|
||||||
username: root
|
username: root
|
||||||
password: Data@123456
|
password: LjhData@123456
|
||||||
initial-size: 0
|
initial-size: 0
|
||||||
min-idle: 1
|
min-idle: 1
|
||||||
max-active: 5
|
max-active: 5
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1
|
host: 116.62.194.246
|
||||||
port: 6379
|
port: 6379
|
||||||
password: Data@123456
|
password: Ljhlijiahang
|
||||||
redisson:
|
redisson:
|
||||||
threads: 2
|
threads: 2
|
||||||
netty-threads: 2
|
netty-threads: 2
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ knife4j:
|
|||||||
enable: false
|
enable: false
|
||||||
|
|
||||||
orion:
|
orion:
|
||||||
# 是否为预览模式
|
# 是否为演示模式
|
||||||
preview: ${PREVIEW:false}
|
demo: ${DEMO_MODE:false}
|
||||||
logging:
|
logging:
|
||||||
printer:
|
printer:
|
||||||
mode: ROW
|
mode: ROW
|
||||||
|
|||||||
@@ -190,8 +190,8 @@ app:
|
|||||||
orion:
|
orion:
|
||||||
# 版本
|
# 版本
|
||||||
version: @revision@
|
version: @revision@
|
||||||
# 是否为预览模式
|
# 是否为演示模式
|
||||||
preview: false
|
demo: false
|
||||||
api:
|
api:
|
||||||
# 公共 api 前缀
|
# 公共 api 前缀
|
||||||
prefix: /orion-visor/api
|
prefix: /orion-visor/api
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.orion.visor.module.asset.controller;
|
|||||||
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.asset.define.operator.HostOperatorType;
|
import com.orion.visor.module.asset.define.operator.HostOperatorType;
|
||||||
import com.orion.visor.module.asset.entity.request.host.HostConfigUpdateRequest;
|
import com.orion.visor.module.asset.entity.request.host.HostConfigUpdateRequest;
|
||||||
@@ -60,7 +60,7 @@ public class HostConfigController {
|
|||||||
return hostConfigService.getHostConfigList(hostId);
|
return hostConfigService.getHostConfigList(hostId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostOperatorType.UPDATE_CONFIG)
|
@OperatorLog(HostOperatorType.UPDATE_CONFIG)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新主机配置")
|
@Operation(summary = "更新主机配置")
|
||||||
@@ -69,7 +69,7 @@ public class HostConfigController {
|
|||||||
return hostConfigService.updateHostConfig(request);
|
return hostConfigService.updateHostConfig(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostOperatorType.UPDATE_CONFIG_STATUS)
|
@OperatorLog(HostOperatorType.UPDATE_CONFIG_STATUS)
|
||||||
@PutMapping("/update-status")
|
@PutMapping("/update-status")
|
||||||
@Operation(summary = "更新主机配置状态/动态初始化配置")
|
@Operation(summary = "更新主机配置状态/动态初始化配置")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.orion.visor.framework.common.validator.group.Id;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.asset.define.operator.HostConnectLogOperatorType;
|
import com.orion.visor.module.asset.define.operator.HostConnectLogOperatorType;
|
||||||
import com.orion.visor.module.asset.entity.request.host.HostConnectLogQueryRequest;
|
import com.orion.visor.module.asset.entity.request.host.HostConnectLogQueryRequest;
|
||||||
@@ -89,7 +89,7 @@ public class HostConnectLogController {
|
|||||||
return hostConnectLogService.clearHostConnectLog(request);
|
return hostConnectLogService.clearHostConnectLog(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostConnectLogOperatorType.FORCE_OFFLINE)
|
@OperatorLog(HostConnectLogOperatorType.FORCE_OFFLINE)
|
||||||
@PutMapping("/force-offline")
|
@PutMapping("/force-offline")
|
||||||
@Operation(summary = "强制断开主机连接")
|
@Operation(summary = "强制断开主机连接")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.asset.define.operator.HostOperatorType;
|
import com.orion.visor.module.asset.define.operator.HostOperatorType;
|
||||||
import com.orion.visor.module.asset.entity.request.host.HostCreateRequest;
|
import com.orion.visor.module.asset.entity.request.host.HostCreateRequest;
|
||||||
@@ -43,6 +43,7 @@ public class HostController {
|
|||||||
@Resource
|
@Resource
|
||||||
private HostService hostService;
|
private HostService hostService;
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostOperatorType.CREATE)
|
@OperatorLog(HostOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建主机")
|
@Operation(summary = "创建主机")
|
||||||
@@ -51,6 +52,7 @@ public class HostController {
|
|||||||
return hostService.createHost(request);
|
return hostService.createHost(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostOperatorType.UPDATE)
|
@OperatorLog(HostOperatorType.UPDATE)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "通过 id 更新主机")
|
@Operation(summary = "通过 id 更新主机")
|
||||||
@@ -84,7 +86,7 @@ public class HostController {
|
|||||||
return hostService.getHostPage(request);
|
return hostService.getHostPage(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostOperatorType.DELETE)
|
@OperatorLog(HostOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "通过 id 删除主机")
|
@Operation(summary = "通过 id 删除主机")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.orion.visor.module.asset.controller;
|
|||||||
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.asset.define.operator.HostGroupOperatorType;
|
import com.orion.visor.module.asset.define.operator.HostGroupOperatorType;
|
||||||
import com.orion.visor.module.asset.entity.request.host.HostGroupRelUpdateRequest;
|
import com.orion.visor.module.asset.entity.request.host.HostGroupRelUpdateRequest;
|
||||||
@@ -43,6 +43,7 @@ public class HostGroupController {
|
|||||||
@Resource
|
@Resource
|
||||||
private HostGroupService hostGroupService;
|
private HostGroupService hostGroupService;
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostGroupOperatorType.CREATE)
|
@OperatorLog(HostGroupOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建主机分组")
|
@Operation(summary = "创建主机分组")
|
||||||
@@ -59,6 +60,7 @@ public class HostGroupController {
|
|||||||
return hostGroupService.queryHostGroupTree();
|
return hostGroupService.queryHostGroupTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostGroupOperatorType.RENAME)
|
@OperatorLog(HostGroupOperatorType.RENAME)
|
||||||
@PutMapping("/rename")
|
@PutMapping("/rename")
|
||||||
@Operation(summary = "修改名称")
|
@Operation(summary = "修改名称")
|
||||||
@@ -67,6 +69,7 @@ public class HostGroupController {
|
|||||||
return hostGroupService.updateHostGroupName(request);
|
return hostGroupService.updateHostGroupName(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostGroupOperatorType.MOVE)
|
@OperatorLog(HostGroupOperatorType.MOVE)
|
||||||
@PutMapping("/move")
|
@PutMapping("/move")
|
||||||
@Operation(summary = "移动位置")
|
@Operation(summary = "移动位置")
|
||||||
@@ -75,7 +78,7 @@ public class HostGroupController {
|
|||||||
return hostGroupService.moveHostGroup(request);
|
return hostGroupService.moveHostGroup(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostGroupOperatorType.DELETE)
|
@OperatorLog(HostGroupOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除主机分组")
|
@Operation(summary = "删除主机分组")
|
||||||
@@ -93,6 +96,7 @@ public class HostGroupController {
|
|||||||
return hostGroupService.queryHostGroupRel(groupId);
|
return hostGroupService.queryHostGroupRel(groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostGroupOperatorType.UPDATE_REL)
|
@OperatorLog(HostGroupOperatorType.UPDATE_REL)
|
||||||
@PutMapping("/update-rel")
|
@PutMapping("/update-rel")
|
||||||
@Operation(summary = "修改分组内主机")
|
@Operation(summary = "修改分组内主机")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.asset.define.operator.HostIdentityOperatorType;
|
import com.orion.visor.module.asset.define.operator.HostIdentityOperatorType;
|
||||||
import com.orion.visor.module.asset.entity.request.host.HostIdentityCreateRequest;
|
import com.orion.visor.module.asset.entity.request.host.HostIdentityCreateRequest;
|
||||||
@@ -43,6 +43,7 @@ public class HostIdentityController {
|
|||||||
@Resource
|
@Resource
|
||||||
private HostIdentityService hostIdentityService;
|
private HostIdentityService hostIdentityService;
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostIdentityOperatorType.CREATE)
|
@OperatorLog(HostIdentityOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建主机身份")
|
@Operation(summary = "创建主机身份")
|
||||||
@@ -51,7 +52,7 @@ public class HostIdentityController {
|
|||||||
return hostIdentityService.createHostIdentity(request);
|
return hostIdentityService.createHostIdentity(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostIdentityOperatorType.UPDATE)
|
@OperatorLog(HostIdentityOperatorType.UPDATE)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "通过 id 更新主机身份")
|
@Operation(summary = "通过 id 更新主机身份")
|
||||||
@@ -86,7 +87,7 @@ public class HostIdentityController {
|
|||||||
return hostIdentityService.getHostIdentityPage(request);
|
return hostIdentityService.getHostIdentityPage(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(HostIdentityOperatorType.DELETE)
|
@OperatorLog(HostIdentityOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "通过 id 删除主机身份")
|
@Operation(summary = "通过 id 删除主机身份")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.asset.define.operator.HostKeyOperatorType;
|
import com.orion.visor.module.asset.define.operator.HostKeyOperatorType;
|
||||||
import com.orion.visor.module.asset.entity.request.host.HostKeyCreateRequest;
|
import com.orion.visor.module.asset.entity.request.host.HostKeyCreateRequest;
|
||||||
@@ -42,6 +43,7 @@ public class HostKeyController {
|
|||||||
@Resource
|
@Resource
|
||||||
private HostKeyService hostKeyService;
|
private HostKeyService hostKeyService;
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostKeyOperatorType.CREATE)
|
@OperatorLog(HostKeyOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建主机密钥")
|
@Operation(summary = "创建主机密钥")
|
||||||
@@ -50,6 +52,7 @@ public class HostKeyController {
|
|||||||
return hostKeyService.createHostKey(request);
|
return hostKeyService.createHostKey(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostKeyOperatorType.UPDATE)
|
@OperatorLog(HostKeyOperatorType.UPDATE)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "通过 id 更新主机密钥")
|
@Operation(summary = "通过 id 更新主机密钥")
|
||||||
@@ -83,6 +86,7 @@ public class HostKeyController {
|
|||||||
return hostKeyService.getHostKeyPage(request);
|
return hostKeyService.getHostKeyPage(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DemoDisableApi
|
||||||
@OperatorLog(HostKeyOperatorType.DELETE)
|
@OperatorLog(HostKeyOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "通过 id 删除主机密钥")
|
@Operation(summary = "通过 id 删除主机密钥")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.orion.lang.define.wrapper.DataGrid;
|
|||||||
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.infra.define.operator.DictKeyOperatorType;
|
import com.orion.visor.module.infra.define.operator.DictKeyOperatorType;
|
||||||
import com.orion.visor.module.infra.entity.request.dict.DictKeyCreateRequest;
|
import com.orion.visor.module.infra.entity.request.dict.DictKeyCreateRequest;
|
||||||
@@ -42,7 +42,7 @@ public class DictKeyController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DictKeyService dictKeyService;
|
private DictKeyService dictKeyService;
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictKeyOperatorType.CREATE)
|
@OperatorLog(DictKeyOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建字典配置项")
|
@Operation(summary = "创建字典配置项")
|
||||||
@@ -51,7 +51,7 @@ public class DictKeyController {
|
|||||||
return dictKeyService.createDictKey(request);
|
return dictKeyService.createDictKey(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictKeyOperatorType.UPDATE)
|
@OperatorLog(DictKeyOperatorType.UPDATE)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新字典配置项")
|
@Operation(summary = "更新字典配置项")
|
||||||
@@ -83,7 +83,7 @@ public class DictKeyController {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictKeyOperatorType.DELETE)
|
@OperatorLog(DictKeyOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除字典配置项")
|
@Operation(summary = "删除字典配置项")
|
||||||
@@ -93,7 +93,7 @@ public class DictKeyController {
|
|||||||
return dictKeyService.deleteDictKeyById(id);
|
return dictKeyService.deleteDictKeyById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictKeyOperatorType.DELETE)
|
@OperatorLog(DictKeyOperatorType.DELETE)
|
||||||
@DeleteMapping("/batch-delete")
|
@DeleteMapping("/batch-delete")
|
||||||
@Operation(summary = "批量删除字典配置项")
|
@Operation(summary = "批量删除字典配置项")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.infra.define.operator.DictValueOperatorType;
|
import com.orion.visor.module.infra.define.operator.DictValueOperatorType;
|
||||||
import com.orion.visor.module.infra.entity.request.dict.DictValueCreateRequest;
|
import com.orion.visor.module.infra.entity.request.dict.DictValueCreateRequest;
|
||||||
@@ -46,7 +46,7 @@ public class DictValueController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DictValueService dictValueService;
|
private DictValueService dictValueService;
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictValueOperatorType.CREATE)
|
@OperatorLog(DictValueOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建字典配置值")
|
@Operation(summary = "创建字典配置值")
|
||||||
@@ -55,7 +55,7 @@ public class DictValueController {
|
|||||||
return dictValueService.createDictValue(request);
|
return dictValueService.createDictValue(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictValueOperatorType.UPDATE)
|
@OperatorLog(DictValueOperatorType.UPDATE)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新字典配置值")
|
@Operation(summary = "更新字典配置值")
|
||||||
@@ -64,7 +64,7 @@ public class DictValueController {
|
|||||||
return dictValueService.updateDictValueById(request);
|
return dictValueService.updateDictValueById(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictValueOperatorType.UPDATE)
|
@OperatorLog(DictValueOperatorType.UPDATE)
|
||||||
@PutMapping("/rollback")
|
@PutMapping("/rollback")
|
||||||
@Operation(summary = "回滚字典配置值")
|
@Operation(summary = "回滚字典配置值")
|
||||||
@@ -88,7 +88,7 @@ public class DictValueController {
|
|||||||
return dictValueService.getDictValuePage(request);
|
return dictValueService.getDictValuePage(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictValueOperatorType.DELETE)
|
@OperatorLog(DictValueOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除字典配置值")
|
@Operation(summary = "删除字典配置值")
|
||||||
@@ -98,7 +98,7 @@ public class DictValueController {
|
|||||||
return dictValueService.deleteDictValueById(id);
|
return dictValueService.deleteDictValueById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(DictValueOperatorType.DELETE)
|
@OperatorLog(DictValueOperatorType.DELETE)
|
||||||
@DeleteMapping("/batch-delete")
|
@DeleteMapping("/batch-delete")
|
||||||
@Operation(summary = "批量删除字典配置值")
|
@Operation(summary = "批量删除字典配置值")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.infra.define.operator.AuthenticationOperatorType;
|
import com.orion.visor.module.infra.define.operator.AuthenticationOperatorType;
|
||||||
import com.orion.visor.module.infra.entity.request.operator.OperatorLogQueryRequest;
|
import com.orion.visor.module.infra.entity.request.operator.OperatorLogQueryRequest;
|
||||||
@@ -58,7 +58,7 @@ public class MineController {
|
|||||||
return mineService.updateCurrentUser(request);
|
return mineService.updateCurrentUser(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(AuthenticationOperatorType.UPDATE_PASSWORD)
|
@OperatorLog(AuthenticationOperatorType.UPDATE_PASSWORD)
|
||||||
@Operation(summary = "修改当前用户密码")
|
@Operation(summary = "修改当前用户密码")
|
||||||
@PutMapping("/update-password")
|
@PutMapping("/update-password")
|
||||||
@@ -81,7 +81,7 @@ public class MineController {
|
|||||||
return mineService.getCurrentUserSessionList();
|
return mineService.getCurrentUserSessionList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@PutMapping("/offline-session")
|
@PutMapping("/offline-session")
|
||||||
@Operation(summary = "下线当前用户会话")
|
@Operation(summary = "下线当前用户会话")
|
||||||
public Boolean offlineCurrentUserSession(@Validated @RequestBody UserSessionOfflineRequest request) {
|
public Boolean offlineCurrentUserSession(@Validated @RequestBody UserSessionOfflineRequest request) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.orion.visor.module.infra.controller;
|
|||||||
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.infra.define.operator.SystemMenuOperatorType;
|
import com.orion.visor.module.infra.define.operator.SystemMenuOperatorType;
|
||||||
import com.orion.visor.module.infra.entity.request.menu.SystemMenuCreateRequest;
|
import com.orion.visor.module.infra.entity.request.menu.SystemMenuCreateRequest;
|
||||||
@@ -42,7 +42,7 @@ public class SystemMenuController {
|
|||||||
@Resource
|
@Resource
|
||||||
private SystemMenuService systemMenuService;
|
private SystemMenuService systemMenuService;
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemMenuOperatorType.CREATE)
|
@OperatorLog(SystemMenuOperatorType.CREATE)
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建菜单")
|
@Operation(summary = "创建菜单")
|
||||||
@@ -51,7 +51,7 @@ public class SystemMenuController {
|
|||||||
return systemMenuService.createSystemMenu(request);
|
return systemMenuService.createSystemMenu(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemMenuOperatorType.UPDATE)
|
@OperatorLog(SystemMenuOperatorType.UPDATE)
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "通过 id 更新菜单")
|
@Operation(summary = "通过 id 更新菜单")
|
||||||
@@ -60,7 +60,7 @@ public class SystemMenuController {
|
|||||||
return systemMenuService.updateSystemMenuById(request);
|
return systemMenuService.updateSystemMenuById(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemMenuOperatorType.UPDATE_STATUS)
|
@OperatorLog(SystemMenuOperatorType.UPDATE_STATUS)
|
||||||
@PutMapping("/update-status")
|
@PutMapping("/update-status")
|
||||||
@Operation(summary = "通过 id 级联更新菜单状态")
|
@Operation(summary = "通过 id 级联更新菜单状态")
|
||||||
@@ -86,7 +86,7 @@ public class SystemMenuController {
|
|||||||
return systemMenuService.getSystemMenuByIdList(request);
|
return systemMenuService.getSystemMenuByIdList(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemMenuOperatorType.DELETE)
|
@OperatorLog(SystemMenuOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "通过 id 级联删除菜单")
|
@Operation(summary = "通过 id 级联删除菜单")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.infra.define.operator.SystemRoleOperatorType;
|
import com.orion.visor.module.infra.define.operator.SystemRoleOperatorType;
|
||||||
import com.orion.visor.module.infra.entity.request.menu.SystemRoleGrantMenuRequest;
|
import com.orion.visor.module.infra.entity.request.menu.SystemRoleGrantMenuRequest;
|
||||||
@@ -65,7 +65,7 @@ public class SystemRoleController {
|
|||||||
return systemRoleService.updateSystemRoleById(request);
|
return systemRoleService.updateSystemRoleById(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemRoleOperatorType.UPDATE_STATUS)
|
@OperatorLog(SystemRoleOperatorType.UPDATE_STATUS)
|
||||||
@PutMapping("/update-status")
|
@PutMapping("/update-status")
|
||||||
@Operation(summary = "通过 id 更新角色状态")
|
@Operation(summary = "通过 id 更新角色状态")
|
||||||
@@ -107,7 +107,7 @@ public class SystemRoleController {
|
|||||||
return systemRoleMenuService.getRoleMenuIdList(roleId);
|
return systemRoleMenuService.getRoleMenuIdList(roleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemRoleOperatorType.DELETE)
|
@OperatorLog(SystemRoleOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "通过 id 删除角色")
|
@Operation(summary = "通过 id 删除角色")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
|
|||||||
import com.orion.visor.framework.common.validator.group.Page;
|
import com.orion.visor.framework.common.validator.group.Page;
|
||||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||||
import com.orion.visor.framework.web.core.annotation.PreviewDisableApi;
|
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
|
||||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||||
import com.orion.visor.module.infra.define.operator.SystemUserOperatorType;
|
import com.orion.visor.module.infra.define.operator.SystemUserOperatorType;
|
||||||
import com.orion.visor.module.infra.entity.request.user.*;
|
import com.orion.visor.module.infra.entity.request.user.*;
|
||||||
@@ -74,7 +74,7 @@ public class SystemUserController {
|
|||||||
|
|
||||||
// TODO 修改头像 最后再说 可有可无的功能 要是有 http 文件需求就写
|
// TODO 修改头像 最后再说 可有可无的功能 要是有 http 文件需求就写
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemUserOperatorType.UPDATE_STATUS)
|
@OperatorLog(SystemUserOperatorType.UPDATE_STATUS)
|
||||||
@PutMapping("/update-status")
|
@PutMapping("/update-status")
|
||||||
@Operation(summary = "修改用户状态")
|
@Operation(summary = "修改用户状态")
|
||||||
@@ -97,7 +97,7 @@ public class SystemUserController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemUserOperatorType.RESET_PASSWORD)
|
@OperatorLog(SystemUserOperatorType.RESET_PASSWORD)
|
||||||
@PutMapping("/reset-password")
|
@PutMapping("/reset-password")
|
||||||
@Operation(summary = "重置用户密码")
|
@Operation(summary = "重置用户密码")
|
||||||
@@ -140,7 +140,7 @@ public class SystemUserController {
|
|||||||
return systemUserService.getSystemUserPage(request);
|
return systemUserService.getSystemUserPage(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemUserOperatorType.DELETE)
|
@OperatorLog(SystemUserOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "通过 id 删除用户")
|
@Operation(summary = "通过 id 删除用户")
|
||||||
@@ -158,7 +158,7 @@ public class SystemUserController {
|
|||||||
return systemUserManagementService.getUserSessionList(id);
|
return systemUserManagementService.getUserSessionList(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreviewDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(SystemUserOperatorType.OFFLINE)
|
@OperatorLog(SystemUserOperatorType.OFFLINE)
|
||||||
@PutMapping("/session/offline")
|
@PutMapping("/session/offline")
|
||||||
@Operation(summary = "下线用户会话")
|
@Operation(summary = "下线用户会话")
|
||||||
|
|||||||
Reference in New Issue
Block a user