feat(codegen): 为生成模板添加ID字段并移除未使用导入
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package ${packageName}.${moduleName}.${subpackageName};
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import ${packageName}.${moduleName}.model.entity.${entityName};
|
||||
import ${packageName}.${moduleName}.model.form.${entityName}Form;
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ public class ${entityName}Form implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "${businessName}ID")
|
||||
private Long id;
|
||||
|
||||
## ---------- BEGIN 字段循环遍历 ----------
|
||||
#if($fieldConfigs)
|
||||
#foreach($fieldConfig in ${fieldConfigs})
|
||||
|
||||
@@ -15,7 +15,6 @@ import ${packageName}.${moduleName}.converter.${entityName}Converter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
@@ -26,6 +26,7 @@ export interface ${entityName}QueryParams extends BaseQueryParams {
|
||||
|
||||
/** $!{businessName}表单对象 */
|
||||
export interface ${entityName}Form {
|
||||
id?: number;
|
||||
#foreach($fieldConfig in $fieldConfigs)
|
||||
#if($fieldConfig.isShowInForm)
|
||||
#if("$!fieldConfig.fieldComment" != "")
|
||||
|
||||
Reference in New Issue
Block a user