feat: 修改部分 swagger 注解

pull/25/head
gaibu 2023-02-04 00:19:40 +08:00
parent 695014a6d1
commit 6f3e026f4c
337 changed files with 3024 additions and 2971 deletions

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.framework.operatelog.core.annotations;
import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@ -15,8 +15,8 @@ import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog;
import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService;
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
import com.google.common.collect.Maps;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
@ -71,15 +71,15 @@ public class OperateLogAspect {
@Resource
private OperateLogFrameworkService operateLogFrameworkService;
@Around("@annotation(apiOperation)")
public Object around(ProceedingJoinPoint joinPoint, ApiOperation apiOperation) throws Throwable {
@Around("@annotation(operation)")
public Object around(ProceedingJoinPoint joinPoint, Operation operation) throws Throwable {
// 可能也添加了 @ApiOperation 注解
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog = getMethodAnnotation(joinPoint,
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog.class);
return around0(joinPoint, operateLog, apiOperation);
return around0(joinPoint, operateLog, operation);
}
@Around("!@annotation(io.swagger.annotations.ApiOperation) && @annotation(operateLog)")
@Around("!@annotation(io.swagger.v3.oas.annotations.Operation) && @annotation(operateLog)")
// 兼容处理,只添加 @OperateLog 注解的情况
public Object around(ProceedingJoinPoint joinPoint,
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) throws Throwable {
@ -88,7 +88,7 @@ public class OperateLogAspect {
private Object around0(ProceedingJoinPoint joinPoint,
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog,
ApiOperation apiOperation) throws Throwable {
Operation operation) throws Throwable {
// 目前,只有管理员,才记录操作日志!所以非管理员,直接调用,不进行记录
Integer userType = WebFrameworkUtils.getLoginUserType();
if (!Objects.equals(userType, UserTypeEnum.ADMIN.getValue())) {
@ -101,10 +101,10 @@ public class OperateLogAspect {
// 执行原有方法
Object result = joinPoint.proceed();
// 记录正常执行时的操作日志
this.log(joinPoint, operateLog, apiOperation, startTime, result, null);
this.log(joinPoint, operateLog, operation, startTime, result, null);
return result;
} catch (Throwable exception) {
this.log(joinPoint, operateLog, apiOperation, startTime, null, exception);
this.log(joinPoint, operateLog, operation, startTime, null, exception);
throw exception;
} finally {
clearThreadLocal();
@ -129,7 +129,7 @@ public class OperateLogAspect {
private void log(ProceedingJoinPoint joinPoint,
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog,
ApiOperation apiOperation,
Operation operation,
LocalDateTime startTime, Object result, Throwable exception) {
try {
// 判断不记录的情况
@ -137,16 +137,16 @@ public class OperateLogAspect {
return;
}
// 真正记录操作日志
this.log0(joinPoint, operateLog, apiOperation, startTime, result, exception);
this.log0(joinPoint, operateLog, operation, startTime, result, exception);
} catch (Throwable ex) {
log.error("[log][记录操作日志时,发生异常,其中参数是 joinPoint({}) operateLog({}) apiOperation({}) result({}) exception({}) ]",
joinPoint, operateLog, apiOperation, result, exception, ex);
joinPoint, operateLog, operation, result, exception, ex);
}
}
private void log0(ProceedingJoinPoint joinPoint,
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog,
ApiOperation apiOperation,
Operation operation,
LocalDateTime startTime, Object result, Throwable exception) {
OperateLog operateLogObj = new OperateLog();
// 补全通用字段
@ -155,7 +155,7 @@ public class OperateLogAspect {
// 补充用户信息
fillUserFields(operateLogObj);
// 补全模块信息
fillModuleFields(operateLogObj, joinPoint, operateLog, apiOperation);
fillModuleFields(operateLogObj, joinPoint, operateLog, operation);
// 补全请求信息
fillRequestFields(operateLogObj);
// 补全方法信息
@ -173,21 +173,21 @@ public class OperateLogAspect {
private static void fillModuleFields(OperateLog operateLogObj,
ProceedingJoinPoint joinPoint,
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog,
ApiOperation apiOperation) {
Operation operation) {
// module 属性
if (operateLog != null) {
operateLogObj.setModule(operateLog.module());
}
if (StrUtil.isEmpty(operateLogObj.getModule())) {
Api api = getClassAnnotation(joinPoint, Api.class);
if (api != null) {
// 优先读取 @API 的 name 属性
if (StrUtil.isNotEmpty(api.value())) {
operateLogObj.setModule(api.value());
Tag tag = getClassAnnotation(joinPoint, Tag.class);
if (tag != null) {
// 优先读取 @Tag 的 name 属性
if (StrUtil.isNotEmpty(tag.name())) {
operateLogObj.setModule(tag.name());
}
// 没有的话,读取 @API 的 tags 属性
if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(api.tags())) {
operateLogObj.setModule(api.tags()[0]);
// 没有的话,读取 @API 的 description 属性
if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(tag.description())) {
operateLogObj.setModule(tag.description());
}
}
}
@ -195,8 +195,8 @@ public class OperateLogAspect {
if (operateLog != null) {
operateLogObj.setName(operateLog.name());
}
if (StrUtil.isEmpty(operateLogObj.getName()) && apiOperation != null) {
operateLogObj.setName(apiOperation.value());
if (StrUtil.isEmpty(operateLogObj.getName()) && operation != null) {
operateLogObj.setName(operation.description());
}
// type 属性
if (operateLog != null && ArrayUtil.isNotEmpty(operateLog.type())) {
@ -268,9 +268,9 @@ public class OperateLogAspect {
return null;
}
return Arrays.stream(requestMethods).filter(requestMethod ->
requestMethod == RequestMethod.POST
|| requestMethod == RequestMethod.PUT
|| requestMethod == RequestMethod.DELETE)
requestMethod == RequestMethod.POST
|| requestMethod == RequestMethod.PUT
|| requestMethod == RequestMethod.DELETE)
.findFirst().orElse(null);
}

View File

@ -35,9 +35,26 @@ public class SwaggerProperties {
@NotEmpty(message = "版本不能为空")
private String version;
/**
*
* url
*/
@NotEmpty(message = "扫描的 package 不能为空")
private String basePackage;
private String url;
/**
* email
*/
@NotEmpty(message = "扫描的 email 不能为空")
private String email;
/**
* license
*/
@NotEmpty(message = "扫描的 license 不能为空")
private String license;
/**
* license-url
*/
@NotEmpty(message = "扫描的 license-url 不能为空")
private String licenseUrl;
}

View File

@ -1,126 +1,155 @@
package cn.iocoder.yudao.framework.swagger.config;
import cn.iocoder.yudao.framework.swagger.core.SpringFoxHandlerProviderBeanPostProcessor;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.media.IntegerSchema;
import io.swagger.v3.oas.models.media.StringSchema;
import io.swagger.v3.oas.models.parameters.Parameter;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.springdoc.core.*;
import org.springdoc.core.customizers.OpenApiBuilderCustomizer;
import org.springdoc.core.customizers.ServerBaseUrlCustomizer;
import org.springdoc.core.providers.JavadocProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpHeaders;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
import static springfox.documentation.builders.RequestHandlerSelectors.basePackage;
/**
* Swagger2
* Swagger OpenAPI + Springdoc
*
*
* 1. Springdoc <a href="https://github.com/springdoc/springdoc-openapi"></a>
* 2. Swagger 2015 OpenAPI 西
*
* @author
*/
@AutoConfiguration
@EnableSwagger2WebMvc
@EnableKnife4j
@ConditionalOnClass({Docket.class, ApiInfoBuilder.class})
// 允许使用 swagger.enable=false 禁用 Swagger
@ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true)
@ConditionalOnClass({OpenAPI.class})
@EnableConfigurationProperties(SwaggerProperties.class)
@ConditionalOnProperty(prefix = "springdoc.api-docs", name = "enabled", havingValue = "true", matchIfMissing = true) // 设置为 false 时,禁用
public class YudaoSwaggerAutoConfiguration {
@Bean
public SpringFoxHandlerProviderBeanPostProcessor springFoxHandlerProviderBeanPostProcessor() {
return new SpringFoxHandlerProviderBeanPostProcessor();
}
// ========== 全局 OpenAPI 配置 ==========
@Bean
public Docket createRestApi(SwaggerProperties properties) {
// 创建 Docket 对象
return new Docket(DocumentationType.SWAGGER_2)
// ① 用来创建该 API 的基本信息,展示在文档的页面中(自定义展示的信息)
.apiInfo(apiInfo(properties))
// ② 设置扫描指定 package 包下的
.select()
.apis(basePackage(properties.getBasePackage()))
// .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用
.paths(PathSelectors.any())
.build()
// ③ 安全上下文(认证)
.securitySchemes(securitySchemes())
.securityContexts(securityContexts())
// ④ 全局参数(多租户 header
.globalOperationParameters(globalRequestParameters());
public OpenAPI createApi(SwaggerProperties properties) {
Map<String, SecurityScheme> securitySchemas = buildSecuritySchemes();
OpenAPI openAPI = new OpenAPI()
// 接口信息
.info(buildInfo(properties))
// 接口安全配置
.components(new Components().securitySchemes(securitySchemas))
.addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION));
securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key)));
return openAPI;
}
// ========== apiInfo ==========
/**
* API
*/
private static ApiInfo apiInfo(SwaggerProperties properties) {
return new ApiInfoBuilder()
private Info buildInfo(SwaggerProperties properties) {
return new Info()
.title(properties.getTitle())
.description(properties.getDescription())
.contact(new Contact(properties.getAuthor(), null, null))
.version(properties.getVersion())
.build();
.contact(new Contact().name(properties.getAuthor()).url(properties.getUrl()).email(properties.getEmail()))
.license(new License().name(properties.getLicense()).url(properties.getLicenseUrl()));
}
// ========== securitySchemes ==========
/**
* Authorization token
*/
private static List<SecurityScheme> securitySchemes() {
return Collections.singletonList(new ApiKey(HttpHeaders.AUTHORIZATION, "Authorization", "header"));
private Map<String, SecurityScheme> buildSecuritySchemes() {
Map<String, SecurityScheme> securitySchemes = new HashMap<>();
SecurityScheme securityScheme = new SecurityScheme()
.type(SecurityScheme.Type.APIKEY) // 类型
.name(HttpHeaders.AUTHORIZATION) // 请求头的 name
.in(SecurityScheme.In.HEADER); // token 所在位置
securitySchemes.put(HttpHeaders.AUTHORIZATION, securityScheme);
return securitySchemes;
}
/**
*
*
* @see #securitySchemes()
* @see #authorizationScopes()
* OpenAPI
*/
private static List<SecurityContext> securityContexts() {
return Collections.singletonList(SecurityContext.builder()
.securityReferences(securityReferences())
// 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes
.forPaths(PathSelectors.regex("^(?!auth).*$"))
.build());
@Bean
public OpenAPIService openApiBuilder(Optional<OpenAPI> openAPI,
SecurityService securityParser,
SpringDocConfigProperties springDocConfigProperties,
PropertyResolverUtils propertyResolverUtils,
Optional<List<OpenApiBuilderCustomizer>> openApiBuilderCustomizers,
Optional<List<ServerBaseUrlCustomizer>> serverBaseUrlCustomizers,
Optional<JavadocProvider> javadocProvider) {
return new OpenAPIService(openAPI, securityParser, springDocConfigProperties,
propertyResolverUtils, openApiBuilderCustomizers, serverBaseUrlCustomizers, javadocProvider);
}
private static List<SecurityReference> securityReferences() {
return Collections.singletonList(new SecurityReference(HttpHeaders.AUTHORIZATION, authorizationScopes()));
// ========== 分组 OpenAPI 配置 ==========
/**
* API
*/
@Bean
public GroupedOpenApi allGroupedOpenApi() {
return buildGroupedOpenApi("all", "");
}
private static AuthorizationScope[] authorizationScopes() {
return new AuthorizationScope[]{new AuthorizationScope("global", "accessEverything")};
public static GroupedOpenApi buildGroupedOpenApi(String group) {
return buildGroupedOpenApi(group, group);
}
// ========== globalRequestParameters ==========
public static GroupedOpenApi buildGroupedOpenApi(String group, String path) {
return GroupedOpenApi.builder()
.group(group)
.pathsToMatch("/admin-api/" + path + "/**", "/app-api/" + path + "/**")
.addOperationCustomizer((operation, handlerMethod) -> operation
.addParametersItem(buildTenantHeaderParameter())
.addParametersItem(buildSecurityHeaderParameter()))
.build();
}
private static List<Parameter> globalRequestParameters() {
List<Parameter> tenantParameter = new ArrayList<>();
tenantParameter.add(new ParameterBuilder()
.name(HEADER_TENANT_ID)
.description("租户编号")
.modelRef(new ModelRef("long"))
.defaultValue("1")
.parameterType("header")
.required(true)
.build());
return tenantParameter;
/**
* Tenant
*
* @return
*/
private static Parameter buildTenantHeaderParameter() {
return new Parameter()
.name(HEADER_TENANT_ID) // header 名
.description("租户编号") // 描述
.in(String.valueOf(SecurityScheme.In.HEADER)) // 请求 header
.schema(new IntegerSchema()._default(1L).name(HEADER_TENANT_ID).description("租户编号")); // 默认:使用租户编号为 1
}
/**
* Authorization
*
* Knife4j <a href="https://gitee.com/xiaoym/knife4j/issues/I69QBU">Authorize header</a>
*
* @return
*/
private static Parameter buildSecurityHeaderParameter() {
return new Parameter()
.name(HttpHeaders.AUTHORIZATION) // header 名
.description("认证 Token") // 描述
.in(String.valueOf(SecurityScheme.In.HEADER)) // 请求 header
.schema(new StringSchema()._default("Bearer test1").name(HEADER_TENANT_ID).description("认证 Token")); // 默认:使用用户编号为 1
}
}

View File

@ -1,42 +1,42 @@
package cn.iocoder.yudao.framework.swagger.core;
import cn.hutool.core.util.ReflectUtil;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
import java.util.List;
/**
* SpringFox SpringBoot 2.6.x
* issue https://github.com/springfox/springfox/issues/3462
*
* @author
*/
public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor {
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof WebMvcRequestHandlerProvider) {
customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
}
return bean;
}
private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
// 移除,只保留 patternParser
List<T> copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null);
// 添加到 mappings 中
mappings.clear();
mappings.addAll(copy);
}
@SuppressWarnings("unchecked")
private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
return (List<RequestMappingInfoHandlerMapping>)
ReflectUtil.getFieldValue(bean, "handlerMappings");
}
}
//package cn.iocoder.yudao.framework.swagger.core;
//
//import cn.hutool.core.util.ReflectUtil;
//import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.config.BeanPostProcessor;
//import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
//
//import java.util.List;
//
///**
// * 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题
// * 该问题对应的 issue 为 https://github.com/springfox/springfox/issues/3462
// *
// * @author 芋道源码
// */
//public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor {
//
// @Override
// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
// if (bean instanceof WebMvcRequestHandlerProvider) {
// customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
// }
// return bean;
// }
//
// private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
// // 移除,只保留 patternParser
// List<T> copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null);
// // 添加到 mappings 中
// mappings.clear();
// mappings.addAll(copy);
// }
//
// @SuppressWarnings("unchecked")
// private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
// return (List<RequestMappingInfoHandlerMapping>)
// ReflectUtil.getFieldValue(bean, "handlerMappings");
// }
//
//}

View File

@ -1,5 +1,6 @@
cn.iocoder.yudao.framework.apilog.config.YudaoApiLogRpcAutoConfiguration
cn.iocoder.yudao.framework.apilog.config.YudaoApiLogAutoConfiguration
cn.iocoder.yudao.framework.jackson.config.YudaoJacksonAutoConfiguration
com.github.xiaoymin.knife4j.spring.configuration.Knife4jAutoConfiguration
cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration
cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration
cn.iocoder.yudao.framework.xss.config.YudaoXssAutoConfiguration

View File

@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -19,7 +19,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 动态表单")
@Tag(name = "管理后台 - 动态表单")
@RestController
@RequestMapping("/bpm/form")
@Validated
@ -29,14 +29,14 @@ public class BpmFormController {
private BpmFormService formService;
@PostMapping("/create")
@ApiOperation("创建动态表单")
@Operation(summary = "创建动态表单")
@PreAuthorize("@ss.hasPermission('bpm:form:create')")
public CommonResult<Long> createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) {
return success(formService.createForm(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新动态表单")
@Operation(summary = "更新动态表单")
@PreAuthorize("@ss.hasPermission('bpm:form:update')")
public CommonResult<Boolean> updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) {
formService.updateForm(updateReqVO);
@ -44,8 +44,8 @@ public class BpmFormController {
}
@DeleteMapping("/delete")
@ApiOperation("删除动态表单")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除动态表单")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('bpm:form:delete')")
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) {
formService.deleteForm(id);
@ -53,8 +53,8 @@ public class BpmFormController {
}
@GetMapping("/get")
@ApiOperation("获得动态表单")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得动态表单")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:form:query')")
public CommonResult<BpmFormRespVO> getForm(@RequestParam("id") Long id) {
BpmFormDO form = formService.getForm(id);
@ -62,18 +62,18 @@ public class BpmFormController {
}
@GetMapping("/list-all-simple")
@ApiOperation(value = "获得动态表单的精简列表", notes = "用于表单下拉框")
@Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框")
public CommonResult<List<BpmFormSimpleRespVO>> getSimpleForms() {
List<BpmFormDO> list = formService.getFormList();
return success(BpmFormConvert.INSTANCE.convertList2(list));
}
@GetMapping("/page")
@ApiOperation("获得动态表单分页")
@Operation(summary = "获得动态表单分页")
@PreAuthorize("@ss.hasPermission('bpm:form:query')")
public CommonResult<PageResult<BpmFormRespVO>> getFormPage(@Valid BpmFormPageReqVO pageVO) {
PageResult<BpmFormDO> pageResult = formService.getFormPage(pageVO);
return success(BpmFormConvert.INSTANCE.convertPage(pageResult));
}
}
}

View File

@ -6,9 +6,9 @@ import cn.iocoder.yudao.framework.common.util.io.IoUtils;
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*;
import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert;
import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -20,7 +20,7 @@ import java.io.IOException;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 流程模型")
@Tag(name = "管理后台 - 流程模型")
@RestController
@RequestMapping("/bpm/model")
@Validated
@ -30,14 +30,14 @@ public class BpmModelController {
private BpmModelService modelService;
@GetMapping("/page")
@ApiOperation(value = "获得模型分页")
@Operation(summary = "获得模型分页")
public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(BpmModelPageReqVO pageVO) {
return success(modelService.getModelPage(pageVO));
}
@GetMapping("/get")
@ApiOperation("获得模型")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class)
@Operation(summary = "获得模型")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:model:query')")
public CommonResult<BpmModelRespVO> getModel(@RequestParam("id") String id) {
BpmModelRespVO model = modelService.getModel(id);
@ -45,14 +45,14 @@ public class BpmModelController {
}
@PostMapping("/create")
@ApiOperation(value = "新建模型")
@Operation(summary = "新建模型")
@PreAuthorize("@ss.hasPermission('bpm:model:create')")
public CommonResult<String> createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) {
return success(modelService.createModel(createRetVO, null));
}
@PutMapping("/update")
@ApiOperation(value = "修改模型")
@Operation(summary = "修改模型")
@PreAuthorize("@ss.hasPermission('bpm:model:update')")
public CommonResult<Boolean> updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) {
modelService.updateModel(modelVO);
@ -60,7 +60,7 @@ public class BpmModelController {
}
@PostMapping("/import")
@ApiOperation(value = "导入模型")
@Operation(summary = "导入模型")
@PreAuthorize("@ss.hasPermission('bpm:model:import')")
public CommonResult<String> importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException {
BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO);
@ -70,8 +70,8 @@ public class BpmModelController {
}
@PostMapping("/deploy")
@ApiOperation(value = "部署模型")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class)
@Operation(summary = "部署模型")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:model:deploy')")
public CommonResult<Boolean> deployModel(@RequestParam("id") String id) {
modelService.deployModel(id);
@ -79,7 +79,7 @@ public class BpmModelController {
}
@PutMapping("/update-state")
@ApiOperation(value = "修改模型的状态", notes = "实际更新的部署的流程定义的状态")
@Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态")
@PreAuthorize("@ss.hasPermission('bpm:model:update')")
public CommonResult<Boolean> updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) {
modelService.updateModelState(reqVO.getId(), reqVO.getState());
@ -87,11 +87,11 @@ public class BpmModelController {
}
@DeleteMapping("/delete")
@ApiOperation("删除模型")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class)
@Operation(summary = "删除模型")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:model:delete')")
public CommonResult<Boolean> deleteModel(@RequestParam("id") String id) {
modelService.deleteModel(id);
return success(true);
}
}
}

View File

@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmPro
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@ -23,7 +23,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 流程定义")
@Tag(name = "管理后台 - 流程定义")
@RestController
@RequestMapping("/bpm/process-definition")
@Validated
@ -33,7 +33,7 @@ public class BpmProcessDefinitionController {
private BpmProcessDefinitionService bpmDefinitionService;
@GetMapping("/page")
@ApiOperation(value = "获得流程定义分页")
@Operation(summary = "获得流程定义分页")
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
public CommonResult<PageResult<BpmProcessDefinitionPageItemRespVO>> getProcessDefinitionPage(
BpmProcessDefinitionPageReqVO pageReqVO) {
@ -41,7 +41,7 @@ public class BpmProcessDefinitionController {
}
@GetMapping ("/list")
@ApiOperation(value = "获得流程定义列表")
@Operation(summary = "获得流程定义列表")
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList(
BpmProcessDefinitionListReqVO listReqVO) {
@ -49,11 +49,11 @@ public class BpmProcessDefinitionController {
}
@GetMapping ("/get-bpmn-xml")
@ApiOperation(value = "获得流程定义的 BPMN XML")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class)
@Operation(summary = "获得流程定义的 BPMN XML")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
public CommonResult<String> getProcessDefinitionBpmnXML(@RequestParam("id") String id) {
String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id);
return success(bpmnXML);
}
}
}

View File

@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAs
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO;
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO;
import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -19,7 +19,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 任务分配规则")
@Tag(name = "管理后台 - 任务分配规则")
@RestController
@RequestMapping("/bpm/task-assign-rule")
@Validated
@ -29,10 +29,10 @@ public class BpmTaskAssignRuleController {
private BpmTaskAssignRuleService taskAssignRuleService;
@GetMapping("/list")
@ApiOperation(value = "获得任务分配规则列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "modelId", value = "模型编号", example = "1024", dataTypeClass = String.class),
@ApiImplicitParam(name = "processDefinitionId", value = "流程定义的编号", example = "2048", dataTypeClass = String.class)
@Operation(summary = "获得任务分配规则列表")
@Parameters({
@Parameter(name = "modelId", description = "模型编号", example = "1024"),
@Parameter(name = "processDefinitionId", description = "流程定义的编号", example = "2048")
})
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')")
public CommonResult<List<BpmTaskAssignRuleRespVO>> getTaskAssignRuleList(
@ -42,17 +42,17 @@ public class BpmTaskAssignRuleController {
}
@PostMapping("/create")
@ApiOperation(value = "创建任务分配规则")
@Operation(summary = "创建任务分配规则")
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')")
public CommonResult<Long> createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) {
return success(taskAssignRuleService.createTaskAssignRule(reqVO));
}
@PutMapping("/update")
@ApiOperation(value = "更新任务分配规则")
@Operation(summary = "更新任务分配规则")
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')")
public CommonResult<Boolean> updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) {
taskAssignRuleService.updateTaskAssignRule(reqVO);
return success(true);
}
}
}

View File

@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -23,7 +23,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 用户组")
@Tag(name = "管理后台 - 用户组")
@RestController
@RequestMapping("/bpm/user-group")
@Validated
@ -33,14 +33,14 @@ public class BpmUserGroupController {
private BpmUserGroupService userGroupService;
@PostMapping("/create")
@ApiOperation("创建用户组")
@Operation(summary = "创建用户组")
@PreAuthorize("@ss.hasPermission('bpm:user-group:create')")
public CommonResult<Long> createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) {
return success(userGroupService.createUserGroup(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新用户组")
@Operation(summary = "更新用户组")
@PreAuthorize("@ss.hasPermission('bpm:user-group:update')")
public CommonResult<Boolean> updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) {
userGroupService.updateUserGroup(updateReqVO);
@ -48,8 +48,8 @@ public class BpmUserGroupController {
}
@DeleteMapping("/delete")
@ApiOperation("删除用户组")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除用户组")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('bpm:user-group:delete')")
public CommonResult<Boolean> deleteUserGroup(@RequestParam("id") Long id) {
userGroupService.deleteUserGroup(id);
@ -57,8 +57,8 @@ public class BpmUserGroupController {
}
@GetMapping("/get")
@ApiOperation("获得用户组")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得用户组")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')")
public CommonResult<BpmUserGroupRespVO> getUserGroup(@RequestParam("id") Long id) {
BpmUserGroupDO userGroup = userGroupService.getUserGroup(id);
@ -66,7 +66,7 @@ public class BpmUserGroupController {
}
@GetMapping("/page")
@ApiOperation("获得用户组分页")
@Operation(summary = "获得用户组分页")
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')")
public CommonResult<PageResult<BpmUserGroupRespVO>> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) {
PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(pageVO);
@ -74,7 +74,7 @@ public class BpmUserGroupController {
}
@GetMapping("/list-all-simple")
@ApiOperation(value = "获取用户组精简信息列表", notes = "只包含被开启的用户组,主要用于前端的下拉选项")
@Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项")
public CommonResult<List<BpmUserGroupRespVO>> getSimpleUserGroups() {
// 获用户门列表,只要开启状态的
List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus());
@ -82,4 +82,4 @@ public class BpmUserGroupController {
return success(BpmUserGroupConvert.INSTANCE.convertList2(list));
}
}
}

View File

@ -11,15 +11,15 @@ import javax.validation.constraints.*;
@Data
public class BpmFormBaseVO {
@ApiModelProperty(value = "表单名称", required = true, example = "芋道")
@Schema(description = "表单名称", required = true, example = "芋道")
@NotNull(message = "表单名称不能为空")
private String name;
@ApiModelProperty(value = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1")
@Schema(description = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1")
@NotNull(message = "表单状态不能为空")
private Integer status;
@ApiModelProperty(value = "备注", example = "我是备注")
@Schema(description = "备注", example = "我是备注")
private String remark;
}
}

View File

@ -6,18 +6,18 @@ import io.swagger.annotations.*;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 动态表单创建 Request VO")
@Schema(description = "管理后台 - 动态表单创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmFormCreateReqVO extends BpmFormBaseVO {
@ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串")
@Schema(description = "表单的配置", required = true, notes = "JSON 字符串")
@NotNull(message = "表单的配置不能为空")
private String conf;
@ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组")
@Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组")
@NotNull(message = "表单项的数组不能为空")
private List<String> fields;
}
}

View File

@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 动态表单分页 Request VO")
@Schema(description = "管理后台 - 动态表单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmFormPageReqVO extends PageParam {
@ApiModelProperty(value = "表单名称", example = "芋道")
@Schema(description = "表单名称", example = "芋道")
private String name;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -10,24 +10,24 @@ import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel("管理后台 - 动态表单 Response VO")
@Schema(description = "管理后台 - 动态表单 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmFormRespVO extends BpmFormBaseVO {
@ApiModelProperty(value = "表单编号", required = true, example = "1024")
@Schema(description = "表单编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串")
@Schema(description = "表单的配置", required = true, notes = "JSON 字符串")
@NotNull(message = "表单的配置不能为空")
private String conf;
@ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组")
@Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组")
@NotNull(message = "表单项的数组不能为空")
private List<String> fields;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ApiModel("管理后台 - 流程表单精简 Response VO")
@Schema(description = "管理后台 - 流程表单精简 Response VO")
@Data
public class BpmFormSimpleRespVO {
@ApiModelProperty(value = "表单编号", required = true, example = "1024")
@Schema(description = "表单编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "表单名称", required = true, example = "芋道")
@Schema(description = "表单名称", required = true, example = "芋道")
private String name;
}
}

View File

@ -5,22 +5,22 @@ import io.swagger.annotations.*;
import javax.validation.constraints.*;
import java.util.List;
@ApiModel("管理后台 - 动态表单更新 Request VO")
@Schema(description = "管理后台 - 动态表单更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmFormUpdateReqVO extends BpmFormBaseVO {
@ApiModelProperty(value = "表单编号", required = true, example = "1024")
@Schema(description = "表单编号", required = true, example = "1024")
@NotNull(message = "表单编号不能为空")
private Long id;
@ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串")
@Schema(description = "表单的配置", required = true, notes = "JSON 字符串")
@NotNull(message = "表单的配置不能为空")
private String conf;
@ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组")
@Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组")
@NotNull(message = "表单项的数组不能为空")
private List<String> fields;
}
}

View File

@ -12,20 +12,20 @@ import javax.validation.constraints.*;
@Data
public class BpmUserGroupBaseVO {
@ApiModelProperty(value = "组名", required = true, example = "芋道")
@Schema(description = "组名", required = true, example = "芋道")
@NotNull(message = "组名不能为空")
private String name;
@ApiModelProperty(value = "描述", required = true, example = "芋道源码")
@Schema(description = "描述", required = true, example = "芋道源码")
@NotNull(message = "描述不能为空")
private String description;
@ApiModelProperty(value = "成员编号数组", required = true, example = "1,2,3")
@Schema(description = "成员编号数组", required = true, example = "1,2,3")
@NotNull(message = "成员编号数组不能为空")
private Set<Long> memberUserIds;
@ApiModelProperty(value = "状态", required = true, example = "1")
@Schema(description = "状态", required = true, example = "1")
@NotNull(message = "状态不能为空")
private Integer status;
}
}

View File

@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import lombok.*;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 用户组创建 Request VO")
@Schema(description = "管理后台 - 用户组创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO {
}
}

View File

@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -11,20 +11,20 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 用户组分页 Request VO")
@Schema(description = "管理后台 - 用户组分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmUserGroupPageReqVO extends PageParam {
@ApiModelProperty(value = "组名", example = "芋道")
@Schema(description = "组名", example = "芋道")
private String name;
@ApiModelProperty(value = "状态", example = "1")
@Schema(description = "状态", example = "1")
private Integer status;
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime[] createTime;
}
}

View File

@ -6,16 +6,16 @@ import java.time.LocalDateTime;
import java.util.*;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 用户组 Response VO")
@Schema(description = "管理后台 - 用户组 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmUserGroupRespVO extends BpmUserGroupBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ApiModel("管理后台 - 用户组精简信息 Response VO")
@Schema(description = "管理后台 - 用户组精简信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BpmUserGroupSimpleRespVO {
@ApiModelProperty(value = "用户组编号", required = true, example = "1024")
@Schema(description = "用户组编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "用户组名字", required = true, example = "芋道")
@Schema(description = "用户组名字", required = true, example = "芋道")
private String name;
}
}

View File

@ -4,14 +4,14 @@ import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 用户组更新 Request VO")
@Schema(description = "管理后台 - 用户组更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
@NotNull(message = "编号不能为空")
private Long id;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -9,14 +9,14 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
@ApiModel(value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
@Schema(description = value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmModeImportReqVO extends BpmModelCreateReqVO {
@ApiModelProperty(value = "BPMN 文件", required = true)
@Schema(description = "BPMN 文件", required = true)
@NotNull(message = "BPMN 文件不能为空")
private MultipartFile bpmnFile;
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ -12,30 +12,30 @@ import javax.validation.constraints.NotEmpty;
@Data
public class BpmModelBaseVO {
@ApiModelProperty(value = "流程标识", required = true, example = "process_yudao")
@Schema(description = "流程标识", required = true, example = "process_yudao")
@NotEmpty(message = "流程标识不能为空")
private String key;
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", required = true, example = "芋道")
@NotEmpty(message = "流程名称不能为空")
private String name;
@ApiModelProperty(value = "流程描述", example = "我是描述")
@Schema(description = "流程描述", example = "我是描述")
private String description;
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@NotEmpty(message = "流程分类不能为空")
private String category;
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
@Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private Long formId;
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomCreatePath;
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomViewPath;
}
}

View File

@ -1,26 +1,26 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotEmpty;
@ApiModel("管理后台 - 流程模型的创建 Request VO")
@Schema(description = "管理后台 - 流程模型的创建 Request VO")
@Data
public class BpmModelCreateReqVO {
@ApiModelProperty(value = "流程标识", required = true, example = "process_yudao")
@Schema(description = "流程标识", required = true, example = "process_yudao")
@NotEmpty(message = "流程标识不能为空")
private String key;
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", required = true, example = "芋道")
@NotEmpty(message = "流程名称不能为空")
private String name;
@ApiModelProperty(value = "流程描述", example = "我是描述")
@Schema(description = "流程描述", example = "我是描述")
private String description;
}
}

View File

@ -1,26 +1,26 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 流程模型的分页的每一项 Response VO")
@Schema(description = "管理后台 - 流程模型的分页的每一项 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmModelPageItemRespVO extends BpmModelBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "表单名字", example = "请假表单")
@Schema(description = "表单名字", example = "请假表单")
private String formName;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
/**
@ -28,22 +28,22 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO {
*/
private ProcessDefinition processDefinition;
@ApiModel("流程定义")
@Schema(description = "流程定义")
@Data
public static class ProcessDefinition {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "版本", required = true, example = "1")
@Schema(description = "版本", required = true, example = "1")
private Integer version;
@ApiModelProperty(value = "部署时间", required = true)
@Schema(description = "部署时间", required = true)
private LocalDateTime deploymentTime;
@ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
@Schema(description = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
private Integer suspensionState;
}
}
}

View File

@ -1,26 +1,26 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程模型分页 Request VO")
@Schema(description = "管理后台 - 流程模型分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmModelPageReqVO extends PageParam {
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
@Schema(description = "标识", example = "process1641042089407", notes = "精准匹配")
private String key;
@ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配")
@Schema(description = "名字", example = "芋道", notes = "模糊匹配")
private String name;
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
private String category;
}
}

View File

@ -1,26 +1,26 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 流程模型的创建 Request VO")
@Schema(description = "管理后台 - 流程模型的创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmModelRespVO extends BpmModelBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "BPMN XML", required = true)
@Schema(description = "BPMN XML", required = true)
private String bpmnXml;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -1,40 +1,40 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ApiModel("管理后台 - 流程模型的更新 Request VO")
@Schema(description = "管理后台 - 流程模型的更新 Request VO")
@Data
public class BpmModelUpdateReqVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
@NotEmpty(message = "编号不能为空")
private String id;
@ApiModelProperty(value = "流程名称", example = "芋道")
@Schema(description = "流程名称", example = "芋道")
private String name;
@ApiModelProperty(value = "流程描述", example = "我是描述")
@Schema(description = "流程描述", example = "我是描述")
private String description;
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
private String category;
@ApiModelProperty(value = "BPMN XML", required = true)
@Schema(description = "BPMN XML", required = true)
private String bpmnXml;
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
@Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private Long formId;
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomCreatePath;
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomViewPath;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@ApiModel("管理后台 - 流程模型更新状态 Request VO")
@Schema(description = "管理后台 - 流程模型更新状态 Request VO")
@Data
public class BpmModelUpdateStateReqVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
@NotNull(message = "编号不能为空")
private String id;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举")
@Schema(description = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举")
@NotNull(message = "状态不能为空")
private Integer state;
}
}

View File

@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程定义列表 Request VO")
@Schema(description = "管理后台 - 流程定义列表 Request VO")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class BpmProcessDefinitionListReqVO extends PageParam {
@ApiModelProperty(value = "中断状态", example = "1", notes = "参见 SuspensionState 枚举")
@Schema(description = "中断状态", example = "1", notes = "参见 SuspensionState 枚举")
private Integer suspensionState;
}
}

View File

@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 流程定义的分页的每一项 Response VO")
@Schema(description = "管理后台 - 流程定义的分页的每一项 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO {
@ApiModelProperty(value = "表单名字", example = "请假表单")
@Schema(description = "表单名字", example = "请假表单")
private String formName;
@ApiModelProperty(value = "部署时间", required = true)
@Schema(description = "部署时间", required = true)
private LocalDateTime deploymentTime;
}
}

View File

@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程定义分页 Request VO")
@Schema(description = "管理后台 - 流程定义分页 Request VO")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class BpmProcessDefinitionPageReqVO extends PageParam {
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
@Schema(description = "标识", example = "process1641042089407", notes = "精准匹配")
private String key;
}
}

View File

@ -1,52 +1,52 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 流程定义 Response VO")
@Schema(description = "管理后台 - 流程定义 Response VO")
@Data
public class BpmProcessDefinitionRespVO {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "版本", required = true, example = "1")
@Schema(description = "版本", required = true, example = "1")
private Integer version;
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", required = true, example = "芋道")
@NotEmpty(message = "流程名称不能为空")
private String name;
@ApiModelProperty(value = "流程描述", example = "我是描述")
@Schema(description = "流程描述", example = "我是描述")
private String description;
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@NotEmpty(message = "流程分类不能为空")
private String category;
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
@Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private Long formId;
@ApiModelProperty(value = "表单的配置", required = true,
@Schema(description = "表单的配置", required = true,
notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formConf;
@ApiModelProperty(value = "表单项的数组", required = true,
@Schema(description = "表单项的数组", required = true,
notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private List<String> formFields;
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomCreatePath;
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomViewPath;
@ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
@Schema(description = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
private Integer suspensionState;
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ -14,12 +14,12 @@ import java.util.Set;
@Data
public class BpmTaskAssignRuleBaseVO {
@ApiModelProperty(value = "规则类型", required = true, example = "bpm_task_assign_rule_type")
@Schema(description = "规则类型", required = true, example = "bpm_task_assign_rule_type")
@NotNull(message = "规则类型不能为空")
private Integer type;
@ApiModelProperty(value = "规则值数组", required = true, example = "1,2,3")
@Schema(description = "规则值数组", required = true, example = "1,2,3")
@NotNull(message = "规则值数组不能为空")
private Set<Long> options;
}
}

View File

@ -1,25 +1,25 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotEmpty;
@ApiModel("管理后台 - 流程任务分配规则的创建 Request VO")
@Schema(description = "管理后台 - 流程任务分配规则的创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO {
@ApiModelProperty(value = "流程模型的编号", required = true, example = "1024")
@Schema(description = "流程模型的编号", required = true, example = "1024")
@NotEmpty(message = "流程模型的编号不能为空")
private String modelId;
@ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048")
@Schema(description = "流程任务定义的编号", required = true, example = "2048")
@NotEmpty(message = "流程任务定义的编号不能为空")
private String taskDefinitionKey;
}
}

View File

@ -1,29 +1,29 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程任务分配规则的 Response VO")
@Schema(description = "管理后台 - 流程任务分配规则的 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO {
@ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024")
@Schema(description = "任务分配规则的编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "流程模型的编号", required = true, example = "2048")
@Schema(description = "流程模型的编号", required = true, example = "2048")
private String modelId;
@ApiModelProperty(value = "流程定义的编号", required = true, example = "4096")
@Schema(description = "流程定义的编号", required = true, example = "4096")
private String processDefinitionId;
@ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048")
@Schema(description = "流程任务定义的编号", required = true, example = "2048")
private String taskDefinitionKey;
@ApiModelProperty(value = "流程任务定义的名字", required = true, example = "关注芋道")
@Schema(description = "流程任务定义的名字", required = true, example = "关注芋道")
private String taskDefinitionName;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@ApiModel("管理后台 - 流程任务分配规则的更新 Request VO")
@Schema(description = "管理后台 - 流程任务分配规则的更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO {
@ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024")
@Schema(description = "任务分配规则的编号", required = true, example = "1024")
@NotNull(message = "任务分配规则的编号不能为空")
private Long id;
}
}

View File

@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
* @author jason
* @author
*/
@Api(tags = "管理后台 - OA 请假申请")
@Tag(name = "管理后台 - OA 请假申请")
@RestController
@RequestMapping("/bpm/oa/leave")
@Validated
@ -38,15 +38,15 @@ public class BpmOALeaveController {
@PostMapping("/create")
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')")
@ApiOperation("创建请求申请")
@Operation(summary = "创建请求申请")
public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) {
return success(leaveService.createLeave(getLoginUserId(), createReqVO));
}
@GetMapping("/get")
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
@ApiOperation("获得请假申请")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得请假申请")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) {
BpmOALeaveDO leave = leaveService.getLeave(id);
return success(BpmOALeaveConvert.INSTANCE.convert(leave));
@ -54,10 +54,10 @@ public class BpmOALeaveController {
@GetMapping("/page")
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')")
@ApiOperation("获得请假申请分页")
@Operation(summary = "获得请假申请分页")
public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) {
PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO);
return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult));
}
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@ -16,19 +16,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data
public class BpmOALeaveBaseVO {
@ApiModelProperty(value = "请假的开始时间", required = true)
@Schema(description = "请假的开始时间", required = true)
@NotNull(message = "开始时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime startTime;
@ApiModelProperty(value = "请假的结束时间", required = true)
@Schema(description = "请假的结束时间", required = true)
@NotNull(message = "结束时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endTime;
@ApiModelProperty(value = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举")
@Schema(description = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举")
private Integer type;
@ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码")
@Schema(description = "原因", required = true, example = "阅读芋道源码")
private String reason;
}
}

View File

@ -8,23 +8,23 @@ import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 请假申请分页 Request VO")
@Schema(description = "管理后台 - 请假申请分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmOALeavePageReqVO extends PageParam {
@ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举")
@Schema(description = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举")
private Integer result;
@ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type")
@Schema(description = "请假类型", example = "1", notes = "参见 bpm_oa_type")
private Integer type;
@ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配")
@Schema(description = "原因", example = "阅读芋道源码", notes = "模糊匹配")
private String reason;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "申请时间")
@Schema(description = "申请时间")
private Date[] createTime;
}
}

View File

@ -9,24 +9,24 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 请假申请 Response VO")
@Schema(description = "管理后台 - 请假申请 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
@ApiModelProperty(value = "请假表单主键", required = true, example = "1024")
@Schema(description = "请假表单主键", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举")
@Schema(description = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举")
private Integer result;
@ApiModelProperty(value = "申请时间", required = true)
@Schema(description = "申请时间", required = true)
@NotNull(message = "申请时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime createTime;
@ApiModelProperty(value = "流程id")
@Schema(description = "流程id")
private String processInstanceId;
}
}

View File

@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO;
import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@ -18,7 +18,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 流程活动实例")
@Tag(name = "管理后台 - 流程活动实例")
@RestController
@RequestMapping("/bpm/activity")
@Validated
@ -28,12 +28,12 @@ public class BpmActivityController {
private BpmActivityService activityService;
@GetMapping("/list")
@ApiOperation(value = "生成指定流程实例的高亮流程图",
@Operation(summary = "生成指定流程实例的高亮流程图",
notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成")
@ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@Parameter(name = "processInstanceId", description = "流程实例的编号", required = true)
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<List<BpmActivityRespVO>> getActivityList(
@RequestParam("processInstanceId") String processInstanceId) {
return success(activityService.getActivityListByProcessInstanceId(processInstanceId));
}
}
}

View File

@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*;
import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -17,7 +17,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@Api(tags = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请”
@Tag(name = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请”
@RestController
@RequestMapping("/bpm/process-instance")
@Validated
@ -27,7 +27,7 @@ public class BpmProcessInstanceController {
private BpmProcessInstanceService processInstanceService;
@GetMapping("/my-page")
@ApiOperation(value = "获得我的实例分页列表", notes = "在【我的流程】菜单中,进行调用")
@Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用")
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
public CommonResult<PageResult<BpmProcessInstancePageItemRespVO>> getMyProcessInstancePage(
@Valid BpmProcessInstanceMyPageReqVO pageReqVO) {
@ -35,25 +35,25 @@ public class BpmProcessInstanceController {
}
@PostMapping("/create")
@ApiOperation("新建流程实例")
@Operation(summary = "新建流程实例")
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) {
return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO));
}
@GetMapping("/get")
@ApiOperation(value = "获得指定流程实例", notes = "在【流程详细】界面中,进行调用")
@ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用")
@Parameter(name = "id", description = "流程实例的编号", required = true)
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) {
return success(processInstanceService.getProcessInstanceVO(id));
}
@DeleteMapping("/cancel")
@ApiOperation(value = "取消流程实例", notes = "撤回发起的流程")
@Operation(summary = "取消流程实例", description = "撤回发起的流程")
@PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')")
public CommonResult<Boolean> cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) {
processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO);
return success(true);
}
}
}

View File

@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -19,7 +19,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
@Api(tags = "管理后台 - 流程任务实例")
@Tag(name = "管理后台 - 流程任务实例")
@RestController
@RequestMapping("/bpm/task")
@Validated
@ -29,22 +29,22 @@ public class BpmTaskController {
private BpmTaskService taskService;
@GetMapping("todo-page")
@ApiOperation("获取 Todo 待办任务分页")
@Operation(summary = "获取 Todo 待办任务分页")
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<PageResult<BpmTaskTodoPageItemRespVO>> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) {
return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO));
}
@GetMapping("done-page")
@ApiOperation("获取 Done 已办任务分页")
@Operation(summary = "获取 Done 已办任务分页")
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<PageResult<BpmTaskDonePageItemRespVO>> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) {
return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO));
}
@GetMapping("/list-by-process-instance-id")
@ApiOperation(value = "获得指定流程实例的任务列表", notes = "包括完成的、未完成的")
@ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的")
@Parameter(name = "processInstanceId", description = "流程实例的编号", required = true)
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId(
@RequestParam("processInstanceId") String processInstanceId) {
@ -52,7 +52,7 @@ public class BpmTaskController {
}
@PutMapping("/approve")
@ApiOperation("通过任务")
@Operation(summary = "通过任务")
@PreAuthorize("@ss.hasPermission('bpm:task:update')")
public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
taskService.approveTask(getLoginUserId(), reqVO);
@ -60,7 +60,7 @@ public class BpmTaskController {
}
@PutMapping("/reject")
@ApiOperation("不通过任务")
@Operation(summary = "不通过任务")
@PreAuthorize("@ss.hasPermission('bpm:task:update')")
public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) {
taskService.rejectTask(getLoginUserId(), reqVO);
@ -68,11 +68,11 @@ public class BpmTaskController {
}
@PutMapping("/update-assignee")
@ApiOperation(value = "更新任务的负责人", notes = "用于【流程详情】的【转派】按钮")
@Operation(summary = "更新任务的负责人", description = "用于【流程详情】的【转派】按钮")
@PreAuthorize("@ss.hasPermission('bpm:task:update')")
public CommonResult<Boolean> updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) {
taskService.updateTaskAssignee(getLoginUserId(), reqVO);
return success(true);
}
}
}

View File

@ -1,26 +1,26 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 流程活动的 Response VO")
@Schema(description = "管理后台 - 流程活动的 Response VO")
@Data
public class BpmActivityRespVO {
@ApiModelProperty(value = "流程活动的标识", required = true, example = "1024")
@Schema(description = "流程活动的标识", required = true, example = "1024")
private String key;
@ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent")
@Schema(description = "流程活动的类型", required = true, example = "StartEvent")
private String type;
@ApiModelProperty(value = "流程活动的开始时间", required = true)
@Schema(description = "流程活动的开始时间", required = true)
private LocalDateTime startTime;
@ApiModelProperty(value = "流程活动的结束时间", required = true)
@Schema(description = "流程活动的结束时间", required = true)
private LocalDateTime endTime;
@ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有")
@Schema(description = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有")
private String taskId;
}
}

View File

@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
@ApiModel("管理后台 - 流程实例的取消 Request VO")
@Schema(description = "管理后台 - 流程实例的取消 Request VO")
@Data
public class BpmProcessInstanceCancelReqVO {
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
@Schema(description = "流程实例的编号", required = true, example = "1024")
@NotEmpty(message = "流程实例的编号不能为空")
private String id;
@ApiModelProperty(value = "取消原因", required = true, example = "不请假了!")
@Schema(description = "取消原因", required = true, example = "不请假了!")
@NotEmpty(message = "取消原因不能为空")
private String reason;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.Map;
@ApiModel("管理后台 - 流程实例的创建 Request VO")
@Schema(description = "管理后台 - 流程实例的创建 Request VO")
@Data
public class BpmProcessInstanceCreateReqVO {
@ApiModelProperty(value = "流程定义的编号", required = true, example = "1024")
@Schema(description = "流程定义的编号", required = true, example = "1024")
@NotEmpty(message = "流程定义编号不能为空")
private String processDefinitionId;
@ApiModelProperty(value = "变量实例")
@Schema(description = "变量实例")
private Map<String, Object> variables;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,29 +12,29 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 流程实例的分页 Item Response VO")
@Schema(description = "管理后台 - 流程实例的分页 Item Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmProcessInstanceMyPageReqVO extends PageParam {
@ApiModelProperty(value = "流程名称", example = "芋道")
@Schema(description = "流程名称", example = "芋道")
private String name;
@ApiModelProperty(value = "流程定义的编号", example = "2048")
@Schema(description = "流程定义的编号", example = "2048")
private String processDefinitionId;
@ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1")
@Schema(description = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1")
private Integer status;
@ApiModelProperty(value = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2")
@Schema(description = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2")
private Integer result;
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
private String category;
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@ -1,38 +1,38 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel("管理后台 - 流程实例的分页 Item Response VO")
@Schema(description = "管理后台 - 流程实例的分页 Item Response VO")
@Data
public class BpmProcessInstancePageItemRespVO {
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
@Schema(description = "流程实例的编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", required = true, example = "芋道")
private String name;
@ApiModelProperty(value = "流程定义的编号", required = true, example = "2048")
@Schema(description = "流程定义的编号", required = true, example = "2048")
private String processDefinitionId;
@ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
private String category;
@ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
@Schema(description = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
private Integer status;
@ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
@Schema(description = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
private Integer result;
@ApiModelProperty(value = "提交时间", required = true)
@Schema(description = "提交时间", required = true)
private LocalDateTime createTime;
@ApiModelProperty(value = "结束时间", required = true)
@Schema(description = "结束时间", required = true)
private LocalDateTime endTime;
/**
@ -40,16 +40,16 @@ public class BpmProcessInstancePageItemRespVO {
*/
private List<Task> tasks;
@ApiModel("流程任务")
@Schema(description = "流程任务")
@Data
public static class Task {
@ApiModelProperty(value = "流程任务的编号", required = true, example = "1024")
@Schema(description = "流程任务的编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "任务名称", required = true, example = "芋道")
@Schema(description = "任务名称", required = true, example = "芋道")
private String name;
}
}
}

View File

@ -1,42 +1,42 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@ApiModel("管理后台 - 流程实例的 Response VO")
@Schema(description = "管理后台 - 流程实例的 Response VO")
@Data
public class BpmProcessInstanceRespVO {
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
@Schema(description = "流程实例的编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", required = true, example = "芋道")
private String name;
@ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
private String category;
@ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
@Schema(description = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
private Integer status;
@ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
@Schema(description = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
private Integer result;
@ApiModelProperty(value = "提交时间", required = true)
@Schema(description = "提交时间", required = true)
private LocalDateTime createTime;
@ApiModelProperty(value = "结束时间", required = true)
@Schema(description = "结束时间", required = true)
private LocalDateTime endTime;
@ApiModelProperty(value = "提交的表单值", required = true)
@Schema(description = "提交的表单值", required = true)
private Map<String, Object> formVariables;
@ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
@Schema(description = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
private String businessKey;
/**
@ -49,49 +49,49 @@ public class BpmProcessInstanceRespVO {
*/
private ProcessDefinition processDefinition;
@ApiModel("用户信息")
@Schema(description = "用户信息")
@Data
public static class User {
@ApiModelProperty(value = "用户编号", required = true, example = "1")
@Schema(description = "用户编号", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
@Schema(description = "用户昵称", required = true, example = "芋艿")
private String nickname;
@ApiModelProperty(value = "部门编号", required = true, example = "1")
@Schema(description = "部门编号", required = true, example = "1")
private Long deptId;
@ApiModelProperty(value = "部门名称", required = true, example = "研发部")
@Schema(description = "部门名称", required = true, example = "研发部")
private String deptName;
}
@ApiModel("流程定义信息")
@Schema(description = "流程定义信息")
@Data
public static class ProcessDefinition {
@ApiModelProperty(value = "编号", required = true, example = "1024")
@Schema(description = "编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
@Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private Long formId;
@ApiModelProperty(value = "表单的配置", required = true,
@Schema(description = "表单的配置", required = true,
notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formConf;
@ApiModelProperty(value = "表单项的数组", required = true,
@Schema(description = "表单项的数组", required = true,
notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private List<String> formFields;
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomCreatePath;
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
private String formCustomViewPath;
@ApiModelProperty(value = "BPMN XML", required = true)
@Schema(description = "BPMN XML", required = true)
private String bpmnXml;
}
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ApiModel("管理后台 - 通过流程任务的 Request VO")
@Schema(description = "管理后台 - 通过流程任务的 Request VO")
@Data
public class BpmTaskApproveReqVO {
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", required = true, example = "1024")
@NotEmpty(message = "任务编号不能为空")
private String id;
@ApiModelProperty(value = "审批意见", required = true, example = "不错不错!")
@Schema(description = "审批意见", required = true, example = "不错不错!")
@NotEmpty(message = "审批意见不能为空")
private String reason;
}
}

View File

@ -1,27 +1,27 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 流程任务的 Done 已完成的分页项 Response VO")
@Schema(description = "管理后台 - 流程任务的 Done 已完成的分页项 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO {
@ApiModelProperty(value = "结束时间", required = true)
@Schema(description = "结束时间", required = true)
private LocalDateTime endTime;
@ApiModelProperty(value = "持续时间", required = true, example = "1000")
@Schema(description = "持续时间", required = true, example = "1000")
private Long durationInMillis;
@ApiModelProperty(value = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
@Schema(description = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
private Integer result;
@ApiModelProperty(value = "审批建议", required = true, example = "不请假了!")
@Schema(description = "审批建议", required = true, example = "不请假了!")
private String reason;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,21 +12,21 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 流程任务的 Done 已办的分页 Request VO")
@Schema(description = "管理后台 - 流程任务的 Done 已办的分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskDonePageReqVO extends PageParam {
@ApiModelProperty(value = "流程任务名", example = "芋道")
@Schema(description = "流程任务名", example = "芋道")
private String name;
@ApiModelProperty(value = "开始的创建收间")
@Schema(description = "开始的创建收间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime beginCreateTime;
@ApiModelProperty(value = "结束的创建时间")
@Schema(description = "结束的创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endCreateTime;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ApiModel("管理后台 - 不通过流程任务的 Request VO")
@Schema(description = "管理后台 - 不通过流程任务的 Request VO")
@Data
public class BpmTaskRejectReqVO {
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", required = true, example = "1024")
@NotEmpty(message = "任务编号不能为空")
private String id;
@ApiModelProperty(value = "审批意见", required = true, example = "不错不错!")
@Schema(description = "审批意见", required = true, example = "不错不错!")
@NotEmpty(message = "审批意见不能为空")
private String reason;
}
}

View File

@ -1,18 +1,18 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程任务的 Response VO")
@Schema(description = "管理后台 - 流程任务的 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
@ApiModelProperty(value = "任务定义的标识", required = true, example = "user-001")
@Schema(description = "任务定义的标识", required = true, example = "user-001")
private String definitionKey;
/**
@ -20,19 +20,19 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
*/
private User assigneeUser;
@ApiModel("用户信息")
@Schema(description = "用户信息")
@Data
public static class User {
@ApiModelProperty(value = "用户编号", required = true, example = "1")
@Schema(description = "用户编号", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
@Schema(description = "用户昵称", required = true, example = "芋艿")
private String nickname;
@ApiModelProperty(value = "部门编号", required = true, example = "1")
@Schema(description = "部门编号", required = true, example = "1")
private Long deptId;
@ApiModelProperty(value = "部门名称", required = true, example = "研发部")
@Schema(description = "部门名称", required = true, example = "研发部")
private String deptName;
}
}
}

View File

@ -1,28 +1,28 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 流程任务的 Running 进行中的分页项 Response VO")
@Schema(description = "管理后台 - 流程任务的 Running 进行中的分页项 Response VO")
@Data
public class BpmTaskTodoPageItemRespVO {
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "任务名字", required = true, example = "芋道")
@Schema(description = "任务名字", required = true, example = "芋道")
private String name;
@ApiModelProperty(value = "接收时间", required = true)
@Schema(description = "接收时间", required = true)
private LocalDateTime claimTime;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
@ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
@Schema(description = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
private Integer suspensionState;
/**
@ -31,24 +31,24 @@ public class BpmTaskTodoPageItemRespVO {
private ProcessInstance processInstance;
@Data
@ApiModel("流程实例")
@Schema(description = "流程实例")
public static class ProcessInstance {
@ApiModelProperty(value = "流程实例编号", required = true, example = "1024")
@Schema(description = "流程实例编号", required = true, example = "1024")
private String id;
@ApiModelProperty(value = "流程实例名称", required = true, example = "芋道")
@Schema(description = "流程实例名称", required = true, example = "芋道")
private String name;
@ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024")
@Schema(description = "发起人的用户编号", required = true, example = "1024")
private Long startUserId;
@ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿")
@Schema(description = "发起人的用户昵称", required = true, example = "芋艿")
private String startUserNickname;
@ApiModelProperty(value = "流程定义的编号", required = true, example = "2048")
@Schema(description = "流程定义的编号", required = true, example = "2048")
private String processDefinitionId;
}
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,21 +12,21 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 流程任务的 TODO 待办的分页 Request VO")
@Schema(description = "管理后台 - 流程任务的 TODO 待办的分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmTaskTodoPageReqVO extends PageParam {
@ApiModelProperty(value = "流程任务名", example = "芋道")
@Schema(description = "流程任务名", example = "芋道")
private String name;
@ApiModelProperty(value = "开始的创建收间")
@Schema(description = "开始的创建收间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime beginCreateTime;
@ApiModelProperty(value = "结束的创建时间")
@Schema(description = "结束的创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endCreateTime;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -10,16 +10,16 @@ import net.bytebuddy.implementation.bind.annotation.Empty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@ApiModel("管理后台 - 流程任务的更新负责人的 Request VO")
@Schema(description = "管理后台 - 流程任务的更新负责人的 Request VO")
@Data
public class BpmTaskUpdateAssigneeReqVO {
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", required = true, example = "1024")
@NotEmpty(message = "任务编号不能为空")
private String id;
@ApiModelProperty(value = "新审批人的用户编号", required = true, example = "2048")
@Schema(description = "新审批人的用户编号", required = true, example = "2048")
@NotNull(message = "新审批人的用户编号不能为空")
private Long assigneeUserId;
}
}

View File

@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.infra.api.file;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.infra.api.file.dto.FileCreateReqDTO;
import cn.iocoder.yudao.module.infra.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@Api(tags = "RPC 服务 - 文件")
@Tag(name = "RPC 服务 - 文件")
public interface FileApi {
String PREFIX = ApiConstants.PREFIX + "/file";
@ -54,7 +54,7 @@ public interface FileApi {
}
@PostMapping(PREFIX + "/create")
@ApiOperation("保存文件,并返回文件的访问路径")
@Operation(summary = "保存文件,并返回文件的访问路径")
CommonResult<String> createFile(@Valid @RequestBody FileCreateReqDTO createReqDTO);
}
}

View File

@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.infra.api.file.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ApiModel("RPC 服务 - 文件创建 Request DTO")
@Schema(description = "RPC 服务 - 文件创建 Request DTO")
@Data
public class FileCreateReqDTO {
@ApiModelProperty(value = "原文件名称", example = "xxx.png")
@Schema(description = "原文件名称", example = "xxx.png")
private String name;
@ApiModelProperty(value = "文件路径", example = "xxx.png")
@Schema(description = "文件路径", example = "xxx.png")
private String path;
@ApiModelProperty(value = "文件内容", required = true)
@Schema(description = "文件内容", required = true)
@NotEmpty(message = "文件内容不能为空")
private byte[] content;
}
}

View File

@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.infra.api.logger;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO;
import cn.iocoder.yudao.module.infra.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@Api(tags = "RPC 服务 - API 访问日志")
@Tag(name = "RPC 服务 - API 访问日志")
public interface ApiAccessLogApi {
String PREFIX = ApiConstants.PREFIX + "/api-access-log";
@PostMapping(PREFIX + "/create")
@ApiOperation("创建 API 访问日志")
@Operation(summary = "创建 API 访问日志")
CommonResult<Boolean> createApiAccessLog(@Valid @RequestBody ApiAccessLogCreateReqDTO createDTO);
}
}

View File

@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.infra.api.logger;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO;
import cn.iocoder.yudao.module.infra.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@Api(tags = "RPC 服务 - API 异常日志")
@Tag(name = "RPC 服务 - API 异常日志")
public interface ApiErrorLogApi {
String PREFIX = ApiConstants.PREFIX + "/api-error-log";
@PostMapping(PREFIX + "/create")
@ApiOperation("创建 API 异常日志")
@Operation(summary = "创建 API 异常日志")
CommonResult<Boolean> createApiErrorLog(@Valid @RequestBody ApiErrorLogCreateReqDTO createDTO);
}
}

View File

@ -1,56 +1,56 @@
package cn.iocoder.yudao.module.infra.api.logger.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@ApiModel("RPC 服务 - API 访问日志创建 Request DTO")
@Schema(description = "RPC 服务 - API 访问日志创建 Request DTO")
@Data
public class ApiAccessLogCreateReqDTO {
@ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId;
@ApiModelProperty(value = "用户编号", required = true, example = "1024")
@Schema(description = "用户编号", required = true, example = "1024")
private Long userId;
@ApiModelProperty(value = "用户类型", required = true, example = "1")
@Schema(description = "用户类型", required = true, example = "1")
private Integer userType;
@ApiModelProperty(value = "应用名", required = true, example = "system-server")
@Schema(description = "应用名", required = true, example = "system-server")
@NotNull(message = "应用名不能为空")
private String applicationName;
@ApiModelProperty(value = "请求方法名", required = true, example = "GET")
@Schema(description = "请求方法名", required = true, example = "GET")
@NotNull(message = "http 请求方法不能为空")
private String requestMethod;
@ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
@Schema(description = "请求地址", required = true, example = "/xxx/yyy")
@NotNull(message = "访问地址不能为空")
private String requestUrl;
@ApiModelProperty(value = "请求参数", required = true)
@Schema(description = "请求参数", required = true)
@NotNull(message = "请求参数不能为空")
private String requestParams;
@ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
@Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotNull(message = "ip 不能为空")
private String userIp;
@ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@NotNull(message = "User-Agent 不能为空")
private String userAgent;
@ApiModelProperty(value = "开始时间", required = true)
@Schema(description = "开始时间", required = true)
@NotNull(message = "开始请求时间不能为空")
private LocalDateTime beginTime;
@ApiModelProperty(value = "结束时间", required = true)
@Schema(description = "结束时间", required = true)
@NotNull(message = "结束请求时间不能为空")
private LocalDateTime endTime;
@ApiModelProperty(value = "执行时长,单位:毫秒", required = true)
@Schema(description = "执行时长,单位:毫秒", required = true)
@NotNull(message = "执行时长不能为空")
private Integer duration;
@ApiModelProperty(value = "结果码", required = true)
@Schema(description = "结果码", required = true)
@NotNull(message = "错误码不能为空")
private Integer resultCode;
@ApiModelProperty(value = "结果提示")
@Schema(description = "结果提示")
private String resultMsg;
}
}

View File

@ -1,69 +1,69 @@
package cn.iocoder.yudao.module.infra.api.logger.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@ApiModel("RPC 服务 - API 错误日志创建 Request DTO")
@Schema(description = "RPC 服务 - API 错误日志创建 Request DTO")
@Data
public class ApiErrorLogCreateReqDTO {
@ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId;
@ApiModelProperty(value = "用户编号", required = true, example = "1024")
@Schema(description = "用户编号", required = true, example = "1024")
private Long userId;
@ApiModelProperty(value = "用户类型", required = true, example = "1")
@Schema(description = "用户类型", required = true, example = "1")
private Integer userType;
@ApiModelProperty(value = "应用名", required = true, example = "system-server")
@Schema(description = "应用名", required = true, example = "system-server")
@NotNull(message = "应用名不能为空")
private String applicationName;
@ApiModelProperty(value = "请求方法名", required = true, example = "GET")
@Schema(description = "请求方法名", required = true, example = "GET")
@NotNull(message = "http 请求方法不能为空")
private String requestMethod;
@ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
@Schema(description = "请求地址", required = true, example = "/xxx/yyy")
@NotNull(message = "访问地址不能为空")
private String requestUrl;
@ApiModelProperty(value = "请求参数", required = true)
@Schema(description = "请求参数", required = true)
@NotNull(message = "请求参数不能为空")
private String requestParams;
@ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
@Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotNull(message = "ip 不能为空")
private String userIp;
@ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@NotNull(message = "User-Agent 不能为空")
private String userAgent;
@ApiModelProperty(value = "异常时间", required = true)
@Schema(description = "异常时间", required = true)
@NotNull(message = "异常时间不能为空")
private LocalDateTime exceptionTime;
@ApiModelProperty(value = "异常名", required = true)
@Schema(description = "异常名", required = true)
@NotNull(message = "异常名不能为空")
private String exceptionName;
@ApiModelProperty(value = "异常发生的类全名", required = true)
@Schema(description = "异常发生的类全名", required = true)
@NotNull(message = "异常发生的类全名不能为空")
private String exceptionClassName;
@ApiModelProperty(value = "异常发生的类文件", required = true)
@Schema(description = "异常发生的类文件", required = true)
@NotNull(message = "异常发生的类文件不能为空")
private String exceptionFileName;
@ApiModelProperty(value = "异常发生的方法名", required = true)
@Schema(description = "异常发生的方法名", required = true)
@NotNull(message = "异常发生的方法名不能为空")
private String exceptionMethodName;
@ApiModelProperty(value = "异常发生的方法所在行", required = true)
@Schema(description = "异常发生的方法所在行", required = true)
@NotNull(message = "异常发生的方法所在行不能为空")
private Integer exceptionLineNumber;
@ApiModelProperty(value = "异常的栈轨迹异常的栈轨迹", required = true)
@Schema(description = "异常的栈轨迹异常的栈轨迹", required = true)
@NotNull(message = "异常的栈轨迹不能为空")
private String exceptionStackTrace;
@ApiModelProperty(value = "异常导致的根消息", required = true)
@Schema(description = "异常导致的根消息", required = true)
@NotNull(message = "异常导致的根消息不能为空")
private String exceptionRootCauseMessage;
@ApiModelProperty(value = "异常导致的消息", required = true)
@Schema(description = "异常导致的消息", required = true)
@NotNull(message = "异常导致的消息不能为空")
private String exceptionMessage;
}
}

View File

@ -16,10 +16,10 @@ import cn.iocoder.yudao.module.infra.convert.codegen.CodegenConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
import cn.iocoder.yudao.module.infra.service.codegen.CodegenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -36,7 +36,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@Api(tags = "管理后台 - 代码生成器")
@Tag(name = "管理后台 - 代码生成器")
@RestController
@RequestMapping("/infra/codegen")
@Validated
@ -46,11 +46,11 @@ public class CodegenController {
private CodegenService codegenService;
@GetMapping("/db/table/list")
@ApiOperation(value = "获得数据库自带的表定义列表", notes = "会过滤掉已经导入 Codegen 的表")
@ApiImplicitParams({
@ApiImplicitParam(name = "dataSourceConfigId", value = "数据源配置的编号", required = true, example = "1", dataTypeClass = Long.class),
@ApiImplicitParam(name = "name", value = "表名,模糊匹配", example = "yudao", dataTypeClass = String.class),
@ApiImplicitParam(name = "comment", value = "描述,模糊匹配", example = "芋道", dataTypeClass = String.class)
@Operation(summary = "获得数据库自带的表定义列表", description = "会过滤掉已经导入 Codegen 的表")
@Parameters({
@Parameter(name = "dataSourceConfigId", description = "数据源配置的编号", required = true, example = "1"),
@Parameter(name = "name", description = "表名,模糊匹配", example = "yudao"),
@Parameter(name = "comment", description = "描述,模糊匹配", example = "芋道")
})
@PreAuthorize("@ss.hasPermission('infra:codegen:query')")
public CommonResult<List<DatabaseTableRespVO>> getDatabaseTableList(
@ -61,7 +61,7 @@ public class CodegenController {
}
@GetMapping("/table/page")
@ApiOperation("获得表定义分页")
@Operation(summary = "获得表定义分页")
@PreAuthorize("@ss.hasPermission('infra:codegen:query')")
public CommonResult<PageResult<CodegenTableRespVO>> getCodeGenTablePage(@Valid CodegenTablePageReqVO pageReqVO) {
PageResult<CodegenTableDO> pageResult = codegenService.getCodegenTablePage(pageReqVO);
@ -69,8 +69,8 @@ public class CodegenController {
}
@GetMapping("/detail")
@ApiOperation("获得表和字段的明细")
@ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得表和字段的明细")
@Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:query')")
public CommonResult<CodegenDetailRespVO> getCodegenDetail(@RequestParam("tableId") Long tableId) {
CodegenTableDO table = codegenService.getCodegenTablePage(tableId);
@ -79,14 +79,14 @@ public class CodegenController {
return success(CodegenConvert.INSTANCE.convert(table, columns));
}
@ApiOperation("基于数据库的表结构,创建代码生成器的表和字段定义")
@Operation(summary = "基于数据库的表结构,创建代码生成器的表和字段定义")
@PostMapping("/create-list")
@PreAuthorize("@ss.hasPermission('infra:codegen:create')")
public CommonResult<List<Long>> createCodegenList(@Valid @RequestBody CodegenCreateListReqVO reqVO) {
return success(codegenService.createCodegenList(getLoginUserId(), reqVO));
}
@ApiOperation("更新数据库的表和字段定义")
@Operation(summary = "更新数据库的表和字段定义")
@PutMapping("/update")
@PreAuthorize("@ss.hasPermission('infra:codegen:update')")
public CommonResult<Boolean> updateCodegen(@Valid @RequestBody CodegenUpdateReqVO updateReqVO) {
@ -94,36 +94,36 @@ public class CodegenController {
return success(true);
}
@ApiOperation("基于数据库的表结构,同步数据库的表和字段定义")
@Operation(summary = "基于数据库的表结构,同步数据库的表和字段定义")
@PutMapping("/sync-from-db")
@ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
@Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:update')")
public CommonResult<Boolean> syncCodegenFromDB(@RequestParam("tableId") Long tableId) {
codegenService.syncCodegenFromDB(tableId);
return success(true);
}
@ApiOperation("删除数据库的表和字段定义")
@Operation(summary = "删除数据库的表和字段定义")
@DeleteMapping("/delete")
@ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
@Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:delete')")
public CommonResult<Boolean> deleteCodegen(@RequestParam("tableId") Long tableId) {
codegenService.deleteCodegen(tableId);
return success(true);
}
@ApiOperation("预览生成代码")
@Operation(summary = "预览生成代码")
@GetMapping("/preview")
@ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
@Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:preview')")
public CommonResult<List<CodegenPreviewRespVO>> previewCodegen(@RequestParam("tableId") Long tableId) {
Map<String, String> codes = codegenService.generationCodes(tableId);
return success(CodegenConvert.INSTANCE.convert(codes));
}
@ApiOperation("下载生成代码")
@Operation(summary = "下载生成代码")
@GetMapping("/download")
@ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
@Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:download')")
public void downloadCodegen(@RequestParam("tableId") Long tableId,
HttpServletResponse response) throws IOException {
@ -138,4 +138,4 @@ public class CodegenController {
ServletUtils.writeAttachment(response, "codegen.zip", outputStream.toByteArray());
}
}
}

View File

@ -1,22 +1,22 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
@Schema(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
@Data
public class CodegenCreateListReqVO {
@ApiModelProperty(value = "数据源配置的编号", required = true, example = "1")
@Schema(description = "数据源配置的编号", required = true, example = "1")
@NotNull(message = "数据源配置的编号不能为空")
private Long dataSourceConfigId;
@ApiModelProperty(value = "表名数组", required = true, example = "[1, 2, 3]")
@Schema(description = "表名数组", required = true, example = "[1, 2, 3]")
@NotNull(message = "表名数组不能为空")
private List<String> tableNames;
}
}

View File

@ -2,13 +2,13 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnRespVO;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableRespVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@ApiModel("管理后台 - 代码生成表和字段的明细 Response VO")
@Schema(description = "管理后台 - 代码生成表和字段的明细 Response VO")
@Data
public class CodegenDetailRespVO {
@ -18,4 +18,4 @@ public class CodegenDetailRespVO {
@ApiModelProperty("字段定义")
private List<CodegenColumnRespVO> columns;
}
}

View File

@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ApiModel(value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象")
@Schema(description = value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象")
@Data
public class CodegenPreviewRespVO {
@ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java")
@Schema(description = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java")
private String filePath;
@ApiModelProperty(value = "代码", required = true, example = "Hello World")
@Schema(description = "代码", required = true, example = "Hello World")
private String code;
}
}

View File

@ -4,8 +4,8 @@ import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnBaseVO;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableBaseVO;
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -15,7 +15,7 @@ import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 代码生成表和字段的修改 Request VO")
@Schema(description = "管理后台 - 代码生成表和字段的修改 Request VO")
@Data
public class CodegenUpdateReqVO {
@ -27,14 +27,14 @@ public class CodegenUpdateReqVO {
@NotNull(message = "字段定义不能为空")
private List<Column> columns;
@ApiModel("更新表定义")
@Schema(description = "更新表定义")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Valid
public static class Table extends CodegenTableBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
@Schema(description = "编号", required = true, example = "1")
private Long id;
@AssertTrue(message = "上级菜单不能为空")
@ -46,15 +46,15 @@ public class CodegenUpdateReqVO {
}
@ApiModel("更新表定义")
@Schema(description = "更新表定义")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public static class Column extends CodegenColumnBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
@Schema(description = "编号", required = true, example = "1")
private Long id;
}
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@ -12,74 +12,74 @@ import javax.validation.constraints.NotNull;
@Data
public class CodegenColumnBaseVO {
@ApiModelProperty(value = "表编号", required = true, example = "1")
@Schema(description = "表编号", required = true, example = "1")
@NotNull(message = "表编号不能为空")
private Long tableId;
@ApiModelProperty(value = "字段名", required = true, example = "user_age")
@Schema(description = "字段名", required = true, example = "user_age")
@NotNull(message = "字段名不能为空")
private String columnName;
@ApiModelProperty(value = "字段类型", required = true, example = "int(11)")
@Schema(description = "字段类型", required = true, example = "int(11)")
@NotNull(message = "字段类型不能为空")
private String dataType;
@ApiModelProperty(value = "字段描述", required = true, example = "年龄")
@Schema(description = "字段描述", required = true, example = "年龄")
@NotNull(message = "字段描述不能为空")
private String columnComment;
@ApiModelProperty(value = "是否允许为空", required = true, example = "true")
@Schema(description = "是否允许为空", required = true, example = "true")
@NotNull(message = "是否允许为空不能为空")
private Boolean nullable;
@ApiModelProperty(value = "是否主键", required = true, example = "false")
@Schema(description = "是否主键", required = true, example = "false")
@NotNull(message = "是否主键不能为空")
private Boolean primaryKey;
@ApiModelProperty(value = "是否自增", required = true, example = "true")
@Schema(description = "是否自增", required = true, example = "true")
@NotNull(message = "是否自增不能为空")
private String autoIncrement;
@ApiModelProperty(value = "排序", required = true, example = "10")
@Schema(description = "排序", required = true, example = "10")
@NotNull(message = "排序不能为空")
private Integer ordinalPosition;
@ApiModelProperty(value = "Java 属性类型", required = true, example = "userAge")
@Schema(description = "Java 属性类型", required = true, example = "userAge")
@NotNull(message = "Java 属性类型不能为空")
private String javaType;
@ApiModelProperty(value = "Java 属性名", required = true, example = "Integer")
@Schema(description = "Java 属性名", required = true, example = "Integer")
@NotNull(message = "Java 属性名不能为空")
private String javaField;
@ApiModelProperty(value = "字典类型", example = "sys_gender")
@Schema(description = "字典类型", example = "sys_gender")
private String dictType;
@ApiModelProperty(value = "数据示例", example = "1024")
@Schema(description = "数据示例", example = "1024")
private String example;
@ApiModelProperty(value = "是否为 Create 创建操作的字段", required = true, example = "true")
@Schema(description = "是否为 Create 创建操作的字段", required = true, example = "true")
@NotNull(message = "是否为 Create 创建操作的字段不能为空")
private Boolean createOperation;
@ApiModelProperty(value = "是否为 Update 更新操作的字段", required = true, example = "false")
@Schema(description = "是否为 Update 更新操作的字段", required = true, example = "false")
@NotNull(message = "是否为 Update 更新操作的字段不能为空")
private Boolean updateOperation;
@ApiModelProperty(value = "是否为 List 查询操作的字段", required = true, example = "true")
@Schema(description = "是否为 List 查询操作的字段", required = true, example = "true")
@NotNull(message = "是否为 List 查询操作的字段不能为空")
private Boolean listOperation;
@ApiModelProperty(value = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举")
@Schema(description = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举")
@NotNull(message = "List 查询操作的条件类型不能为空")
private String listOperationCondition;
@ApiModelProperty(value = "是否为 List 查询操作的返回字段", required = true, example = "true")
@Schema(description = "是否为 List 查询操作的返回字段", required = true, example = "true")
@NotNull(message = "是否为 List 查询操作的返回字段不能为空")
private Boolean listOperationResult;
@ApiModelProperty(value = "显示类型", required = true, example = "input")
@Schema(description = "显示类型", required = true, example = "input")
@NotNull(message = "显示类型不能为空")
private String htmlType;
}
}

View File

@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 代码生成字段定义 Response VO")
@Schema(description = "管理后台 - 代码生成字段定义 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodegenColumnRespVO extends CodegenColumnBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
@Schema(description = "编号", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@ -12,46 +12,46 @@ import javax.validation.constraints.NotNull;
@Data
public class CodegenTableBaseVO {
@ApiModelProperty(value = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举")
@Schema(description = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举")
@NotNull(message = "导入类型不能为空")
private Integer scene;
@ApiModelProperty(value = "表名称", required = true, example = "yudao")
@Schema(description = "表名称", required = true, example = "yudao")
@NotNull(message = "表名称不能为空")
private String tableName;
@ApiModelProperty(value = "表描述", required = true, example = "芋道")
@Schema(description = "表描述", required = true, example = "芋道")
@NotNull(message = "表描述不能为空")
private String tableComment;
@ApiModelProperty(value = "备注", example = "我是备注")
@Schema(description = "备注", example = "我是备注")
private String remark;
@ApiModelProperty(value = "模块名", required = true, example = "system")
@Schema(description = "模块名", required = true, example = "system")
@NotNull(message = "模块名不能为空")
private String moduleName;
@ApiModelProperty(value = "业务名", required = true, example = "codegen")
@Schema(description = "业务名", required = true, example = "codegen")
@NotNull(message = "业务名不能为空")
private String businessName;
@ApiModelProperty(value = "类名称", required = true, example = "CodegenTable")
@Schema(description = "类名称", required = true, example = "CodegenTable")
@NotNull(message = "类名称不能为空")
private String className;
@ApiModelProperty(value = "类描述", required = true, example = "代码生成器的表定义")
@Schema(description = "类描述", required = true, example = "代码生成器的表定义")
@NotNull(message = "类描述不能为空")
private String classComment;
@ApiModelProperty(value = "作者", required = true, example = "芋道源码")
@Schema(description = "作者", required = true, example = "芋道源码")
@NotNull(message = "作者不能为空")
private String author;
@ApiModelProperty(value = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举")
@Schema(description = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举")
@NotNull(message = "模板类型不能为空")
private Integer templateType;
@ApiModelProperty(value = "父菜单编号", example = "1024")
@Schema(description = "父菜单编号", example = "1024")
private Long parentMenuId;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,20 +12,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 表定义分页 Request VO")
@Schema(description = "管理后台 - 表定义分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodegenTablePageReqVO extends PageParam {
@ApiModelProperty(value = "表名称", example = "yudao", notes = "模糊匹配")
@Schema(description = "表名称", example = "yudao", notes = "模糊匹配")
private String tableName;
@ApiModelProperty(value = "表描述", example = "芋道", notes = "模糊匹配")
@Schema(description = "表描述", example = "芋道", notes = "模糊匹配")
private String tableComment;
@ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@ -1,29 +1,29 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 代码生成表定义 Response VO")
@Schema(description = "管理后台 - 代码生成表定义 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodegenTableRespVO extends CodegenTableBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
@Schema(description = "编号", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "主键编号", required = true, example = "1024")
@Schema(description = "主键编号", required = true, example = "1024")
private Integer dataSourceConfigId;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
@ApiModelProperty(value = "更新时间", required = true)
@Schema(description = "更新时间", required = true)
private LocalDateTime updateTime;
}
}

View File

@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ApiModel("管理后台 - 数据库的表定义 Response VO")
@Schema(description = "管理后台 - 数据库的表定义 Response VO")
@Data
public class DatabaseTableRespVO {
@ApiModelProperty(value = "表名称", required = true, example = "yuanma")
@Schema(description = "表名称", required = true, example = "yuanma")
private String name;
@ApiModelProperty(value = "表描述", required = true, example = "芋道源码")
@Schema(description = "表描述", required = true, example = "芋道源码")
private String comment;
}
}

View File

@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.infra.service.config.ConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -26,7 +26,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Api(tags = "管理后台 - 参数配置")
@Tag(name = "管理后台 - 参数配置")
@RestController
@RequestMapping("/infra/config")
@Validated
@ -36,14 +36,14 @@ public class ConfigController {
private ConfigService configService;
@PostMapping("/create")
@ApiOperation("创建参数配置")
@Operation(summary = "创建参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:create')")
public CommonResult<Long> createConfig(@Valid @RequestBody ConfigCreateReqVO reqVO) {
return success(configService.createConfig(reqVO));
}
@PutMapping("/update")
@ApiOperation("修改参数配置")
@Operation(summary = "修改参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:update')")
public CommonResult<Boolean> updateConfig(@Valid @RequestBody ConfigUpdateReqVO reqVO) {
configService.updateConfig(reqVO);
@ -51,8 +51,8 @@ public class ConfigController {
}
@DeleteMapping("/delete")
@ApiOperation("删除参数配置")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "删除参数配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:config:delete')")
public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) {
configService.deleteConfig(id);
@ -60,16 +60,16 @@ public class ConfigController {
}
@GetMapping(value = "/get")
@ApiOperation("获得参数配置")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得参数配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:config:query')")
public CommonResult<ConfigRespVO> getConfig(@RequestParam("id") Long id) {
return success(ConfigConvert.INSTANCE.convert(configService.getConfig(id)));
}
@GetMapping(value = "/get-value-by-key")
@ApiOperation(value = "根据参数键名查询参数值", notes = "不可见的配置,不允许返回给前端")
@ApiImplicitParam(name = "key", value = "参数键", required = true, example = "yunai.biz.username", dataTypeClass = String.class)
@Operation(summary = "根据参数键名查询参数值", description = "不可见的配置,不允许返回给前端")
@Parameter(name = "key", description = "参数键", required = true, example = "yunai.biz.username")
public CommonResult<String> getConfigKey(@RequestParam("key") String key) {
ConfigDO config = configService.getConfigByKey(key);
if (config == null) {
@ -82,7 +82,7 @@ public class ConfigController {
}
@GetMapping("/page")
@ApiOperation("获取参数配置分页")
@Operation(summary = "获取参数配置分页")
@PreAuthorize("@ss.hasPermission('infra:config:query')")
public CommonResult<PageResult<ConfigRespVO>> getConfigPage(@Valid ConfigPageReqVO reqVO) {
PageResult<ConfigDO> page = configService.getConfigPage(reqVO);
@ -90,7 +90,7 @@ public class ConfigController {
}
@GetMapping("/export")
@ApiOperation("导出参数配置")
@Operation(summary = "导出参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:export')")
@OperateLog(type = EXPORT)
public void exportSysConfig(@Valid ConfigExportReqVO reqVO,
@ -102,4 +102,4 @@ public class ConfigController {
ExcelUtils.write(response, "参数配置.xls", "数据", ConfigExcelVO.class, datas);
}
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ -15,26 +15,26 @@ import javax.validation.constraints.Size;
@Data
public class ConfigBaseVO {
@ApiModelProperty(value = "参数分组", required = true, example = "biz")
@Schema(description = "参数分组", required = true, example = "biz")
@NotEmpty(message = "参数分组不能为空")
@Size(max = 50, message = "参数名称不能超过50个字符")
private String category;
@ApiModelProperty(value = "参数名称", required = true, example = "数据库名")
@Schema(description = "参数名称", required = true, example = "数据库名")
@NotBlank(message = "参数名称不能为空")
@Size(max = 100, message = "参数名称不能超过100个字符")
private String name;
@ApiModelProperty(value = "参数键值", required = true, example = "1024")
@Schema(description = "参数键值", required = true, example = "1024")
@NotBlank(message = "参数键值不能为空")
@Size(max = 500, message = "参数键值长度不能超过500个字符")
private String value;
@ApiModelProperty(value = "是否敏感", required = true, example = "true")
@Schema(description = "是否敏感", required = true, example = "true")
@NotNull(message = "是否敏感不能为空")
private Boolean visible;
@ApiModelProperty(value = "备注", example = "备注一下很帅气!")
@Schema(description = "备注", example = "备注一下很帅气!")
private String remark;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
@ApiModel("管理后台 - 参数配置创建 Request VO")
@Schema(description = "管理后台 - 参数配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class ConfigCreateReqVO extends ConfigBaseVO {
@ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username")
@Schema(description = "参数键名", required = true, example = "yunai.db.username")
@NotBlank(message = "参数键名长度不能为空")
@Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@ -9,21 +9,21 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 参数配置导出 Request VO")
@Schema(description = "管理后台 - 参数配置导出 Request VO")
@Data
public class ConfigExportReqVO {
@ApiModelProperty(value = "参数名称", example = "模糊匹配")
@Schema(description = "参数名称", example = "模糊匹配")
private String name;
@ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
@Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
private String key;
@ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
@Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
private Integer type;
@ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,23 +12,23 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 参数配置分页 Request VO")
@Schema(description = "管理后台 - 参数配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ConfigPageReqVO extends PageParam {
@ApiModelProperty(value = "数据源名称", example = "模糊匹配")
@Schema(description = "数据源名称", example = "模糊匹配")
private String name;
@ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
@Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
private String key;
@ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
@Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
private Integer type;
@ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,23 +9,23 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 参数配置信息 Response VO")
@Schema(description = "管理后台 - 参数配置信息 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class ConfigRespVO extends ConfigBaseVO {
@ApiModelProperty(value = "参数配置序号", required = true, example = "1024")
@Schema(description = "参数配置序号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username")
@Schema(description = "参数键名", required = true, example = "yunai.db.username")
@NotBlank(message = "参数键名长度不能为空")
@Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key;
@ApiModelProperty(value = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举")
@Schema(description = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举")
private Integer type;
@ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
@Schema(description = "创建时间", required = true, example = "时间戳格式")
private LocalDateTime createTime;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@ApiModel("管理后台 - 参数配置创建 Request VO")
@Schema(description = "管理后台 - 参数配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ConfigUpdateReqVO extends ConfigBaseVO {
@ApiModelProperty(value = "参数配置序号", required = true, example = "1024")
@Schema(description = "参数配置序号", required = true, example = "1024")
@NotNull(message = "参数配置编号不能为空")
private Long id;
}
}

View File

@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigUpda
import cn.iocoder.yudao.module.infra.convert.db.DataSourceConfigConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -20,7 +20,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 数据源配置")
@Tag(name = "管理后台 - 数据源配置")
@RestController
@RequestMapping("/infra/data-source-config")
@Validated
@ -30,14 +30,14 @@ public class DataSourceConfigController {
private DataSourceConfigService dataSourceConfigService;
@PostMapping("/create")
@ApiOperation("创建数据源配置")
@Operation(summary = "创建数据源配置")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:create')")
public CommonResult<Long> createDataSourceConfig(@Valid @RequestBody DataSourceConfigCreateReqVO createReqVO) {
return success(dataSourceConfigService.createDataSourceConfig(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新数据源配置")
@Operation(summary = "更新数据源配置")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:update')")
public CommonResult<Boolean> updateDataSourceConfig(@Valid @RequestBody DataSourceConfigUpdateReqVO updateReqVO) {
dataSourceConfigService.updateDataSourceConfig(updateReqVO);
@ -45,8 +45,8 @@ public class DataSourceConfigController {
}
@DeleteMapping("/delete")
@ApiOperation("删除数据源配置")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除数据源配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:data-source-config:delete')")
public CommonResult<Boolean> deleteDataSourceConfig(@RequestParam("id") Long id) {
dataSourceConfigService.deleteDataSourceConfig(id);
@ -54,8 +54,8 @@ public class DataSourceConfigController {
}
@GetMapping("/get")
@ApiOperation("获得数据源配置")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得数据源配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:query')")
public CommonResult<DataSourceConfigRespVO> getDataSourceConfig(@RequestParam("id") Long id) {
DataSourceConfigDO dataSourceConfig = dataSourceConfigService.getDataSourceConfig(id);
@ -63,11 +63,11 @@ public class DataSourceConfigController {
}
@GetMapping("/list")
@ApiOperation("获得数据源配置列表")
@Operation(summary = "获得数据源配置列表")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:query')")
public CommonResult<List<DataSourceConfigRespVO>> getDataSourceConfigList() {
List<DataSourceConfigDO> list = dataSourceConfigService.getDataSourceConfigList();
return success(DataSourceConfigConvert.INSTANCE.convertList(list));
}
}
}

View File

@ -13,9 +13,9 @@ import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourcePrope
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -27,7 +27,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Arrays;
@Api(tags = "管理后台 - 数据库文档")
@Tag(name = "管理后台 - 数据库文档")
@RestController
@RequestMapping("/infra/db-doc")
public class DatabaseDocController {
@ -42,8 +42,8 @@ public class DatabaseDocController {
private static final String DOC_DESCRIPTION = "文档描述";
@GetMapping("/export-html")
@ApiOperation("导出 html 格式的数据文档")
@ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true",
@Operation(summary = "导出 html 格式的数据文档")
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true",
dataTypeClass = Boolean.class)
public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
@ -51,8 +51,8 @@ public class DatabaseDocController {
}
@GetMapping("/export-word")
@ApiOperation("导出 word 格式的数据文档")
@ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true",
@Operation(summary = "导出 word 格式的数据文档")
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true",
dataTypeClass = Boolean.class)
public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
@ -60,8 +60,8 @@ public class DatabaseDocController {
}
@GetMapping("/export-markdown")
@ApiOperation("导出 markdown 格式的数据文档")
@ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true",
@Operation(summary = "导出 markdown 格式的数据文档")
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true",
dataTypeClass = Boolean.class)
public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
@ -154,4 +154,4 @@ public class DatabaseDocController {
.build();
}
}
}

View File

@ -12,16 +12,16 @@ import javax.validation.constraints.*;
@Data
public class DataSourceConfigBaseVO {
@ApiModelProperty(value = "数据源名称", required = true, example = "test")
@Schema(description = "数据源名称", required = true, example = "test")
@NotNull(message = "数据源名称不能为空")
private String name;
@ApiModelProperty(value = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro")
@Schema(description = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro")
@NotNull(message = "数据源连接不能为空")
private String url;
@ApiModelProperty(value = "用户名", required = true, example = "root")
@Schema(description = "用户名", required = true, example = "root")
@NotNull(message = "用户名不能为空")
private String username;
}
}

View File

@ -5,14 +5,14 @@ import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 数据源配置创建 Request VO")
@Schema(description = "管理后台 - 数据源配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO {
@ApiModelProperty(value = "密码", required = true, example = "123456")
@Schema(description = "密码", required = true, example = "123456")
@NotNull(message = "密码不能为空")
private String password;
}
}

View File

@ -6,16 +6,16 @@ import java.time.LocalDateTime;
import java.util.*;
import io.swagger.annotations.*;
@ApiModel("管理后台 - 数据源配置 Response VO")
@Schema(description = "管理后台 - 数据源配置 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DataSourceConfigRespVO extends DataSourceConfigBaseVO {
@ApiModelProperty(value = "主键编号", required = true, example = "1024")
@Schema(description = "主键编号", required = true, example = "1024")
private Integer id;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -5,18 +5,18 @@ import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("管理后台 - 数据源配置更新 Request VO")
@Schema(description = "管理后台 - 数据源配置更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO {
@ApiModelProperty(value = "主键编号", required = true, example = "1024")
@Schema(description = "主键编号", required = true, example = "1024")
@NotNull(message = "主键编号不能为空")
private Long id;
@ApiModelProperty(value = "密码", required = true, example = "123456")
@Schema(description = "密码", required = true, example = "123456")
@NotNull(message = "密码不能为空")
private String password;
}
}

View File

@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigU
import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO;
import cn.iocoder.yudao.module.infra.service.file.FileConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -21,7 +21,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 文件配置")
@Tag(name = "管理后台 - 文件配置")
@RestController
@RequestMapping("/infra/file-config")
@Validated
@ -31,14 +31,14 @@ public class FileConfigController {
private FileConfigService fileConfigService;
@PostMapping("/create")
@ApiOperation("创建文件配置")
@Operation(summary = "创建文件配置")
@PreAuthorize("@ss.hasPermission('infra:file-config:create')")
public CommonResult<Long> createFileConfig(@Valid @RequestBody FileConfigCreateReqVO createReqVO) {
return success(fileConfigService.createFileConfig(createReqVO));
}
@PutMapping("/update")
@ApiOperation("更新文件配置")
@Operation(summary = "更新文件配置")
@PreAuthorize("@ss.hasPermission('infra:file-config:update')")
public CommonResult<Boolean> updateFileConfig(@Valid @RequestBody FileConfigUpdateReqVO updateReqVO) {
fileConfigService.updateFileConfig(updateReqVO);
@ -46,7 +46,7 @@ public class FileConfigController {
}
@PutMapping("/update-master")
@ApiOperation("更新文件配置为 Master")
@Operation(summary = "更新文件配置为 Master")
@PreAuthorize("@ss.hasPermission('infra:file-config:update')")
public CommonResult<Boolean> updateFileConfigMaster(@RequestParam("id") Long id) {
fileConfigService.updateFileConfigMaster(id);
@ -54,8 +54,8 @@ public class FileConfigController {
}
@DeleteMapping("/delete")
@ApiOperation("删除文件配置")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除文件配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:file-config:delete')")
public CommonResult<Boolean> deleteFileConfig(@RequestParam("id") Long id) {
fileConfigService.deleteFileConfig(id);
@ -63,8 +63,8 @@ public class FileConfigController {
}
@GetMapping("/get")
@ApiOperation("获得文件配置")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@Operation(summary = "获得文件配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:file-config:query')")
public CommonResult<FileConfigRespVO> getFileConfig(@RequestParam("id") Long id) {
FileConfigDO fileConfig = fileConfigService.getFileConfig(id);
@ -72,7 +72,7 @@ public class FileConfigController {
}
@GetMapping("/page")
@ApiOperation("获得文件配置分页")
@Operation(summary = "获得文件配置分页")
@PreAuthorize("@ss.hasPermission('infra:file-config:query')")
public CommonResult<PageResult<FileConfigRespVO>> getFileConfigPage(@Valid FileConfigPageReqVO pageVO) {
PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(pageVO);
@ -80,10 +80,10 @@ public class FileConfigController {
}
@GetMapping("/test")
@ApiOperation("测试文件配置是否正确")
@Operation(summary = "测试文件配置是否正确")
@PreAuthorize("@ss.hasPermission('infra:file-config:query')")
public CommonResult<String> testFileConfig(@RequestParam("id") Long id) throws Exception {
String url = fileConfigService.testFileConfig(id);
return success(url);
}
}
}

View File

@ -12,9 +12,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FileUploadReq
import cn.iocoder.yudao.module.infra.convert.file.FileConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
@ -30,7 +30,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "管理后台 - 文件存储")
@Tag(name = "管理后台 - 文件存储")
@RestController
@RequestMapping("/infra/file")
@Validated
@ -41,7 +41,7 @@ public class FileController {
private FileService fileService;
@PostMapping("/upload")
@ApiOperation("上传文件")
@Operation(summary = "上传文件")
@OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要
public CommonResult<String> uploadFile(FileUploadReqVO uploadReqVO) throws Exception {
MultipartFile file = uploadReqVO.getFile();
@ -50,8 +50,8 @@ public class FileController {
}
@DeleteMapping("/delete")
@ApiOperation("删除文件")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "删除文件")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:file:delete')")
public CommonResult<Boolean> deleteFile(@RequestParam("id") Long id) throws Exception {
fileService.deleteFile(id);
@ -60,8 +60,8 @@ public class FileController {
@GetMapping("/{configId}/get/**")
@PermitAll
@ApiOperation("下载文件")
@ApiImplicitParam(name = "configId", value = "配置编号", required = true, dataTypeClass = Long.class)
@Operation(summary = "下载文件")
@Parameter(name = "configId", description = "配置编号", required = true)
public void getFileContent(HttpServletRequest request,
HttpServletResponse response,
@PathVariable("configId") Long configId) throws Exception {
@ -82,11 +82,11 @@ public class FileController {
}
@GetMapping("/page")
@ApiOperation("获得文件分页")
@Operation(summary = "获得文件分页")
@PreAuthorize("@ss.hasPermission('infra:file:query')")
public CommonResult<PageResult<FileRespVO>> getFilePage(@Valid FilePageReqVO pageVO) {
PageResult<FileDO> pageResult = fileService.getFilePage(pageVO);
return success(FileConvert.INSTANCE.convertPage(pageResult));
}
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@ -12,11 +12,11 @@ import javax.validation.constraints.NotNull;
@Data
public class FileConfigBaseVO {
@ApiModelProperty(value = "配置名", required = true, example = "S3 - 阿里云")
@Schema(description = "配置名", required = true, example = "S3 - 阿里云")
@NotNull(message = "配置名不能为空")
private String name;
@ApiModelProperty(value = "备注", example = "我是备注")
@Schema(description = "备注", example = "我是备注")
private String remark;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -9,18 +9,18 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.Map;
@ApiModel("管理后台 - 文件配置创建 Request VO")
@Schema(description = "管理后台 - 文件配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigCreateReqVO extends FileConfigBaseVO {
@ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
@Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
@NotNull(message = "存储器不能为空")
private Integer storage;
@ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
@Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
@NotNull(message = "存储配置不能为空")
private Map<String, Object> config;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,20 +12,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 文件配置分页 Request VO")
@Schema(description = "管理后台 - 文件配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigPageReqVO extends PageParam {
@ApiModelProperty(value = "配置名", example = "S3 - 阿里云")
@Schema(description = "配置名", example = "S3 - 阿里云")
private String name;
@ApiModelProperty(value = "存储器", example = "1")
@Schema(description = "存储器", example = "1")
private Integer storage;
@ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import cn.iocoder.yudao.framework.file.core.client.FileClientConfig;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -10,27 +10,27 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@ApiModel("管理后台 - 文件配置 Response VO")
@Schema(description = "管理后台 - 文件配置 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigRespVO extends FileConfigBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
@Schema(description = "编号", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
@Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
@NotNull(message = "存储器不能为空")
private Integer storage;
@ApiModelProperty(value = "是否为主配置", required = true, example = "true")
@Schema(description = "是否为主配置", required = true, example = "true")
@NotNull(message = "是否为主配置不能为空")
private Boolean master;
@ApiModelProperty(value = "存储配置", required = true)
@Schema(description = "存储配置", required = true)
private FileClientConfig config;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -9,18 +9,18 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.Map;
@ApiModel("管理后台 - 文件配置更新 Request VO")
@Schema(description = "管理后台 - 文件配置更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigUpdateReqVO extends FileConfigBaseVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
@Schema(description = "编号", required = true, example = "1")
@NotNull(message = "编号不能为空")
private Long id;
@ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
@Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
@NotNull(message = "存储配置不能为空")
private Map<String, Object> config;
}
}

View File

@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ -12,20 +12,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("管理后台 - 文件分页 Request VO")
@Schema(description = "管理后台 - 文件分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FilePageReqVO extends PageParam {
@ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配")
@Schema(description = "文件路径", example = "yudao", notes = "模糊匹配")
private String path;
@ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配")
@Schema(description = "文件类型", example = "jpg", notes = "模糊匹配")
private String type;
@ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@ -1,31 +1,31 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@ApiModel(value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大")
@Schema(description = value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大")
@Data
public class FileRespVO {
@ApiModelProperty(value = "文件编号", required = true, example = "1024")
@Schema(description = "文件编号", required = true, example = "1024")
private Long id;
@ApiModelProperty(value = "文件路径", required = true, example = "yudao.jpg")
@Schema(description = "文件路径", required = true, example = "yudao.jpg")
private String path;
@ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg")
@Schema(description = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg")
private String url;
@ApiModelProperty(value = "文件类型", example = "jpg")
@Schema(description = "文件类型", example = "jpg")
private String type;
@ApiModelProperty(value = "文件大小", example = "2048", required = true)
@Schema(description = "文件大小", example = "2048", required = true)
private Integer size;
@ApiModelProperty(value = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}
}

View File

@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
@ApiModel(value = "管理后台 - 上传文件 Request VO")
@Schema(description = value = "管理后台 - 上传文件 Request VO")
@Data
public class FileUploadReqVO {
@ApiModelProperty(value = "文件附件", required = true)
@Schema(description = "文件附件", required = true)
@NotNull(message = "文件附件不能为空")
private MultipartFile file;
@ApiModelProperty(value = "文件附件", example = "yudaoyuanma.png")
@Schema(description = "文件附件", example = "yudaoyuanma.png")
private String path;
}
}

Some files were not shown because too many files have changed in this diff Show More