Merge branch 'gitee-master-jdk17' into feature-project

# Conflicts:
#	README.md
#	yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java
#	yudao-server/pom.xml
#	yudao-server/src/main/resources/application-dev.yaml
This commit is contained in:
2024-07-18 10:01:15 +08:00
269 changed files with 20598 additions and 1556 deletions

View File

@@ -17,6 +17,8 @@ import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler;
import com.fasterxml.jackson.core.type.TypeReference;
import lombok.*;
import java.lang.reflect.Field;
/**
* 文件配置表
*
@@ -65,8 +67,16 @@ public class FileConfigDO extends BaseDO {
public static class FileClientConfigTypeHandler extends AbstractJsonTypeHandler<Object> {
public FileClientConfigTypeHandler(Class<?> type) {
super(type);
}
public FileClientConfigTypeHandler(Class<?> type, Field field) {
super(type, field);
}
@Override
protected Object parse(String json) {
public Object parse(String json) {
FileClientConfig config = JsonUtils.parseObjectQuietly(json, new TypeReference<>() {});
if (config != null) {
return config;
@@ -92,7 +102,7 @@ public class FileConfigDO extends BaseDO {
}
@Override
protected String toJson(Object obj) {
public String toJson(Object obj) {
return JsonUtils.toJsonString(obj);
}

View File

@@ -24,11 +24,9 @@ public class SecurityConfiguration {
public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
// Swagger 接口文档
registry.requestMatchers("/v3/api-docs/**").permitAll()
.requestMatchers("/swagger-ui.html").permitAll()
.requestMatchers("/swagger-ui/**").permitAll()
.requestMatchers("/swagger-resources/**").permitAll()
.requestMatchers("/webjars/**").permitAll()
.requestMatchers("/*/api-docs").permitAll();
.requestMatchers("/swagger-ui.html").permitAll()
.requestMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置
registry.requestMatchers("/actuator").permitAll()
.requestMatchers("/actuator/**").permitAll();

View File

@@ -121,8 +121,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<${table.className}DO> list = ${classNameVar}Service.get${simpleClassName}Page(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "${table.classComment}.xls", "数据", ${table.className}RespVO.class,
BeanUtils.toBean(list, ${table.className}RespVO.class));
ExcelUtils.write(response, "${table.classComment}.xls", "数据", ${sceneEnum.prefixClass}${table.className}RespVO.class,
BeanUtils.toBean(list, ${sceneEnum.prefixClass}${table.className}RespVO.class));
}
## 特殊:树表专属逻辑(树不需要分页接口)
#else

View File

@@ -29,6 +29,12 @@ public interface ${subTable.className}Mapper extends BaseMapperX<${subTable.clas
.orderByDesc(${subTable.className}DO::getId));## 大多数情况下id 倒序
}
## 主表与子表是一对一时
#if (!$subTable.subJoinMany)
default ${subTable.className}DO selectBy${SubJoinColumnName}(${subJoinColumn.javaType} ${subJoinColumn.javaField}) {
return selectOne(${subTable.className}DO::get${SubJoinColumnName}, ${subJoinColumn.javaField});
}
#end
## 情况二:非 MASTER_ERP 时,需要列表查询子表
#else
@@ -48,4 +54,4 @@ public interface ${subTable.className}Mapper extends BaseMapperX<${subTable.clas
return delete(${subTable.className}DO::get${SubJoinColumnName}, ${subJoinColumn.javaField});
}
}
}