diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/config.json b/maku-boot-module/maku-module-generator/src/main/resources/template/config.json
deleted file mode 100644
index 53cdd5c..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/config.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "project": {
- "packageName": "net.maku",
- "version": "",
- "backendPath": "/Users/maku/makunet/maku-boot/maku-boot-new",
- "frontendPath": "/Users/maku/makunet/maku-admin",
- "tablePrefix": "tb_",
- "moduleName": "test",
- "author": "阿沐",
- "email": "babamu@126.com"
- },
- "templates": [
- {
- "templateName": "java/Controller.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/controller/${ClassName}Controller.java"
- },
- {
- "templateName": "java/Service.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/service/${ClassName}Service.java"
- },
- {
- "templateName": "java/ServiceImpl.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/service/impl/${ClassName}ServiceImpl.java"
- },
- {
- "templateName": "java/Query.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/query/${ClassName}Query.java"
- },
- {
- "templateName": "java/Entity.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/entity/${ClassName}Entity.java"
- },
- {
- "templateName": "java/VO.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/vo/${ClassName}VO.java"
- },
- {
- "templateName": "java/Excel.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/vo/${ClassName}ExcelVO.java"
- },
- {
- "templateName": "java/Convert.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/convert/${ClassName}Convert.java"
- },
- {
- "templateName": "java/Dao.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/dao/${ClassName}Dao.java"
- },
- {
- "templateName": "xml/Dao.xml.ftl",
- "generatorPath": "${backendPath}/src/main/resources/mapper/${moduleName}/${ClassName}Dao.xml"
- },
- {
- "templateName": "sql/menu.sql.ftl",
- "generatorPath": "${backendPath}/menu/${tableName}_menu.sql"
- },
- {
- "templateName": "vue/api.ts.ftl",
- "generatorPath": "${frontendPath}/src/api/${moduleName}/${functionName}.ts"
- },
- {
- "templateName": "vue/index.vue.ftl",
- "generatorPath": "${frontendPath}/src/views/${moduleName}/${functionName}/index.vue"
- },
- {
- "templateName": "vue/add-or-update.vue.ftl",
- "generatorPath": "${frontendPath}/src/views/${moduleName}/${functionName}/add-or-update.vue"
- }
- ],
- "subTemplates": [
- {
- "templateName": "java/Entity.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/entity/${ClassName}Entity.java"
- },
- {
- "templateName": "java/Dao.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/dao/${ClassName}Dao.java"
- },
- {
- "templateName": "java/VO.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/vo/${ClassName}VO.java"
- },
- {
- "templateName": "java/Convert.java.ftl",
- "generatorPath": "${backendPath}/src/main/java/${packagePath}/${moduleName}/convert/${ClassName}Convert.java"
- },
- {
- "templateName": "vue/sub-add-or-update.vue.ftl",
- "generatorPath": "${frontendPath}/src/views/${moduleName}/${functionName}/${className}.vue"
- }
- ]
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Controller.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Controller.java.ftl
deleted file mode 100644
index 079ba8c..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Controller.java.ftl
+++ /dev/null
@@ -1,124 +0,0 @@
-package ${package}.${moduleName}.controller;
-
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import ${package}.framework.common.utils.PageResult;
-import ${package}.framework.common.utils.Result;
-import ${package}.framework.operatelog.annotations.OperateLog;
-import ${package}.framework.operatelog.enums.OperateTypeEnum;
-import ${package}.${moduleName}.service.${ClassName}Service;
-import ${package}.${moduleName}.query.${ClassName}Query;
-import ${package}.${moduleName}.vo.${ClassName}VO;
-import org.springdoc.core.annotations.ParameterObject;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-<#if tableOperation?seq_contains('import')>
-import org.springframework.web.multipart.MultipartFile;
-#if>
-import jakarta.validation.Valid;
-import java.util.List;
-
-/**
- * ${tableComment!}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@RestController
-@RequestMapping("${requestUrl}")
-@Tag(name="${tableComment}")
-@AllArgsConstructor
-public class ${ClassName}Controller {
- private final ${ClassName}Service ${className}Service;
-
- @GetMapping("page")
- @Operation(summary = "分页")
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:page#if>')")
- public Result> page(@ParameterObject @Valid ${ClassName}Query query){
- PageResult<${ClassName}VO> page = ${className}Service.page(query);
-
- return Result.ok(page);
- }
-
- <#if hasTree>
- @GetMapping("list")
- @Operation(summary = "列表")
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:page#if>')")
- public Result> list(Long ${treePid}) {
- List<${ClassName}VO> list = ${className}Service.list(${treePid});
-
- return Result.ok(list);
- }
- #if>
-
- @GetMapping("{id}")
- @Operation(summary = "信息")
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:info#if>')")
- public Result<${ClassName}VO> get(@PathVariable("id") Long id){
- ${ClassName}VO data = ${className}Service.get(id);
-
- return Result.ok(data);
- }
-
- <#if tableOperation?seq_contains('insert')>
- @PostMapping
- @Operation(summary = "保存")
- @OperateLog(type = OperateTypeEnum.INSERT)
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:save#if>')")
- public Result save(@RequestBody ${ClassName}VO vo){
- ${className}Service.save(vo);
-
- return Result.ok();
- }
- #if>
-
- <#if tableOperation?seq_contains('update')>
- @PutMapping
- @Operation(summary = "修改")
- @OperateLog(type = OperateTypeEnum.UPDATE)
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:update#if>')")
- public Result update(@RequestBody @Valid ${ClassName}VO vo){
- ${className}Service.update(vo);
-
- return Result.ok();
- }
- #if>
-
- <#if tableOperation?seq_contains('delete')>
- @DeleteMapping
- @Operation(summary = "删除")
- @OperateLog(type = OperateTypeEnum.DELETE)
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:delete#if>')")
- public Result delete(@RequestBody List idList){
- ${className}Service.delete(idList);
-
- return Result.ok();
- }
- #if>
-
- <#if tableOperation?seq_contains('import')>
- @PostMapping("import")
- @Operation(summary = "导入")
- @OperateLog(type = OperateTypeEnum.IMPORT)
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:import#if>')")
- public Result importExcel(@RequestParam("file") MultipartFile file) {
- if (file.isEmpty()) {
- return Result.error("请选择需要上传的文件");
- }
- ${className}Service.importByExcel(file);
-
- return Result.ok();
- }
- #if>
-
- <#if tableOperation?seq_contains('export')>
- @GetMapping("export")
- @Operation(summary = "导出")
- @OperateLog(type = OperateTypeEnum.EXPORT)
- @PreAuthorize("hasAuthority('${authority}<#if authLevel==1>:export#if>')")
- public void export() {
- ${className}Service.export();
- }
- #if>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Convert.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Convert.java.ftl
deleted file mode 100644
index d1e67dc..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Convert.java.ftl
+++ /dev/null
@@ -1,36 +0,0 @@
-package ${package}.${moduleName}.convert;
-
-import ${package}.${moduleName}.entity.${ClassName}Entity;
-import ${package}.${moduleName}.vo.${ClassName}VO;
-<#if !hasSub?? && (tableOperation?seq_contains('import') || tableOperation?seq_contains('export'))>
-import ${package}.${moduleName}.vo.${ClassName}ExcelVO;
-#if>
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@Mapper
-public interface ${ClassName}Convert {
- ${ClassName}Convert INSTANCE = Mappers.getMapper(${ClassName}Convert.class);
-
- ${ClassName}Entity convert(${ClassName}VO vo);
-
- ${ClassName}VO convert(${ClassName}Entity entity);
-
- List<${ClassName}VO> convertList(List<${ClassName}Entity> list);
-
- List<${ClassName}Entity> convertList2(List<${ClassName}VO> list);
-
- <#if !hasSub?? && (tableOperation?seq_contains('import') || tableOperation?seq_contains('export'))>
- List<${ClassName}ExcelVO> convertExcelList(List<${ClassName}Entity> list);
-
- List<${ClassName}Entity> convertExcelList2(List<${ClassName}ExcelVO> list);
- #if>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Dao.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Dao.java.ftl
deleted file mode 100644
index b615951..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Dao.java.ftl
+++ /dev/null
@@ -1,16 +0,0 @@
-package ${package}.${moduleName}.dao;
-
-import ${package}.framework.mybatis.dao.BaseDao;
-import ${package}.${moduleName}.entity.${ClassName}Entity;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@Mapper
-public interface ${ClassName}Dao extends BaseDao<${ClassName}Entity> {
-
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Entity.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Entity.java.ftl
deleted file mode 100644
index ccb9276..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Entity.java.ftl
+++ /dev/null
@@ -1,54 +0,0 @@
-package ${package}.${moduleName}.entity;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import com.baomidou.mybatisplus.annotation.*;
-<#list importList as i>
-import ${i!};
-#list>
-<#if baseClass??>
-import ${baseClass.packageName}.${baseClass.code};
-#if>
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-<#if baseClass??>@EqualsAndHashCode(callSuper=false)#if>
-@Data
-@TableName("${tableName}")
-public class ${ClassName}Entity<#if baseClass??> extends ${baseClass.code}#if> {
-<#list fieldList as field>
-<#if !field.baseField>
- <#if field.fieldComment!?length gt 0>
- /**
- * ${field.fieldComment}
- */
- #if>
- <#if field.primaryPk>
- @TableId
- #if>
- <#if field.fieldName == 'deleted'>
- @TableLogic
- #if>
- <#if field.fieldName == 'version'>
- @Version
- #if>
- <#if field.autoFill == "INSERT">
- @TableField(value = "${field.fieldName}", fill = FieldFill.INSERT)
- <#elseif field.autoFill == "INSERT_UPDATE">
- @TableField(value = "${field.fieldName}", fill = FieldFill.INSERT_UPDATE)
- <#elseif field.autoFill == "UPDATE">
- @TableField(value = "${field.fieldName}", fill = FieldFill.UPDATE)
- <#elseif hasTree && field.fieldName == treePid>
- @TableField(value = "${field.fieldName}", updateStrategy = FieldStrategy.ALWAYS)
- <#else>
- @TableField(value = "${field.fieldName}")
- #if>
- private ${field.attrType} ${field.attrName};
-#if>
-
-#list>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl
deleted file mode 100644
index 401dccb..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl
+++ /dev/null
@@ -1,49 +0,0 @@
-package ${package}.${moduleName}.vo;
-
-import lombok.Data;
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.fhs.core.trans.vo.TransPojo;
-import com.fhs.core.trans.anno.Trans;
-import com.fhs.core.trans.constant.TransType;
-import ${package}.framework.common.excel.LocalDateTimeConverter;
-<#list importList as i>
-import ${i!};
-#list>
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@Data
-public class ${ClassName}ExcelVO implements TransPojo {
-<#list gridList as field>
- <#if field.attrName == 'id'>
- <#assign isPrimaryKey = 'true'>
- #if>
-#list>
-<#if !isPrimaryKey??>
- @ExcelIgnore
- private ${primaryType} ${primaryName};
-
-#if>
-<#list gridList as field>
- <#if field.attrType == 'LocalDateTime'>
- @ExcelProperty(value = "${field.fieldComment!}", converter = LocalDateTimeConverter.class)
- <#elseif field.fieldComment!?length gt 0>
- @ExcelProperty("${field.fieldComment}")
- #if>
- <#if field.formDict??>
- private String ${field.attrName}Label;
-
- @ExcelIgnore
- @Trans(type = TransType.DICTIONARY, key = "${field.formDict}", ref = "${field.attrName}Label")
- private ${field.attrType} ${field.attrName};
- <#else>
- private ${field.attrType} ${field.attrName};
- #if>
-
-#list>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl
deleted file mode 100644
index 651b7ec..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl
+++ /dev/null
@@ -1,38 +0,0 @@
-package ${package}.${moduleName}.query;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import java.util.*;
-import ${package}.framework.common.query.Query;
-import org.springframework.format.annotation.DateTimeFormat;
-
-<#list importList as i>
-import ${i!};
-#list>
-
-/**
- * ${tableComment}查询
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Schema(description = "${tableComment}查询")
-public class ${ClassName}Query extends Query {
-<#list queryList as field>
- <#if field.fieldComment!?length gt 0>
- @Schema(description = "${field.fieldComment}")
- #if>
- <#if field.queryFormType == 'date' || field.queryFormType == 'datetime'>
- private List ${field.attrName};
- <#else>
- private ${field.attrType} ${field.attrName};
- #if>
-
-#list>
-<#if hasLeftTree>
- private List ${leftRelationField};
-#if>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Service.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Service.java.ftl
deleted file mode 100644
index 5770367..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Service.java.ftl
+++ /dev/null
@@ -1,48 +0,0 @@
-package ${package}.${moduleName}.service;
-
-import ${package}.framework.common.utils.PageResult;
-import ${package}.framework.mybatis.service.BaseService;
-import ${package}.${moduleName}.vo.${ClassName}VO;
-import ${package}.${moduleName}.query.${ClassName}Query;
-import ${package}.${moduleName}.entity.${ClassName}Entity;
-<#if tableOperation?seq_contains('import')>
-import org.springframework.web.multipart.MultipartFile;
-#if>
-import java.util.List;
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-public interface ${ClassName}Service extends BaseService<${ClassName}Entity> {
-
- PageResult<${ClassName}VO> page(${ClassName}Query query);
-
- ${ClassName}VO get(Long id);
-
- <#if hasTree>
- List<${ClassName}VO> list(Long ${treePid});
- #if>
-
- <#if tableOperation?seq_contains('insert')>
- void save(${ClassName}VO vo);
- #if>
-
- <#if tableOperation?seq_contains('update')>
- void update(${ClassName}VO vo);
- #if>
-
- <#if tableOperation?seq_contains('delete')>
- void delete(List idList);
- #if>
-
- <#if tableOperation?seq_contains('import')>
- void importByExcel(MultipartFile file);
- #if>
-
- <#if tableOperation?seq_contains('export')>
- void export();
- #if>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/ServiceImpl.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/ServiceImpl.java.ftl
deleted file mode 100644
index 4ffb4ce..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/ServiceImpl.java.ftl
+++ /dev/null
@@ -1,264 +0,0 @@
-package ${package}.${moduleName}.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import lombok.AllArgsConstructor;
-import ${package}.framework.common.utils.PageResult;
-import ${package}.framework.mybatis.service.impl.BaseServiceImpl;
-import ${package}.${moduleName}.convert.${ClassName}Convert;
-import ${package}.${moduleName}.entity.${ClassName}Entity;
-import ${package}.${moduleName}.query.${ClassName}Query;
-import ${package}.${moduleName}.vo.${ClassName}VO;
-import ${package}.${moduleName}.dao.${ClassName}Dao;
-import ${package}.${moduleName}.service.${ClassName}Service;
-<#list subs as sub>
-import ${package}.${moduleName}.convert.${sub.ClassName}Convert;
-import ${package}.${moduleName}.entity.${sub.ClassName}Entity;
-import ${package}.${moduleName}.dao.${sub.ClassName}Dao;
-#list>
-<#if tableOperation?seq_contains('import') || tableOperation?seq_contains('export')>
-import com.fhs.trans.service.impl.TransService;
-import ${package}.framework.common.utils.ExcelUtils;
-import ${package}.${moduleName}.vo.${ClassName}ExcelVO;
-import ${package}.framework.common.excel.ExcelFinishCallBack;
-import org.springframework.web.multipart.MultipartFile;
-#if>
-import cn.hutool.core.util.ObjectUtil;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@Service
-@AllArgsConstructor
-public class ${ClassName}ServiceImpl extends BaseServiceImpl<${ClassName}Dao, ${ClassName}Entity> implements ${ClassName}Service {
-<#if tableOperation?seq_contains('import') || tableOperation?seq_contains('export')>
- private final TransService transService;
-#if>
-<#list subs as sub>
- private final ${sub.ClassName}Dao ${sub.className}Dao;
-#list>
-
- @Override
- public PageResult<${ClassName}VO> page(${ClassName}Query query) {
- IPage<${ClassName}Entity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
-
- <#if hasTree>
- return new PageResult<>(getHasChild(page.getRecords()), page.getTotal());
- <#else>
- return new PageResult<>(${ClassName}Convert.INSTANCE.convertList(page.getRecords()), page.getTotal());
- #if>
- }
-
- <#if hasTree>
- @Override
- public List<${ClassName}VO> list(Long ${treePid}) {
- LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery();
- wrapper.eq(${treePid} != null, ${ClassName}Entity::get${treePid?cap_first}, ${treePid});
-
- List<${ClassName}Entity> list = baseMapper.selectList(wrapper);
-
- <#if hasTree>
- return getHasChild(list);
- <#else>
- return ${ClassName}Convert.INSTANCE.convertList(list);
- #if>
- }
- #if>
-
- private LambdaQueryWrapper<${ClassName}Entity> getWrapper(${ClassName}Query query){
- LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery();
- <#list queryList as field>
- <#if hasTree && field.attrName == treePid>
- <#assign hasTreePid = true>
- if (ObjectUtil.isNotEmpty(query.get${field.attrName?cap_first}())) {
- wrapper.eq(${ClassName}Entity::get${field.attrName?cap_first}, query.get${field.attrName?cap_first}());
- } else {
- wrapper.isNull(${ClassName}Entity::get${treePid?cap_first});
- }
- <#else>
- <#if field.queryFormType == 'date' || field.queryFormType == 'datetime'>
- if (ObjectUtil.isNotEmpty(query.get${field.attrName?cap_first}())) {
- wrapper.between(${ClassName}Entity::get${field.attrName?cap_first}, query.get${field.attrName?cap_first}().get(0), query.get${field.attrName?cap_first}().get(1));
- }
- <#elseif field.queryType == '='>
- wrapper.eq(ObjectUtil.isNotEmpty(query.get${field.attrName?cap_first}()), ${ClassName}Entity::get${field.attrName?cap_first}, query.get${field.attrName?cap_first}());
- <#elseif field.queryType == 'like'>
- wrapper.like(ObjectUtil.isNotEmpty(query.get${field.attrName?cap_first}()), ${ClassName}Entity::get${field.attrName?cap_first}, query.get${field.attrName?cap_first}());
- #if>
- #if>
-
- #list>
- <#if hasTree && !hasTreePid??>
- wrapper.isNull(${ClassName}Entity::get${treePid?cap_first});
- #if>
- <#if hasLeftTree>
-
- // 左侧树过滤
- wrapper.in(query.get${leftRelationField?cap_first}() != null, ${ClassName}Entity::get${leftRelationField?cap_first}, query.get${leftRelationField?cap_first}());
- #if>
-
- return wrapper;
- }
-
- <#if hasTree>
- private List<${ClassName}VO> getHasChild(List<${ClassName}Entity> entityList) {
- List<${ClassName}VO> list = ${ClassName}Convert.INSTANCE.convertList(entityList);
- list.forEach(vo -> {
- Long count = baseMapper.selectCount(new LambdaQueryWrapper<${ClassName}Entity>().eq(${ClassName}Entity::get${treePid?cap_first}, vo.get${treeId?cap_first}()));
- vo.setHasChild(count > 0);
- });
-
- return list;
- }
- #if>
-
- @Override
- public ${ClassName}VO get(Long id) {
- ${ClassName}Entity entity = baseMapper.selectById(id);
- ${ClassName}VO vo = ${ClassName}Convert.INSTANCE.convert(entity);
-
- <#list subs as sub>
- <#if sub.mainRelation ==1>
- ${sub.ClassName}Entity ${sub.className}Entity = ${sub.className}Dao.selectOne(Wrappers.lambdaQuery(${sub.ClassName}Entity.class).eq(${sub.ClassName}Entity::get${sub.ForeignKey}, id));
- vo.set${sub.ClassName}(${sub.ClassName}Convert.INSTANCE.convert(${sub.className}Entity));
- #if>
- <#if sub.mainRelation ==2>
- List<${sub.ClassName}Entity> ${sub.className}List = ${sub.className}Dao.selectList(Wrappers.lambdaQuery(${sub.ClassName}Entity.class).eq(${sub.ClassName}Entity::get${sub.ForeignKey}, id));
- vo.set${sub.ClassName}(${sub.ClassName}Convert.INSTANCE.convertList(${sub.className}List));
- #if>
-
- #list>
- return vo;
- }
-
- <#if tableOperation?seq_contains('insert')>
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void save(${ClassName}VO vo) {
- ${ClassName}Entity entity = ${ClassName}Convert.INSTANCE.convert(vo);
-
- baseMapper.insert(entity);
-
- <#list subs as sub>
- ${sub.className}Dao.delete(Wrappers.lambdaQuery(${sub.ClassName}Entity.class).eq(${sub.ClassName}Entity::get${sub.ForeignKey}, entity.getId()));
- #list>
-
- <#list subs as sub>
- <#if sub.mainRelation ==1>
- ${sub.ClassName}Entity ${sub.className}Entity = ${sub.ClassName}Convert.INSTANCE.convert(vo.get${sub.ClassName}());
- ${sub.className}Entity.set${sub.ForeignKey}(entity.getId());
- ${sub.className}Dao.insert(${sub.className}Entity);
- #if>
- <#if sub.mainRelation ==2>
- List<${sub.ClassName}Entity> ${sub.className}List = ${sub.ClassName}Convert.INSTANCE.convertList2(vo.get${sub.ClassName}());
- ${sub.className}List.forEach(${sub.className}Entity -> {
- ${sub.className}Entity.set${sub.ForeignKey}(entity.getId());
- ${sub.className}Dao.insert(${sub.className}Entity);
- });
- #if>
-
- #list>
- }
- #if>
-
- <#if tableOperation?seq_contains('update')>
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(${ClassName}VO vo) {
- ${ClassName}Entity entity = ${ClassName}Convert.INSTANCE.convert(vo);
-
- updateById(entity);
-
- <#list subs as sub>
- ${sub.className}Dao.delete(Wrappers.lambdaQuery(${sub.ClassName}Entity.class).eq(${sub.ClassName}Entity::get${sub.ForeignKey}, entity.getId()));
- #list>
-
- <#list subs as sub>
- <#if sub.mainRelation ==1>
- ${sub.ClassName}Entity ${sub.className}Entity = ${sub.ClassName}Convert.INSTANCE.convert(vo.get${sub.ClassName}());
- ${sub.className}Entity.set${sub.ForeignKey}(entity.getId());
- ${sub.className}Dao.insert(${sub.className}Entity);
- #if>
- <#if sub.mainRelation ==2>
- List<${sub.ClassName}Entity> ${sub.className}List = ${sub.ClassName}Convert.INSTANCE.convertList2(vo.get${sub.ClassName}());
- ${sub.className}List.forEach(${sub.className}Entity -> {
- ${sub.className}Entity.set${sub.ForeignKey}(entity.getId());
- ${sub.className}Dao.insert(${sub.className}Entity);
- });
- #if>
-
- #list>
- }
- #if>
-
- <#if tableOperation?seq_contains('delete')>
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void delete(List idList) {
- <#if hasTree>
- idList.forEach(this::deleteAllChildren);
- <#else>
- removeByIds(idList);
- #if>
-
- <#if subs?size gt 0>
- // 删除子表数据
- idList.forEach(id -> {
- <#list subs as sub>
- ${sub.className}Dao.delete(Wrappers.lambdaQuery(${sub.ClassName}Entity.class).eq(${sub.ClassName}Entity::get${sub.ForeignKey}, id));
- #list>
- });
- #if>
- }
- #if>
-
- <#if hasTree>
- /**
- * 递归删除所有子节点
- *
- * @param id 节点ID
- */
- private void deleteAllChildren(Long id) {
- // 查询当前节点的所有子节点
- List<${ClassName}Entity> childrenList = baseMapper.selectList(new LambdaQueryWrapper<${ClassName}Entity>().eq(${ClassName}Entity::get${treePid?cap_first}, id));
- // 递归删除每个子节点
- for (${ClassName}Entity children : childrenList) {
- deleteAllChildren(children.getId());
- }
-
- // 删除当前节点
- baseMapper.deleteById(id);
- }
- #if>
-
- <#if tableOperation?seq_contains('import')>
- @Override
- public void importByExcel(MultipartFile file) {
- ExcelUtils.readAnalysis(file, ${ClassName}ExcelVO.class, new ExcelFinishCallBack<>() {
- @Override
- public void doSaveBatch(List<${ClassName}ExcelVO> resultList) {
- ExcelUtils.parseDict(resultList);
- saveBatch(${ClassName}Convert.INSTANCE.convertExcelList2(resultList));
- }
- });
- }
- #if>
-
- <#if tableOperation?seq_contains('export')>
- @Override
- public void export() {
- List<${ClassName}ExcelVO> excelList = ${ClassName}Convert.INSTANCE.convertExcelList(list());
- transService.transBatch(excelList);
- ExcelUtils.excelExport(${ClassName}ExcelVO.class, "${tableComment}", null, excelList);
- }
- #if>
-
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/VO.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/VO.java.ftl
deleted file mode 100644
index f727844..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/VO.java.ftl
+++ /dev/null
@@ -1,45 +0,0 @@
-package ${package}.${moduleName}.vo;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import java.util.List;
-import lombok.Data;
-import java.io.Serializable;
-import ${package}.framework.common.utils.DateUtils;
-<#list importList as i>
-import ${i!};
-#list>
-
-/**
- * ${tableComment}
- *
- * @author ${author} ${email!}
- * MAKU
- */
-@Data
-@Schema(description = "${tableComment}")
-public class ${ClassName}VO {
-<#list fieldList as field>
- <#if field.fieldComment!?length gt 0>
- @Schema(description = "${field.fieldComment}")
- #if>
- <#if field.attrType == 'LocalDateTime'>
- @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
- #if>
- private ${field.attrType} ${field.attrName};
-
-#list>
-<#list subs as sub>
- @Schema(description = "${sub.tableTitle}")
- <#if sub.mainRelation ==1>
- private ${sub.ClassName}VO ${sub.className};
- <#else>
- private List<${sub.ClassName}VO> ${sub.className};
- #if>
-
-#list>
- <#if hasTree>
- @Schema(description = "是否有子节点")
- private Boolean hasChild;
- #if>
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/sql/menu.sql.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/sql/menu.sql.ftl
deleted file mode 100644
index 3b6c896..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/sql/menu.sql.ftl
+++ /dev/null
@@ -1,33 +0,0 @@
-<#assign dbTime = "now()">
-<#if dbType=="SQLServer">
- <#assign dbTime = "getDate()">
-#if>
-
--- 初始化菜单
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '${tableComment!}', '${moduleName}/${functionName}/index', <#if authLevel==0>'${authority}'<#else>NULL#if>, 0, 0, 'icon-menu', 0, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-
-<#if authLevel==1>
-
-<#assign pid = "(SELECT max(id) from sys_menu where name = '${tableComment!}')">
-<#if dbType=="MySQL">
-set @menuId = @@identity;
-<#assign pid = "(SELECT @menuId)">
-#if>
-
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (${pid}, '查看', '', '${authority}:page', 1, 0, '', 0, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-<#if tableOperation?seq_contains('insert')>
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (${pid}, '新增', '', '${authority}:save', 1, 0, '', 1, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-#if>
-<#if tableOperation?seq_contains('update')>
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (${pid}, '修改', '', '${authority}:update,${authority}:info', 1, 0, '', 2, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-#if>
-<#if tableOperation?seq_contains('delete')>
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (${pid}, '删除', '', '${authority}:delete', 1, 0, '', 3, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-#if>
-<#if tableOperation?seq_contains('import')>
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (${pid}, '导入', '', '${authority}:import', 1, 0, '', 3, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-#if>
-<#if tableOperation?seq_contains('export')>
-INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (${pid}, '导出', '', '${authority}:export', 1, 0, '', 3, 0, 0, 10000, ${dbTime}, 10000, ${dbTime});
-#if>
-#if>
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/add-or-update.vue.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/vue/add-or-update.vue.ftl
deleted file mode 100644
index dd5783c..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/add-or-update.vue.ftl
+++ /dev/null
@@ -1,108 +0,0 @@
-<#import "/vue/form.vue.ftl" as form>
-
- <#if openType==0>
-
- <#else>
-
- #if>
- <@form.maForm>@form.maForm>
- <#if subs?size gt 0>
-
- <#list subs as sub>
-
- <${sub.ClassName} ref="${sub.className}Ref" :value="dataForm.${sub.className}"/>
-
- #list>
-
- #if>
-
- 取消
- 确定
-
- <#if openType==0>
-
- <#else>
-
- #if>
-
-
-
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/api.ts.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/vue/api.ts.ftl
deleted file mode 100644
index ea6c9d7..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/api.ts.ftl
+++ /dev/null
@@ -1,19 +0,0 @@
-import service from '@/utils/request'
-
-export const use${FunctionName}Api = (id: number) => {
- return service.get('${requestUrl}/' + id)
-}
-
-<#if hasTree>
-export const use${FunctionName}TreeLoadApi = (${treePid}: number) => {
- return service.get('${requestUrl}/list?${treePid}=' + ${treePid})
-}
-
-#if>
-export const use${FunctionName}SubmitApi = (dataForm: any) => {
- if (dataForm.id) {
- return service.put('${requestUrl}', dataForm)
- } else {
- return service.post('${requestUrl}', dataForm)
- }
-}
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/form-item.vue.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/vue/form-item.vue.ftl
deleted file mode 100644
index e14934b..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/form-item.vue.ftl
+++ /dev/null
@@ -1,75 +0,0 @@
-<#macro maFormItem model field>
-
- <#if hasTree && field.attrName == treePid>
-
- <#elseif hasLeftTree?? && field.attrName == leftRelationField>
-
- :props="{ label: '${leftTreeLabel}', value: '${leftTreeId}' }"
- url="${leftRequestUrl}/list"
- <#else>
- url="${leftRequestUrl}"
- #if>
- />
- <#elseif field.formType == 'input'>
-
- <#elseif field.formType == 'number'>
-
- <#elseif field.formType == 'textarea'>
-
- <#elseif field.formType == 'editor'>
-
- <#elseif field.formType == 'select'>
- <#if field.formDict??>
-
- <#else>
-
-
-
- #if>
- <#elseif field.formType == 'radio'>
- <#if field.formDict??>
-
- <#else>
-
- 启用
- 禁用
-
- #if>
- <#elseif field.formType == 'checkbox'>
- <#if field.formDict??>
-
- <#else>
-
- 启用
- 禁用
-
- #if>
- <#elseif field.formType == 'address'>
-
- <#elseif field.formType == 'date'>
-
- <#elseif field.formType == 'datetime'>
-
- <#elseif field.formType == 'treeselect'>
-
- <#elseif field.formType == 'user'>
-
- <#elseif field.formType == 'org'>
-
- <#elseif field.formType == 'post'>
-
- <#elseif field.formType == 'file'>
-
- <#elseif field.formType == 'image'>
-
- <#else>
-
- #if>
-
-#macro>
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/form.vue.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/vue/form.vue.ftl
deleted file mode 100644
index 28becd6..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/form.vue.ftl
+++ /dev/null
@@ -1,22 +0,0 @@
-<#import "/vue/form-item.vue.ftl" as formItem>
-
-<#macro maForm>
-
- <#list formList as field>
- <#if (formLayout > 1)>
- <#if field_index % 2 == 0>
-
- #if>
-
- <@formItem.maFormItem model='dataForm' field=field>@formItem.maFormItem>
- <#nt>
- <#if field_index % 2 != 0 || formList?size == field_index + 1>
-
- #if>
- <#else>
- <@formItem.maFormItem model='dataForm' field=field >@formItem.maFormItem>
- #if>
- #list>
- <#nested>
-
-#macro>
\ No newline at end of file
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/index.vue.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/vue/index.vue.ftl
deleted file mode 100644
index 9083d51..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/index.vue.ftl
+++ /dev/null
@@ -1,211 +0,0 @@
-
- <#if hasLeftTree>
-
-
- <#if hasLeftFormDs??>
-
- <#else>
-
- #if>
-
-
- #if>
- <#if tableOperation?seq_contains('query')>
-
-
- <#list queryList as field>
-
- <#if hasTree && field.attrName == treePid>
-
- <#elseif field.queryFormType == 'input'>
-
- <#elseif field.queryFormType == 'select'>
- <#if field.formDict??>
-
- <#else>
-
-
-
- #if>
- <#elseif field.queryFormType == 'radio'>
- <#if field.formDict??>
-
- <#else>
-
- 单选
-
- #if>
- <#elseif field.queryFormType == 'date'>
-
- <#elseif field.queryFormType == 'datetime'>
-
- <#elseif field.queryFormType == 'user'>
-
- <#elseif field.queryFormType == 'org'>
-
- <#elseif field.queryFormType == 'post'>
-
- <#else>
-
- #if>
-
- #list>
-
- 查询
-
-
- 重置
-
-
-
- #if>
-
-
- <#if tableOperation?seq_contains('insert') || tableOperation?seq_contains('import') || tableOperation?seq_contains('export') || tableOperation?seq_contains('delete')>
-
- <#if tableOperation?seq_contains('insert')>
-
- v-auth="'${authority}:save'" #if>icon="Plus" type="primary" @click="addOrUpdateHandle()">新增
-
- #if>
- <#if tableOperation?seq_contains('import')>
- v-auth="'${authority}:import'"#if>>
-
- 导入
-
-
- #if>
- <#if tableOperation?seq_contains('export')>
-
- v-auth="'${authority}:export'" #if>plain icon="Download" @click="downloadHandle('${requestUrl}/export')">导出
-
- #if>
- <#if tableOperation?seq_contains('delete')>
-
- v-auth="'${authority}:delete'" #if>icon="Delete" plain type="danger" @click="deleteBatchHandle()">批量删除
-
- #if>
-
- #if>
- row-key="id" lazy :load="load" :tree-props="{ hasChildren: 'hasChild' }"#if>>
-
- <#list gridList as field>
- <#if field.formDict??>
-
- <#elseif field.formType=='image'>
-
- <#else>
-
- #if>
- #list>
- <#if tableOperation?seq_contains('update') || tableOperation?seq_contains('delete')>
-
-
- <#if tableOperation?seq_contains('update')>
- v-auth="'${authority}:update'" #if>type="primary" link @click="addOrUpdateHandle(scope.row.id)">修改
- #if>
- <#if tableOperation?seq_contains('delete')>
- v-auth="'${authority}:delete'" #if>type="primary" link @click="deleteBatchHandle(scope.row.id)">删除
- #if>
-
-
- #if>
-
-
-
-
- <#if tableOperation?seq_contains('insert') || tableOperation?seq_contains('update')>
-
-
- #if>
- <#if hasLeftTree && hasLeftFormDs??>
-
-
-
- #if>
-
-<#if hasLeftTree>
-
-
-#if>
-
-
-
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/sub-add-or-update.vue.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/vue/sub-add-or-update.vue.ftl
deleted file mode 100644
index 2ab3c2f..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/vue/sub-add-or-update.vue.ftl
+++ /dev/null
@@ -1,183 +0,0 @@
-<#import "/vue/form.vue.ftl" as form>
-
- <#if mainRelation == 1>
- <@form.maForm>@form.maForm>
- #if>
- <#if mainRelation == 2>
- 新增
- 删除
-
-
- <#list formList as field>
-
- #list>
-
-
-
-
-
-
-
-
- <@form.maForm>@form.maForm>
-
- 取消
- 确定
-
-
- #if>
-
-
-
diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/xml/Dao.xml.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/xml/Dao.xml.ftl
deleted file mode 100644
index 5344b46..0000000
--- a/maku-boot-module/maku-module-generator/src/main/resources/template/xml/Dao.xml.ftl
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file