mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
commit
2aec7d6cf8
11
pom.xml
11
pom.xml
@ -35,9 +35,10 @@
|
|||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
|
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
|
||||||
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||||
<!-- 看看咋放到 bom 里 -->
|
<!-- 看看咋放到 bom 里 -->
|
||||||
<lombok.version>1.18.24</lombok.version>
|
<lombok.version>1.18.24</lombok.version>
|
||||||
|
<spring.boot.version>2.7.7</spring.boot.version>
|
||||||
<mapstruct.version>1.5.3.Final</mapstruct.version>
|
<mapstruct.version>1.5.3.Final</mapstruct.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
@ -64,13 +65,19 @@
|
|||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
|
<!-- maven-compiler-plugin 插件,解决 spring-boot-configuration-processor + Lombok + MapStruct 组合 -->
|
||||||
|
<!-- https://stackoverflow.com/questions/33483697/re-run-spring-boot-configuration-annotation-processor-to-update-generated-metada -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<annotationProcessorPaths>
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
<version>${spring.boot.version}</version>
|
||||||
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
@ -11,7 +11,7 @@ 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.dal.dataobject.codegen.CodegenTableDO;
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.IColumnType;
|
import org.apache.ibatis.type.JdbcType;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.Mappings;
|
import org.mapstruct.Mappings;
|
||||||
@ -39,7 +39,7 @@ public interface CodegenConvert {
|
|||||||
|
|
||||||
@Mappings({
|
@Mappings({
|
||||||
@Mapping(source = "name", target = "columnName"),
|
@Mapping(source = "name", target = "columnName"),
|
||||||
@Mapping(source = "columnType", target = "dataType", qualifiedByName = "getType"),
|
@Mapping(source = "metaInfo.jdbcType", target = "dataType", qualifiedByName = "getDataType"),
|
||||||
@Mapping(source = "comment", target = "columnComment"),
|
@Mapping(source = "comment", target = "columnComment"),
|
||||||
@Mapping(source = "metaInfo.nullable", target = "nullable"),
|
@Mapping(source = "metaInfo.nullable", target = "nullable"),
|
||||||
@Mapping(source = "keyFlag", target = "primaryKey"),
|
@Mapping(source = "keyFlag", target = "primaryKey"),
|
||||||
@ -49,9 +49,9 @@ public interface CodegenConvert {
|
|||||||
})
|
})
|
||||||
CodegenColumnDO convert(TableField bean);
|
CodegenColumnDO convert(TableField bean);
|
||||||
|
|
||||||
@Named("getType")
|
@Named("getDataType")
|
||||||
default String getType(IColumnType jdbcType) {
|
default String getDataType(JdbcType jdbcType) {
|
||||||
return jdbcType.getType();
|
return jdbcType.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========== CodegenTableDO 相关 ==========
|
// ========== CodegenTableDO 相关 ==========
|
||||||
|
@ -30,7 +30,7 @@ public class CodegenColumnDO extends BaseDO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 表编号
|
* 表编号
|
||||||
*
|
* <p>
|
||||||
* 关联 {@link CodegenTableDO#getId()}
|
* 关联 {@link CodegenTableDO#getId()}
|
||||||
*/
|
*/
|
||||||
private Long tableId;
|
private Long tableId;
|
||||||
@ -42,8 +42,8 @@ public class CodegenColumnDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String columnName;
|
private String columnName;
|
||||||
/**
|
/**
|
||||||
* 字段类型
|
* 数据库字段类型
|
||||||
* 关联 {@link TableField#getColumnType()}}
|
* 关联 {@link TableField.MetaInfo#getJdbcType()}
|
||||||
*/
|
*/
|
||||||
private String dataType;
|
private String dataType;
|
||||||
/**
|
/**
|
||||||
@ -71,7 +71,7 @@ public class CodegenColumnDO extends BaseDO {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Java 属性类型
|
* Java 属性类型
|
||||||
*
|
* <p>
|
||||||
* 例如说 String、Boolean 等等
|
* 例如说 String、Boolean 等等
|
||||||
*/
|
*/
|
||||||
private String javaType;
|
private String javaType;
|
||||||
@ -81,7 +81,7 @@ public class CodegenColumnDO extends BaseDO {
|
|||||||
private String javaField;
|
private String javaField;
|
||||||
/**
|
/**
|
||||||
* 字典类型
|
* 字典类型
|
||||||
*
|
* <p>
|
||||||
* 关联 DictTypeDO 的 type 属性
|
* 关联 DictTypeDO 的 type 属性
|
||||||
*/
|
*/
|
||||||
private String dictType;
|
private String dictType;
|
||||||
@ -106,7 +106,7 @@ public class CodegenColumnDO extends BaseDO {
|
|||||||
private Boolean listOperation;
|
private Boolean listOperation;
|
||||||
/**
|
/**
|
||||||
* List 查询操作的条件类型
|
* List 查询操作的条件类型
|
||||||
*
|
* <p>
|
||||||
* 枚举 {@link CodegenColumnListConditionEnum}
|
* 枚举 {@link CodegenColumnListConditionEnum}
|
||||||
*/
|
*/
|
||||||
private String listOperationCondition;
|
private String listOperationCondition;
|
||||||
@ -119,7 +119,7 @@ public class CodegenColumnDO extends BaseDO {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示类型
|
* 显示类型
|
||||||
*
|
* <p>
|
||||||
* 枚举 {@link CodegenColumnHtmlTypeEnum}
|
* 枚举 {@link CodegenColumnHtmlTypeEnum}
|
||||||
*/
|
*/
|
||||||
private String htmlType;
|
private String htmlType;
|
||||||
|
Loading…
Reference in New Issue
Block a user