mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-29 18:51:53 +08:00
fix: 基础设施-代码生成-整个模块不能使用
This commit is contained in:
parent
bbb27df5e9
commit
df479f627e
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.infra.convert.codegen;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenDetailRespVO;
|
||||
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenPreviewRespVO;
|
||||
@ -33,7 +34,15 @@ public interface CodegenConvert {
|
||||
})
|
||||
CodegenTableDO convert(TableInfo bean);
|
||||
|
||||
List<CodegenColumnDO> convertList(List<TableField> list);
|
||||
default List<CodegenColumnDO> convertList(List<TableField> list){
|
||||
return CollUtil.map(list,t->convert(t),true);
|
||||
}
|
||||
|
||||
default CodegenColumnDO convert(TableField bean) {
|
||||
CodegenColumnDO codegenColumnDO = convert0(bean);
|
||||
codegenColumnDO.setDataType(bean.getColumnType().getType());
|
||||
return codegenColumnDO;
|
||||
}
|
||||
|
||||
@Mappings({
|
||||
@Mapping(source = "name", target = "columnName"),
|
||||
@ -45,7 +54,7 @@ public interface CodegenConvert {
|
||||
@Mapping(source = "columnType.type", target = "javaType"),
|
||||
@Mapping(source = "propertyName", target = "javaField"),
|
||||
})
|
||||
CodegenColumnDO convert(TableField bean);
|
||||
CodegenColumnDO convert0(TableField bean);
|
||||
|
||||
// ========== CodegenTableDO 相关 ==========
|
||||
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.infra.enums.codegen.CodegenColumnListConditionEnu
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@ -42,6 +43,7 @@ public class CodegenColumnDO extends BaseDO {
|
||||
private String columnName;
|
||||
/**
|
||||
* 字段类型
|
||||
* 关联 {@link TableField#getColumnType()}}
|
||||
*/
|
||||
private String dataType;
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user