Browse Source

update code

allen 4 tháng trước cách đây
mục cha
commit
62055553cb
59 tập tin đã thay đổi với 254 bổ sung6880 xóa
  1. 6 5
      ips-generator/pom.xml
  2. 0 104
      ips-generator/src/main/java/com/ips/generator/controller/GenChildTablesController.java
  3. 10 55
      ips-generator/src/main/java/com/ips/generator/controller/GenController.java
  4. 0 104
      ips-generator/src/main/java/com/ips/generator/controller/GenPageController.java
  5. 0 51
      ips-generator/src/main/java/com/ips/generator/domain/GenChildTables.java
  6. 0 111
      ips-generator/src/main/java/com/ips/generator/domain/GenPage.java
  7. 0 10
      ips-generator/src/main/java/com/ips/generator/domain/GenTable.java
  8. 0 23
      ips-generator/src/main/java/com/ips/generator/domain/GenTableColumn.java
  9. 0 43
      ips-generator/src/main/java/com/ips/generator/domain/RelBizObjConfig.java
  10. 0 63
      ips-generator/src/main/java/com/ips/generator/mapper/GenChildTablesMapper.java
  11. 0 61
      ips-generator/src/main/java/com/ips/generator/mapper/GenPageMapper.java
  12. 0 3
      ips-generator/src/main/java/com/ips/generator/mapper/GenTableColumnMapper.java
  13. 0 96
      ips-generator/src/main/java/com/ips/generator/service/GenPageServiceImpl.java
  14. 2 1
      ips-generator/src/main/java/com/ips/generator/service/GenTableColumnServiceImpl.java
  15. 23 32
      ips-generator/src/main/java/com/ips/generator/service/GenTableServiceImpl.java
  16. 0 63
      ips-generator/src/main/java/com/ips/generator/service/IGenChildTablesService.java
  17. 0 61
      ips-generator/src/main/java/com/ips/generator/service/IGenPageService.java
  18. 0 8
      ips-generator/src/main/java/com/ips/generator/service/IGenTableService.java
  19. 0 99
      ips-generator/src/main/java/com/ips/generator/service/impl/GenChildTablesServiceImpl.java
  20. 0 5
      ips-generator/src/main/java/com/ips/generator/util/GenUtils.java
  21. 25 45
      ips-generator/src/main/java/com/ips/generator/util/VelocityUtils.java
  22. 0 73
      ips-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java
  23. 0 104
      ips-generator/src/main/java/com/ruoyi/generator/controller/GenChildTablesController.java
  24. 0 260
      ips-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
  25. 0 104
      ips-generator/src/main/java/com/ruoyi/generator/controller/GenPageController.java
  26. 0 51
      ips-generator/src/main/java/com/ruoyi/generator/domain/GenChildTables.java
  27. 0 111
      ips-generator/src/main/java/com/ruoyi/generator/domain/GenPage.java
  28. 0 382
      ips-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java
  29. 0 396
      ips-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
  30. 0 43
      ips-generator/src/main/java/com/ruoyi/generator/domain/RelBizObjConfig.java
  31. 0 63
      ips-generator/src/main/java/com/ruoyi/generator/mapper/GenChildTablesMapper.java
  32. 0 61
      ips-generator/src/main/java/com/ruoyi/generator/mapper/GenPageMapper.java
  33. 0 63
      ips-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java
  34. 0 83
      ips-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java
  35. 0 96
      ips-generator/src/main/java/com/ruoyi/generator/service/GenPageServiceImpl.java
  36. 0 68
      ips-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java
  37. 0 531
      ips-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
  38. 0 63
      ips-generator/src/main/java/com/ruoyi/generator/service/IGenChildTablesService.java
  39. 0 61
      ips-generator/src/main/java/com/ruoyi/generator/service/IGenPageService.java
  40. 0 44
      ips-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java
  41. 0 129
      ips-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java
  42. 0 99
      ips-generator/src/main/java/com/ruoyi/generator/service/impl/GenChildTablesServiceImpl.java
  43. 0 262
      ips-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
  44. 0 34
      ips-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java
  45. 0 422
      ips-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
  46. 0 107
      ips-generator/src/main/resources/mapper/generator/GenChildTablesMapper.xml
  47. 0 92
      ips-generator/src/main/resources/mapper/generator/GenPageMapper.xml
  48. 2 23
      ips-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
  49. 3 3
      ips-generator/src/main/resources/mapper/generator/GenTableMapper.xml
  50. 1 1
      ips-generator/src/main/resources/vm/vue/index-tree.vue.vm
  51. 0 474
      ips-generator/src/main/resources/vm/vue/v3/index-tree3.vue.vm
  52. 0 590
      ips-generator/src/main/resources/vm/vue/v3/index3.vue.vm
  53. 1 1
      ips-ui/dist_electron/background.js
  54. 0 97
      ips-ui/src/api/tool/gen.js
  55. 19 208
      ips-ui/src/views/tool/gen/editTable.vue
  56. 36 275
      ips-ui/src/views/tool/gen/genInfoForm.vue
  57. 8 33
      ips-ui/src/views/tool/gen/index.vue
  58. 0 329
      ips-ui/src/views/tool/gen/pageInfoForm.vue
  59. 118 1
      sql/biz.sql

+ 6 - 5
ips-generator/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>ruoyi</artifactId>
-        <groupId>com.ruoyi</groupId>
+        <artifactId>ips</artifactId>
+        <groupId>com.ips</groupId>
         <version>3.8.6</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>ruoyi-generator</artifactId>
+    <artifactId>ips-generator</artifactId>
 
     <description>
         generator代码生成
@@ -31,9 +31,10 @@
 
         <!-- 通用工具-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-common</artifactId>
+            <groupId>com.ips</groupId>
+            <artifactId>ips-common</artifactId>
         </dependency>
+
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>

+ 0 - 104
ips-generator/src/main/java/com/ips/generator/controller/GenChildTablesController.java

@@ -1,104 +0,0 @@
-package com.ips.generator.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ips.common.annotation.Log;
-import com.ips.common.core.controller.BaseController;
-import com.ips.common.core.domain.AjaxResult;
-import com.ips.common.enums.BusinessType;
-import com.ips.generator.domain.GenChildTables;
-import com.ips.generator.service.IGenChildTablesService;
-import com.ips.common.utils.poi.ExcelUtil;
-import com.ips.common.core.page.TableDataInfo;
-
-/**
- * 子业务对象Controller
- * 
- * @author wudi
- * @date 2023-10-30
- */
-@RestController
-@RequestMapping("/generator/childTables")
-public class GenChildTablesController extends BaseController
-{
-    @Autowired
-    private IGenChildTablesService genChildTablesService;
-
-    /**
-     * 查询子业务对象列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(GenChildTables genChildTables)
-    {
-        startPage();
-        List<GenChildTables> list = genChildTablesService.selectGenChildTablesList(genChildTables);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出子业务对象列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:export')")
-    @Log(title = "子业务对象", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, GenChildTables genChildTables)
-    {
-        List<GenChildTables> list = genChildTablesService.selectGenChildTablesList(genChildTables);
-        ExcelUtil<GenChildTables> util = new ExcelUtil<GenChildTables>(GenChildTables.class);
-        util.exportExcel(response, list, "子业务对象数据");
-    }
-
-    /**
-     * 获取子业务对象详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:query')")
-    @GetMapping(value = "/{tableId}")
-    public AjaxResult getInfo(@PathVariable("tableId") String tableId)
-    {
-        return success(genChildTablesService.selectGenChildTablesByTableId(tableId));
-    }
-
-    /**
-     * 新增子业务对象
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:add')")
-    @Log(title = "子业务对象", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody GenChildTables genChildTables)
-    {
-        return toAjax(genChildTablesService.insertGenChildTables(genChildTables));
-    }
-
-    /**
-     * 修改子业务对象
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:edit')")
-    @Log(title = "子业务对象", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody GenChildTables genChildTables)
-    {
-        return toAjax(genChildTablesService.updateGenChildTables(genChildTables));
-    }
-
-    /**
-     * 删除子业务对象
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:remove')")
-    @Log(title = "子业务对象", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{tableIds}")
-    public AjaxResult remove(@PathVariable String[] tableIds)
-    {
-        return toAjax(genChildTablesService.deleteGenChildTablesByTableIds(tableIds));
-    }
-}

+ 10 - 55
ips-generator/src/main/java/com/ips/generator/controller/GenController.java

@@ -1,19 +1,19 @@
 package com.ips.generator.controller;
 
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ips.common.utils.StringUtils;
-import com.ips.generator.domain.GenChildTables;
-import com.ips.generator.domain.RelBizObjConfig;
-import com.ips.generator.service.IGenChildTablesService;
+import com.ips.common.annotation.Log;
+import com.ips.common.core.controller.BaseController;
+import com.ips.common.core.domain.AjaxResult;
+import com.ips.common.core.page.TableDataInfo;
+import com.ips.common.core.text.Convert;
+import com.ips.common.enums.BusinessType;
+import com.ips.generator.service.IGenTableColumnService;
+import com.ips.generator.service.IGenTableService;
 import org.apache.commons.io.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -26,16 +26,8 @@ import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import com.ips.common.annotation.Log;
-import com.ips.common.core.controller.BaseController;
-import com.ips.common.core.domain.AjaxResult;
-import com.ips.common.core.page.TableDataInfo;
-import com.ips.common.core.text.Convert;
-import com.ips.common.enums.BusinessType;
 import com.ips.generator.domain.GenTable;
 import com.ips.generator.domain.GenTableColumn;
-import com.ips.generator.service.IGenTableColumnService;
-import com.ips.generator.service.IGenTableService;
 
 /**
  * 代码生成 操作处理
@@ -52,9 +44,6 @@ public class GenController extends BaseController
     @Autowired
     private IGenTableColumnService genTableColumnService;
 
-    @Autowired
-    private IGenChildTablesService genChildTablesService;
-
     /**
      * 查询代码生成列表
      */
@@ -68,42 +57,8 @@ public class GenController extends BaseController
     }
 
     /**
-     * 获取bizObj的字段信息
+     * 修改代码生成业务
      */
-    @PreAuthorize("@ss.hasPermi('tool:gen:query')")
-    @GetMapping(value = "/getBizObjList/{tableId}")
-    public AjaxResult getBizObjList(@PathVariable Long tableId)
-    {
-        List<String> childTableIds = new ArrayList<String>();
-        List<String> relTableIds = new ArrayList<String>();
-        //获取业务对象信息和关联业务对象信息
-        GenTable table = genTableService.selectGenTableById(tableId);
-        List<GenTableColumn> tableColList = genTableColumnService.selectGenTableColumnListByTableId(tableId);
-        Map<String,List<GenTableColumn>> relColMap = new HashMap<String,List<GenTableColumn>>();
-        tableColList.stream().forEach(item->{
-            if(StringUtils.isNotEmpty(item.getBizObj())){
-                RelBizObjConfig j = JSON.parseObject(item.getBizObj(),RelBizObjConfig.class);
-                List<GenTableColumn> childColList = genTableService.getGenTableColumns(j.getBizObj().toString());
-                relColMap.put(j.getBizObj().toString(),childColList);
-            }
-        });
-        //获取业务对象子对象信息
-        GenChildTables genChildTables = new GenChildTables();
-        genChildTables.setTableId(tableId.toString());
-        List<GenChildTables> GenChildTablesList = genChildTablesService.selectGenChildTablesList(genChildTables);
-        Map<String,List<GenTableColumn>> childColMap = new HashMap<String,List<GenTableColumn>>();
-        GenChildTablesList.stream().forEach(item->{
-            List<GenTableColumn> childColList = genTableService.getGenTableColumns(item.getTableId());
-            childColMap.put(item.getChildTableId(),childColList);
-        });
-
-        Map<String, Object> map = new HashMap<String, Object>();
-        map.put("tableColList", tableColList);
-        map.put("childColMap", childColMap);
-        map.put("relColMap", relColMap);
-        return success(map);
-    }
-
     @PreAuthorize("@ss.hasPermi('tool:gen:query')")
     @GetMapping(value = "/{tableId}")
     public AjaxResult getInfo(@PathVariable Long tableId)
@@ -113,7 +68,7 @@ public class GenController extends BaseController
         List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("info", table);
-        map.put("cols", list);
+        map.put("rows", list);
         map.put("tables", tables);
         return success(map);
     }

+ 0 - 104
ips-generator/src/main/java/com/ips/generator/controller/GenPageController.java

@@ -1,104 +0,0 @@
-package com.ips.generator.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ips.common.annotation.Log;
-import com.ips.common.core.controller.BaseController;
-import com.ips.common.core.domain.AjaxResult;
-import com.ips.common.enums.BusinessType;
-import com.ips.generator.domain.GenPage;
-import com.ips.generator.service.IGenPageService;
-import com.ips.common.utils.poi.ExcelUtil;
-import com.ips.common.core.page.TableDataInfo;
-
-/**
- * 页面信息Controller
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-@RestController
-@RequestMapping("/generator/page")
-public class GenPageController extends BaseController
-{
-    @Autowired
-    private IGenPageService genPageService;
-
-    /**
-     * 查询页面信息列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(GenPage genPage)
-    {
-        startPage();
-        List<GenPage> list = genPageService.selectGenPageList(genPage);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出页面信息列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:export')")
-    @Log(title = "页面信息", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, GenPage genPage)
-    {
-        List<GenPage> list = genPageService.selectGenPageList(genPage);
-        ExcelUtil<GenPage> util = new ExcelUtil<GenPage>(GenPage.class);
-        util.exportExcel(response, list, "页面信息数据");
-    }
-
-    /**
-     * 获取页面信息详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:query')")
-    @GetMapping(value = "/{pageId}")
-    public AjaxResult getInfo(@PathVariable("pageId") String pageId)
-    {
-        return success(genPageService.selectGenPageByPageId(pageId));
-    }
-
-    /**
-     * 新增页面信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:add')")
-    @Log(title = "页面信息", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody GenPage genPage)
-    {
-        return toAjax(genPageService.insertGenPage(genPage));
-    }
-
-    /**
-     * 修改页面信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:edit')")
-    @Log(title = "页面信息", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody GenPage genPage)
-    {
-        return toAjax(genPageService.updateGenPage(genPage));
-    }
-
-    /**
-     * 删除页面信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:remove')")
-    @Log(title = "页面信息", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{pageIds}")
-    public AjaxResult remove(@PathVariable String[] pageIds)
-    {
-        return toAjax(genPageService.deleteGenPageByPageIds(pageIds));
-    }
-}

+ 0 - 51
ips-generator/src/main/java/com/ips/generator/domain/GenChildTables.java

@@ -1,51 +0,0 @@
-package com.ips.generator.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import com.ips.common.annotation.Excel;
-import com.ips.common.core.domain.BaseEntity;
-
-/**
- * 子业务对象对象 gen_child_tables
- * 
- * @author wudi
- * @date 2023-10-30
- */
-
-@Data
-public class GenChildTables extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 子表关联关系id */
-    @TableId(value = "table_ref_id" , type = IdType.INPUT)
-    private String tableRefId;
-
-    /** 业务对象id */
-    private String tableId;
-
-    private String tableName;
-
-    /** 子业务对象id */
-    private String childTableId;
-
-    private String childTableName;
-
-    /** 关联字段 */
-    @Excel(name = "关联字段")
-    private String relField;
-
-    private String relFieldName;
-
-    /** 父子业务对象关系 */
-    @Excel(name = "父子业务对象关系")
-    private String name;
-
-    /** 父子业务对象关系 */
-    @Excel(name = "父子业务对象关系")
-    private String descText;
-
-
-}

+ 0 - 111
ips-generator/src/main/java/com/ips/generator/domain/GenPage.java

@@ -1,111 +0,0 @@
-package com.ips.generator.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ips.common.annotation.Excel;
-import com.ips.common.core.domain.BaseEntity;
-
-/**
- * 页面信息对象 gen_page
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-public class GenPage extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** $column.columnComment */
-    private String pageId;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private Long tableId;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String name;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String descText;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String config;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private Long version;
-
-    public void setPageId(String pageId) 
-    {
-        this.pageId = pageId;
-    }
-
-    public String getPageId() 
-    {
-        return pageId;
-    }
-    public void setTableId(Long tableId) 
-    {
-        this.tableId = tableId;
-    }
-
-    public Long getTableId() 
-    {
-        return tableId;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setDescText(String descText) 
-    {
-        this.descText = descText;
-    }
-
-    public String getDescText() 
-    {
-        return descText;
-    }
-    public void setConfig(String config) 
-    {
-        this.config = config;
-    }
-
-    public String getConfig() 
-    {
-        return config;
-    }
-    public void setVersion(Long version) 
-    {
-        this.version = version;
-    }
-
-    public Long getVersion() 
-    {
-        return version;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("pageId", getPageId())
-            .append("tableId", getTableId())
-            .append("name", getName())
-            .append("descText", getDescText())
-            .append("config", getConfig())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("version", getVersion())
-            .toString();
-    }
-}

+ 0 - 10
ips-generator/src/main/java/com/ips/generator/domain/GenTable.java

@@ -95,8 +95,6 @@ public class GenTable extends BaseEntity
     /** 上级菜单名称字段 */
     private String parentMenuName;
 
-    private List<GenChildTables> GenChildTablesList;
-
     public Long getTableId()
     {
         return tableId;
@@ -371,12 +369,4 @@ public class GenTable extends BaseEntity
         }
         return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
     }
-
-    public List<GenChildTables> getGenChildTablesList() {
-        return GenChildTablesList;
-    }
-
-    public void setGenChildTablesList(List<GenChildTables> genChildTablesList) {
-        GenChildTablesList = genChildTablesList;
-    }
 }

+ 0 - 23
ips-generator/src/main/java/com/ips/generator/domain/GenTableColumn.java

@@ -68,12 +68,6 @@ public class GenTableColumn extends BaseEntity
     /** 排序 */
     private Integer sort;
 
-    /**配置的关联业务对象 */
-    private String bizObj;
-
-    /**关联业务对象中字段配置 */
-    private String fieldConfig;
-
     public void setColumnId(Long columnId)
     {
         this.columnId = columnId;
@@ -329,23 +323,6 @@ public class GenTableColumn extends BaseEntity
         return sort;
     }
 
-    public String getBizObj() {
-        return bizObj;
-    }
-
-    public void setBizObj(String bizObj) {
-        this.bizObj = bizObj;
-    }
-
-    public String getFieldConfig() {
-        return fieldConfig;
-    }
-
-    public void setFieldConfig(String fieldConfig) {
-        this.fieldConfig = fieldConfig;
-    }
-
-    // super column 是在BaseEntity中的定义的column
     public boolean isSuperColumn()
     {
         return isSuperColumn(this.javaField);

+ 0 - 43
ips-generator/src/main/java/com/ips/generator/domain/RelBizObjConfig.java

@@ -1,43 +0,0 @@
-package com.ips.generator.domain;
-
-import com.ips.common.core.domain.BaseEntity;
-
-public class RelBizObjConfig extends BaseEntity {
-
-    private String name;
-    private String textDesc;
-    private Integer bizObj;
-    private String labelField;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getTextDesc() {
-        return textDesc;
-    }
-
-    public void setTextDesc(String textDesc) {
-        this.textDesc = textDesc;
-    }
-
-    public Integer getBizObj() {
-        return bizObj;
-    }
-
-    public void setBizObj(Integer bizObj) {
-        this.bizObj = bizObj;
-    }
-
-    public String getLabelField() {
-        return labelField;
-    }
-
-    public void setLabelField(String labelField) {
-        this.labelField = labelField;
-    }
-}

+ 0 - 63
ips-generator/src/main/java/com/ips/generator/mapper/GenChildTablesMapper.java

@@ -1,63 +0,0 @@
-package com.ips.generator.mapper;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ips.generator.domain.GenChildTables;
-
-/**
- * 子业务对象Mapper接口
- * 
- * @author wudi
- * @date 2023-10-30
- */
-public interface GenChildTablesMapper extends BaseMapper<GenChildTables>
-{
-    /**
-     * 查询子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 子业务对象
-     */
-    public GenChildTables selectGenChildTablesByTableId(String tableId);
-
-    /**
-     * 查询子业务对象列表
-     * 
-     * @param genChildTables 子业务对象
-     * @return 子业务对象集合
-     */
-    public List<GenChildTables> selectGenChildTablesList(GenChildTables genChildTables);
-
-    /**
-     * 新增子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int insertGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 修改子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int updateGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 删除子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableId(String tableId);
-
-    /**
-     * 批量删除子业务对象
-     * 
-     * @param tableIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableIds(String[] tableIds);
-}

+ 0 - 61
ips-generator/src/main/java/com/ips/generator/mapper/GenPageMapper.java

@@ -1,61 +0,0 @@
-package com.ips.generator.mapper;
-
-import java.util.List;
-import com.ips.generator.domain.GenPage;
-
-/**
- * 页面信息Mapper接口
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-public interface GenPageMapper 
-{
-    /**
-     * 查询页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 页面信息
-     */
-    public GenPage selectGenPageByPageId(String pageId);
-
-    /**
-     * 查询页面信息列表
-     * 
-     * @param genPage 页面信息
-     * @return 页面信息集合
-     */
-    public List<GenPage> selectGenPageList(GenPage genPage);
-
-    /**
-     * 新增页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int insertGenPage(GenPage genPage);
-
-    /**
-     * 修改页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int updateGenPage(GenPage genPage);
-
-    /**
-     * 删除页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 结果
-     */
-    public int deleteGenPageByPageId(String pageId);
-
-    /**
-     * 批量删除页面信息
-     * 
-     * @param pageIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteGenPageByPageIds(String[] pageIds);
-}

+ 0 - 3
ips-generator/src/main/java/com/ips/generator/mapper/GenTableColumnMapper.java

@@ -2,7 +2,6 @@ package com.ips.generator.mapper;
 
 import java.util.List;
 import com.ips.generator.domain.GenTableColumn;
-import org.apache.ibatis.annotations.Param;
 
 /**
  * 业务字段 数据层
@@ -58,6 +57,4 @@ public interface GenTableColumnMapper
      * @return 结果
      */
     public int deleteGenTableColumnByIds(Long[] ids);
-
-    List<GenTableColumn> getGenTableColumns(@Param("tableIds")List<String> tableIds);
 }

+ 0 - 96
ips-generator/src/main/java/com/ips/generator/service/GenPageServiceImpl.java

@@ -1,96 +0,0 @@
-package com.ips.generator.service;
-
-import java.util.List;
-import com.ips.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ips.generator.mapper.GenPageMapper;
-import com.ips.generator.domain.GenPage;
-import com.ips.generator.service.IGenPageService;
-
-/**
- * 页面信息Service业务层处理
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-@Service
-public class GenPageServiceImpl implements IGenPageService 
-{
-    @Autowired
-    private GenPageMapper genPageMapper;
-
-    /**
-     * 查询页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 页面信息
-     */
-    @Override
-    public GenPage selectGenPageByPageId(String pageId)
-    {
-        return genPageMapper.selectGenPageByPageId(pageId);
-    }
-
-    /**
-     * 查询页面信息列表
-     * 
-     * @param genPage 页面信息
-     * @return 页面信息
-     */
-    @Override
-    public List<GenPage> selectGenPageList(GenPage genPage)
-    {
-        return genPageMapper.selectGenPageList(genPage);
-    }
-
-    /**
-     * 新增页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    @Override
-    public int insertGenPage(GenPage genPage)
-    {
-        genPage.setCreateTime(DateUtils.getNowDate());
-        return genPageMapper.insertGenPage(genPage);
-    }
-
-    /**
-     * 修改页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    @Override
-    public int updateGenPage(GenPage genPage)
-    {
-        genPage.setUpdateTime(DateUtils.getNowDate());
-        return genPageMapper.updateGenPage(genPage);
-    }
-
-    /**
-     * 批量删除页面信息
-     * 
-     * @param pageIds 需要删除的页面信息主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenPageByPageIds(String[] pageIds)
-    {
-        return genPageMapper.deleteGenPageByPageIds(pageIds);
-    }
-
-    /**
-     * 删除页面信息信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenPageByPageId(String pageId)
-    {
-        return genPageMapper.deleteGenPageByPageId(pageId);
-    }
-}

+ 2 - 1
ips-generator/src/main/java/com/ips/generator/service/GenTableColumnServiceImpl.java

@@ -1,11 +1,12 @@
 package com.ips.generator.service;
 
 import java.util.List;
+
+import com.ips.generator.mapper.GenTableColumnMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ips.common.core.text.Convert;
 import com.ips.generator.domain.GenTableColumn;
-import com.ips.generator.mapper.GenTableColumnMapper;
 
 /**
  * 业务字段 服务层实现

+ 23 - 32
ips-generator/src/main/java/com/ips/generator/service/GenTableServiceImpl.java

@@ -4,7 +4,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.StringWriter;
-import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -13,8 +12,9 @@ import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
-import com.ips.generator.domain.GenChildTables;
-import com.ips.generator.mapper.GenChildTablesMapper;
+import com.ips.generator.mapper.GenTableColumnMapper;
+import com.ips.generator.mapper.GenTableMapper;
+import com.ips.generator.util.VelocityInitializer;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.velocity.Template;
@@ -35,10 +35,7 @@ import com.ips.common.utils.SecurityUtils;
 import com.ips.common.utils.StringUtils;
 import com.ips.generator.domain.GenTable;
 import com.ips.generator.domain.GenTableColumn;
-import com.ips.generator.mapper.GenTableColumnMapper;
-import com.ips.generator.mapper.GenTableMapper;
 import com.ips.generator.util.GenUtils;
-import com.ips.generator.util.VelocityInitializer;
 import com.ips.generator.util.VelocityUtils;
 
 /**
@@ -54,9 +51,6 @@ public class GenTableServiceImpl implements IGenTableService
     @Autowired
     private GenTableMapper genTableMapper;
 
-    @Autowired
-    private GenChildTablesMapper genChildTablesMapper;
-
     @Autowired
     private GenTableColumnMapper genTableColumnMapper;
 
@@ -264,7 +258,7 @@ public class GenTableServiceImpl implements IGenTableService
         List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory());
         for (String template : templates)
         {
-            if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm", "index3.vue.vm", "index-tree3.vue.vm"))
+            if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm"))
             {
                 // 渲染模板
                 StringWriter sw = new StringWriter();
@@ -375,7 +369,8 @@ public class GenTableServiceImpl implements IGenTableService
 
         // 获取模板列表
         List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory());
-        for (String template : templates) {
+        for (String template : templates)
+        {
             // 渲染模板
             StringWriter sw = new StringWriter();
             Template tpl = Velocity.getTemplate(template, Constants.UTF8);
@@ -434,8 +429,6 @@ public class GenTableServiceImpl implements IGenTableService
         }
     }
 
-
-
     /**
      * 设置主键列信息
      * 
@@ -443,25 +436,30 @@ public class GenTableServiceImpl implements IGenTableService
      */
     public void setPkColumn(GenTable table)
     {
-        for (GenTableColumn column : table.getColumns()) {
-            if (column.isPk()) {
+        for (GenTableColumn column : table.getColumns())
+        {
+            if (column.isPk())
+            {
                 table.setPkColumn(column);
                 break;
             }
         }
-        //处理没有定义pk的情况
-        if (StringUtils.isNull(table.getPkColumn())) {
+        if (StringUtils.isNull(table.getPkColumn()))
+        {
             table.setPkColumn(table.getColumns().get(0));
         }
-        //父子表处理
-        if (GenConstants.TPL_SUB.equals(table.getTplCategory())) {
-            for (GenTableColumn column : table.getSubTable().getColumns()) {
-                if (column.isPk()) {
+        if (GenConstants.TPL_SUB.equals(table.getTplCategory()))
+        {
+            for (GenTableColumn column : table.getSubTable().getColumns())
+            {
+                if (column.isPk())
+                {
                     table.getSubTable().setPkColumn(column);
                     break;
                 }
             }
-            if (StringUtils.isNull(table.getSubTable().getPkColumn())) {
+            if (StringUtils.isNull(table.getSubTable().getPkColumn()))
+            {
                 table.getSubTable().setPkColumn(table.getSubTable().getColumns().get(0));
             }
         }
@@ -474,12 +472,10 @@ public class GenTableServiceImpl implements IGenTableService
      */
     public void setSubTable(GenTable table)
     {
-        GenChildTables genChildTables =  new GenChildTables();
-        genChildTables.setTableId(table.getTableId().toString());
-        List<GenChildTables> genchildList = genChildTablesMapper.selectGenChildTablesList(genChildTables);
-        if (null !=genchildList && genchildList.size()>0)
+        String subTableName = table.getSubTableName();
+        if (StringUtils.isNotEmpty(subTableName))
         {
-            table.setGenChildTablesList(genchildList);
+            table.setSubTable(genTableMapper.selectGenTableByName(subTableName));
         }
     }
 
@@ -523,9 +519,4 @@ public class GenTableServiceImpl implements IGenTableService
         }
         return genPath + File.separator + VelocityUtils.getFileName(template, table);
     }
-
-    @Override
-    public List<GenTableColumn> getGenTableColumns(String tableId) {
-        return genTableColumnMapper.selectGenTableColumnListByTableId(Long.valueOf(tableId));
-    }
 }

+ 0 - 63
ips-generator/src/main/java/com/ips/generator/service/IGenChildTablesService.java

@@ -1,63 +0,0 @@
-package com.ips.generator.service;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ips.generator.domain.GenChildTables;
-
-/**
- * 子业务对象Service接口
- * 
- * @author wudi
- * @date 2023-10-30
- */
-public interface IGenChildTablesService extends IService<GenChildTables>
-{
-    /**
-     * 查询子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 子业务对象
-     */
-    public GenChildTables selectGenChildTablesByTableId(String tableId);
-
-    /**
-     * 查询子业务对象列表
-     * 
-     * @param genChildTables 子业务对象
-     * @return 子业务对象集合
-     */
-    public List<GenChildTables> selectGenChildTablesList(GenChildTables genChildTables);
-
-    /**
-     * 新增子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int insertGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 修改子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int updateGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 批量删除子业务对象
-     * 
-     * @param tableIds 需要删除的子业务对象主键集合
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableIds(String[] tableIds);
-
-    /**
-     * 删除子业务对象信息
-     * 
-     * @param tableId 子业务对象主键
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableId(String tableId);
-}

+ 0 - 61
ips-generator/src/main/java/com/ips/generator/service/IGenPageService.java

@@ -1,61 +0,0 @@
-package com.ips.generator.service;
-
-import java.util.List;
-import com.ips.generator.domain.GenPage;
-
-/**
- * 页面信息Service接口
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-public interface IGenPageService 
-{
-    /**
-     * 查询页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 页面信息
-     */
-    public GenPage selectGenPageByPageId(String pageId);
-
-    /**
-     * 查询页面信息列表
-     * 
-     * @param genPage 页面信息
-     * @return 页面信息集合
-     */
-    public List<GenPage> selectGenPageList(GenPage genPage);
-
-    /**
-     * 新增页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int insertGenPage(GenPage genPage);
-
-    /**
-     * 修改页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int updateGenPage(GenPage genPage);
-
-    /**
-     * 批量删除页面信息
-     * 
-     * @param pageIds 需要删除的页面信息主键集合
-     * @return 结果
-     */
-    public int deleteGenPageByPageIds(String[] pageIds);
-
-    /**
-     * 删除页面信息信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 结果
-     */
-    public int deleteGenPageByPageId(String pageId);
-}

+ 0 - 8
ips-generator/src/main/java/com/ips/generator/service/IGenTableService.java

@@ -3,7 +3,6 @@ package com.ips.generator.service;
 import java.util.List;
 import java.util.Map;
 import com.ips.generator.domain.GenTable;
-import com.ips.generator.domain.GenTableColumn;
 
 /**
  * 业务 服务层
@@ -119,11 +118,4 @@ public interface IGenTableService
      * @param genTable 业务信息
      */
     public void validateEdit(GenTable genTable);
-
-    /**
-     * 获取多表字段信息
-     *
-     * @param tableId 业务对象id
-     */
-    List<GenTableColumn> getGenTableColumns(String tableId);
 }

+ 0 - 99
ips-generator/src/main/java/com/ips/generator/service/impl/GenChildTablesServiceImpl.java

@@ -1,99 +0,0 @@
-package com.ips.generator.service.impl;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ips.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ips.generator.mapper.GenChildTablesMapper;
-import com.ips.generator.domain.GenChildTables;
-import com.ips.generator.service.IGenChildTablesService;
-
-/**
- * 子业务对象Service业务层处理
- * 
- * @author wudi
- * @date 2023-10-30
- */
-@Service
-public class GenChildTablesServiceImpl extends ServiceImpl<GenChildTablesMapper,GenChildTables>
-        implements IGenChildTablesService
-{
-    @Autowired
-    private GenChildTablesMapper genChildTablesMapper;
-
-    /**
-     * 查询子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 子业务对象
-     */
-    @Override
-    public GenChildTables selectGenChildTablesByTableId(String tableId)
-    {
-        return genChildTablesMapper.selectGenChildTablesByTableId(tableId);
-    }
-
-    /**
-     * 查询子业务对象列表
-     * 
-     * @param genChildTables 子业务对象
-     * @return 子业务对象
-     */
-    @Override
-    public List<GenChildTables> selectGenChildTablesList(GenChildTables genChildTables)
-    {
-        return genChildTablesMapper.selectGenChildTablesList(genChildTables);
-    }
-
-    /**
-     * 新增子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    @Override
-    public int insertGenChildTables(GenChildTables genChildTables)
-    {
-        genChildTables.setCreateTime(DateUtils.getNowDate());
-        return genChildTablesMapper.insertGenChildTables(genChildTables);
-    }
-
-    /**
-     * 修改子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    @Override
-    public int updateGenChildTables(GenChildTables genChildTables)
-    {
-        genChildTables.setUpdateTime(DateUtils.getNowDate());
-        return genChildTablesMapper.updateGenChildTables(genChildTables);
-    }
-
-    /**
-     * 批量删除子业务对象
-     * 
-     * @param tableIds 需要删除的子业务对象主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenChildTablesByTableIds(String[] tableIds)
-    {
-        return genChildTablesMapper.deleteGenChildTablesByTableIds(tableIds);
-    }
-
-    /**
-     * 删除子业务对象信息
-     * 
-     * @param tableId 子业务对象主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenChildTablesByTableId(String tableId)
-    {
-        return genChildTablesMapper.deleteGenChildTablesByTableId(tableId);
-    }
-}

+ 0 - 5
ips-generator/src/main/java/com/ips/generator/util/GenUtils.java

@@ -56,11 +56,6 @@ public class GenUtils
             column.setJavaType(GenConstants.TYPE_DATE);
             column.setHtmlType(GenConstants.HTML_DATETIME);
         }
-        else if (arraysContains(GenConstants.COLUMNTYPE_INT, dataType) && !column.isPk())
-        {
-            column.setJavaType(GenConstants.TYPE_LONG);
-            column.setHtmlType(GenConstants.HTML_SELECT);
-        }
         else if (arraysContains(GenConstants.COLUMNTYPE_NUMBER, dataType))
         {
             column.setHtmlType(GenConstants.HTML_INPUT);

+ 25 - 45
ips-generator/src/main/java/com/ips/generator/util/VelocityUtils.java

@@ -39,8 +39,8 @@ public class VelocityUtils
         String moduleName = genTable.getModuleName();
         String businessName = genTable.getBusinessName();
         String packageName = genTable.getPackageName();
-        String tplCategory = genTable.getTplCategory();    // 操作类型, 有单表crud,树表处理,父子表处理
-        String functionName = genTable.getFunctionName();  // 业务名称
+        String tplCategory = genTable.getTplCategory();
+        String functionName = genTable.getFunctionName();
 
         VelocityContext velocityContext = new VelocityContext();
         velocityContext.put("tplCategory", genTable.getTplCategory());
@@ -61,7 +61,6 @@ public class VelocityUtils
         velocityContext.put("columns", genTable.getColumns());
         velocityContext.put("table", genTable);
         velocityContext.put("dicts", getDicts(genTable));
-        velocityContext.put("relObjs", getRelObjs(genTable));
         setMenuVelocityContext(velocityContext, genTable);
         if (GenConstants.TPL_TREE.equals(tplCategory))
         {
@@ -141,18 +140,16 @@ public class VelocityUtils
         if (GenConstants.TPL_CRUD.equals(tplCategory))
         {
             templates.add("vm/vue/index.vue.vm");
-            templates.add("vm/vue/v3/index3.vue.vm");
         }
         else if (GenConstants.TPL_TREE.equals(tplCategory))
         {
             templates.add("vm/vue/index-tree.vue.vm");
-            templates.add("vm/vue/v3/index-tree3.vue.vm");
         }
-//        else if (GenConstants.TPL_SUB.equals(tplCategory))
-//        {
-//            templates.add("vm/vue/index.vue.vm");
-//            templates.add("vm/java/sub-domain.java.vm");
-//        }
+        else if (GenConstants.TPL_SUB.equals(tplCategory))
+        {
+            templates.add("vm/vue/index.vue.vm");
+            templates.add("vm/java/sub-domain.java.vm");
+        }
         return templates;
     }
 
@@ -220,15 +217,6 @@ public class VelocityUtils
         {
             fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
         }
-
-        else if (template.contains("index3.vue.vm"))
-        {
-            fileName = StringUtils.format("{}/views/{}/{}/v3/index.vue", vuePath, moduleName, businessName);
-        }
-        else if (template.contains("index-tree3.vue.vm"))
-        {
-            fileName = StringUtils.format("{}/views/{}/{}/v3/index.vue", vuePath, moduleName, businessName);
-        }
         return fileName;
     }
 
@@ -255,15 +243,19 @@ public class VelocityUtils
         List<GenTableColumn> columns = genTable.getColumns();
         GenTable subGenTable = genTable.getSubTable();
         HashSet<String> importList = new HashSet<String>();
-        if (StringUtils.isNotNull(subGenTable)) {
+        if (StringUtils.isNotNull(subGenTable))
+        {
             importList.add("java.util.List");
         }
-        for (GenTableColumn column : columns) {
-            // 不是superColumn,同时是date类型的处理方式
-            if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) {
+        for (GenTableColumn column : columns)
+        {
+            if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType()))
+            {
                 importList.add("java.util.Date");
                 importList.add("com.fasterxml.jackson.annotation.JsonFormat");
-            } else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType())) {
+            }
+            else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType()))
+            {
                 importList.add("java.math.BigDecimal");
             }
         }
@@ -281,11 +273,11 @@ public class VelocityUtils
         List<GenTableColumn> columns = genTable.getColumns();
         Set<String> dicts = new HashSet<String>();
         addDicts(dicts, columns);
-        // 子表的字典表,这块是不是要去掉,子表的就在子表代码生成时处理。
-//        if (StringUtils.isNotNull(genTable.getSubTable())) {
-//            List<GenTableColumn> subColumns = genTable.getSubTable().getColumns();
-//            addDicts(dicts, subColumns);
-//        }
+        if (StringUtils.isNotNull(genTable.getSubTable()))
+        {
+            List<GenTableColumn> subColumns = genTable.getSubTable().getColumns();
+            addDicts(dicts, subColumns);
+        }
         return StringUtils.join(dicts, ", ");
     }
 
@@ -299,27 +291,15 @@ public class VelocityUtils
     {
         for (GenTableColumn column : columns)
         {
-            if (!column.isSuperColumn()
-                    && StringUtils.isNotEmpty(column.getDictType())
-                    && StringUtils.equalsAny(
-                            column.getHtmlType(),new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX })) {
+            if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
+                    column.getHtmlType(),
+                    new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX }))
+            {
                 dicts.add("'" + column.getDictType() + "'");
             }
         }
     }
 
-    public static String getRelObjs(GenTable genTable)
-    {
-        List<GenTableColumn> columns = genTable.getColumns();
-        Set<String> relOjbs = new HashSet<String>();
-        for (GenTableColumn column : columns) {
-            if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getBizObj())){
-                relOjbs.add("'" + column.getBizObj() + "'");
-            }
-        }
-        return StringUtils.join(relOjbs, ", ");
-    }
-
     /**
      * 获取权限前缀
      *

+ 0 - 73
ips-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java

@@ -1,73 +0,0 @@
-package com.ruoyi.generator.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.stereotype.Component;
-
-/**
- * 读取代码生成相关配置
- * 
- * @author ruoyi
- */
-@Component
-@ConfigurationProperties(prefix = "gen")
-@PropertySource(value = { "classpath:generator.yml" })
-public class GenConfig
-{
-    /** 作者 */
-    public static String author;
-
-    /** 生成包路径 */
-    public static String packageName;
-
-    /** 自动去除表前缀,默认是false */
-    public static boolean autoRemovePre;
-
-    /** 表前缀(类名不会包含表前缀) */
-    public static String tablePrefix;
-
-    public static String getAuthor()
-    {
-        return author;
-    }
-
-    @Value("${author}")
-    public void setAuthor(String author)
-    {
-        GenConfig.author = author;
-    }
-
-    public static String getPackageName()
-    {
-        return packageName;
-    }
-
-    @Value("${packageName}")
-    public void setPackageName(String packageName)
-    {
-        GenConfig.packageName = packageName;
-    }
-
-    public static boolean getAutoRemovePre()
-    {
-        return autoRemovePre;
-    }
-
-    @Value("${autoRemovePre}")
-    public void setAutoRemovePre(boolean autoRemovePre)
-    {
-        GenConfig.autoRemovePre = autoRemovePre;
-    }
-
-    public static String getTablePrefix()
-    {
-        return tablePrefix;
-    }
-
-    @Value("${tablePrefix}")
-    public void setTablePrefix(String tablePrefix)
-    {
-        GenConfig.tablePrefix = tablePrefix;
-    }
-}

+ 0 - 104
ips-generator/src/main/java/com/ruoyi/generator/controller/GenChildTablesController.java

@@ -1,104 +0,0 @@
-package com.ruoyi.generator.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.generator.domain.GenChildTables;
-import com.ruoyi.generator.service.IGenChildTablesService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 子业务对象Controller
- * 
- * @author wudi
- * @date 2023-10-30
- */
-@RestController
-@RequestMapping("/generator/childTables")
-public class GenChildTablesController extends BaseController
-{
-    @Autowired
-    private IGenChildTablesService genChildTablesService;
-
-    /**
-     * 查询子业务对象列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(GenChildTables genChildTables)
-    {
-        startPage();
-        List<GenChildTables> list = genChildTablesService.selectGenChildTablesList(genChildTables);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出子业务对象列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:export')")
-    @Log(title = "子业务对象", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, GenChildTables genChildTables)
-    {
-        List<GenChildTables> list = genChildTablesService.selectGenChildTablesList(genChildTables);
-        ExcelUtil<GenChildTables> util = new ExcelUtil<GenChildTables>(GenChildTables.class);
-        util.exportExcel(response, list, "子业务对象数据");
-    }
-
-    /**
-     * 获取子业务对象详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:query')")
-    @GetMapping(value = "/{tableId}")
-    public AjaxResult getInfo(@PathVariable("tableId") String tableId)
-    {
-        return success(genChildTablesService.selectGenChildTablesByTableId(tableId));
-    }
-
-    /**
-     * 新增子业务对象
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:add')")
-    @Log(title = "子业务对象", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody GenChildTables genChildTables)
-    {
-        return toAjax(genChildTablesService.insertGenChildTables(genChildTables));
-    }
-
-    /**
-     * 修改子业务对象
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:edit')")
-    @Log(title = "子业务对象", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody GenChildTables genChildTables)
-    {
-        return toAjax(genChildTablesService.updateGenChildTables(genChildTables));
-    }
-
-    /**
-     * 删除子业务对象
-     */
-    @PreAuthorize("@ss.hasPermi('generator:childTables:remove')")
-    @Log(title = "子业务对象", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{tableIds}")
-    public AjaxResult remove(@PathVariable String[] tableIds)
-    {
-        return toAjax(genChildTablesService.deleteGenChildTablesByTableIds(tableIds));
-    }
-}

+ 0 - 260
ips-generator/src/main/java/com/ruoyi/generator/controller/GenController.java

@@ -1,260 +0,0 @@
-package com.ruoyi.generator.controller;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.servlet.http.HttpServletResponse;
-
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.generator.domain.GenChildTables;
-import com.ruoyi.generator.domain.RelBizObjConfig;
-import com.ruoyi.generator.service.IGenChildTablesService;
-import org.apache.commons.io.IOUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.common.core.text.Convert;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.generator.domain.GenTable;
-import com.ruoyi.generator.domain.GenTableColumn;
-import com.ruoyi.generator.service.IGenTableColumnService;
-import com.ruoyi.generator.service.IGenTableService;
-
-/**
- * 代码生成 操作处理
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/tool/gen")
-public class GenController extends BaseController
-{
-    @Autowired
-    private IGenTableService genTableService;
-
-    @Autowired
-    private IGenTableColumnService genTableColumnService;
-
-    @Autowired
-    private IGenChildTablesService genChildTablesService;
-
-    /**
-     * 查询代码生成列表
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:list')")
-    @GetMapping("/list")
-    public TableDataInfo genList(GenTable genTable)
-    {
-        startPage();
-        List<GenTable> list = genTableService.selectGenTableList(genTable);
-        return getDataTable(list);
-    }
-
-    /**
-     * 获取bizObj的字段信息
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:query')")
-    @GetMapping(value = "/getBizObjList/{tableId}")
-    public AjaxResult getBizObjList(@PathVariable Long tableId)
-    {
-        List<String> childTableIds = new ArrayList<String>();
-        List<String> relTableIds = new ArrayList<String>();
-        //获取业务对象信息和关联业务对象信息
-        GenTable table = genTableService.selectGenTableById(tableId);
-        List<GenTableColumn> tableColList = genTableColumnService.selectGenTableColumnListByTableId(tableId);
-        Map<String,List<GenTableColumn>> relColMap = new HashMap<String,List<GenTableColumn>>();
-        tableColList.stream().forEach(item->{
-            if(StringUtils.isNotEmpty(item.getBizObj())){
-                RelBizObjConfig j = JSON.parseObject(item.getBizObj(),RelBizObjConfig.class);
-                List<GenTableColumn> childColList = genTableService.getGenTableColumns(j.getBizObj().toString());
-                relColMap.put(j.getBizObj().toString(),childColList);
-            }
-        });
-        //获取业务对象子对象信息
-        GenChildTables genChildTables = new GenChildTables();
-        genChildTables.setTableId(tableId.toString());
-        List<GenChildTables> GenChildTablesList = genChildTablesService.selectGenChildTablesList(genChildTables);
-        Map<String,List<GenTableColumn>> childColMap = new HashMap<String,List<GenTableColumn>>();
-        GenChildTablesList.stream().forEach(item->{
-            List<GenTableColumn> childColList = genTableService.getGenTableColumns(item.getTableId());
-            childColMap.put(item.getChildTableId(),childColList);
-        });
-
-        Map<String, Object> map = new HashMap<String, Object>();
-        map.put("tableColList", tableColList);
-        map.put("childColMap", childColMap);
-        map.put("relColMap", relColMap);
-        return success(map);
-    }
-
-    @PreAuthorize("@ss.hasPermi('tool:gen:query')")
-    @GetMapping(value = "/{tableId}")
-    public AjaxResult getInfo(@PathVariable Long tableId)
-    {
-        GenTable table = genTableService.selectGenTableById(tableId);
-        List<GenTable> tables = genTableService.selectGenTableAll();
-        List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
-        Map<String, Object> map = new HashMap<String, Object>();
-        map.put("info", table);
-        map.put("cols", list);
-        map.put("tables", tables);
-        return success(map);
-    }
-
-    /**
-     * 查询数据库列表
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:list')")
-    @GetMapping("/db/list")
-    public TableDataInfo dataList(GenTable genTable)
-    {
-        startPage();
-        List<GenTable> list = genTableService.selectDbTableList(genTable);
-        return getDataTable(list);
-    }
-
-    /**
-     * 查询数据表字段列表
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:list')")
-    @GetMapping(value = "/column/{tableId}")
-    public TableDataInfo columnList(Long tableId)
-    {
-        TableDataInfo dataInfo = new TableDataInfo();
-        List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
-        dataInfo.setRows(list);
-        dataInfo.setTotal(list.size());
-        return dataInfo;
-    }
-
-    /**
-     * 导入表结构(保存)
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:import')")
-    @Log(title = "代码生成", businessType = BusinessType.IMPORT)
-    @PostMapping("/importTable")
-    public AjaxResult importTableSave(String tables)
-    {
-        String[] tableNames = Convert.toStrArray(tables);
-        // 查询表信息
-        List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames);
-        genTableService.importGenTable(tableList);
-        return success();
-    }
-
-    /**
-     * 修改保存代码生成业务
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:edit')")
-    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult editSave(@Validated @RequestBody GenTable genTable)
-    {
-        genTableService.validateEdit(genTable);
-        genTableService.updateGenTable(genTable);
-        return success();
-    }
-
-    /**
-     * 删除代码生成
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:remove')")
-    @Log(title = "代码生成", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{tableIds}")
-    public AjaxResult remove(@PathVariable Long[] tableIds)
-    {
-        genTableService.deleteGenTableByIds(tableIds);
-        return success();
-    }
-
-    /**
-     * 预览代码
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:preview')")
-    @GetMapping("/preview/{tableId}")
-    public AjaxResult preview(@PathVariable("tableId") Long tableId) throws IOException
-    {
-        Map<String, String> dataMap = genTableService.previewCode(tableId);
-        return success(dataMap);
-    }
-
-    /**
-     * 生成代码(下载方式)
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:code')")
-    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
-    @GetMapping("/download/{tableName}")
-    public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException
-    {
-        byte[] data = genTableService.downloadCode(tableName);
-        genCode(response, data);
-    }
-
-    /**
-     * 生成代码(自定义路径)
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:code')")
-    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
-    @GetMapping("/genCode/{tableName}")
-    public AjaxResult genCode(@PathVariable("tableName") String tableName)
-    {
-        genTableService.generatorCode(tableName);
-        return success();
-    }
-
-    /**
-     * 同步数据库
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:edit')")
-    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
-    @GetMapping("/synchDb/{tableName}")
-    public AjaxResult synchDb(@PathVariable("tableName") String tableName)
-    {
-        genTableService.synchDb(tableName);
-        return success();
-    }
-
-    /**
-     * 批量生成代码
-     */
-    @PreAuthorize("@ss.hasPermi('tool:gen:code')")
-    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
-    @GetMapping("/batchGenCode")
-    public void batchGenCode(HttpServletResponse response, String tables) throws IOException
-    {
-        String[] tableNames = Convert.toStrArray(tables);
-        byte[] data = genTableService.downloadCode(tableNames);
-        genCode(response, data);
-    }
-
-    /**
-     * 生成zip文件
-     */
-    private void genCode(HttpServletResponse response, byte[] data) throws IOException
-    {
-        response.reset();
-        response.addHeader("Access-Control-Allow-Origin", "*");
-        response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
-        response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
-        response.addHeader("Content-Length", "" + data.length);
-        response.setContentType("application/octet-stream; charset=UTF-8");
-        IOUtils.write(data, response.getOutputStream());
-    }
-}

+ 0 - 104
ips-generator/src/main/java/com/ruoyi/generator/controller/GenPageController.java

@@ -1,104 +0,0 @@
-package com.ruoyi.generator.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.generator.domain.GenPage;
-import com.ruoyi.generator.service.IGenPageService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 页面信息Controller
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-@RestController
-@RequestMapping("/generator/page")
-public class GenPageController extends BaseController
-{
-    @Autowired
-    private IGenPageService genPageService;
-
-    /**
-     * 查询页面信息列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(GenPage genPage)
-    {
-        startPage();
-        List<GenPage> list = genPageService.selectGenPageList(genPage);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出页面信息列表
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:export')")
-    @Log(title = "页面信息", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, GenPage genPage)
-    {
-        List<GenPage> list = genPageService.selectGenPageList(genPage);
-        ExcelUtil<GenPage> util = new ExcelUtil<GenPage>(GenPage.class);
-        util.exportExcel(response, list, "页面信息数据");
-    }
-
-    /**
-     * 获取页面信息详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:query')")
-    @GetMapping(value = "/{pageId}")
-    public AjaxResult getInfo(@PathVariable("pageId") String pageId)
-    {
-        return success(genPageService.selectGenPageByPageId(pageId));
-    }
-
-    /**
-     * 新增页面信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:add')")
-    @Log(title = "页面信息", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody GenPage genPage)
-    {
-        return toAjax(genPageService.insertGenPage(genPage));
-    }
-
-    /**
-     * 修改页面信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:edit')")
-    @Log(title = "页面信息", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody GenPage genPage)
-    {
-        return toAjax(genPageService.updateGenPage(genPage));
-    }
-
-    /**
-     * 删除页面信息
-     */
-    @PreAuthorize("@ss.hasPermi('generator:page:remove')")
-    @Log(title = "页面信息", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{pageIds}")
-    public AjaxResult remove(@PathVariable String[] pageIds)
-    {
-        return toAjax(genPageService.deleteGenPageByPageIds(pageIds));
-    }
-}

+ 0 - 51
ips-generator/src/main/java/com/ruoyi/generator/domain/GenChildTables.java

@@ -1,51 +0,0 @@
-package com.ruoyi.generator.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 子业务对象对象 gen_child_tables
- * 
- * @author wudi
- * @date 2023-10-30
- */
-
-@Data
-public class GenChildTables extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 子表关联关系id */
-    @TableId(value = "table_ref_id" , type = IdType.INPUT)
-    private String tableRefId;
-
-    /** 业务对象id */
-    private String tableId;
-
-    private String tableName;
-
-    /** 子业务对象id */
-    private String childTableId;
-
-    private String childTableName;
-
-    /** 关联字段 */
-    @Excel(name = "关联字段")
-    private String relField;
-
-    private String relFieldName;
-
-    /** 父子业务对象关系 */
-    @Excel(name = "父子业务对象关系")
-    private String name;
-
-    /** 父子业务对象关系 */
-    @Excel(name = "父子业务对象关系")
-    private String descText;
-
-
-}

+ 0 - 111
ips-generator/src/main/java/com/ruoyi/generator/domain/GenPage.java

@@ -1,111 +0,0 @@
-package com.ruoyi.generator.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 页面信息对象 gen_page
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-public class GenPage extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** $column.columnComment */
-    private String pageId;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private Long tableId;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String name;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String descText;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String config;
-
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private Long version;
-
-    public void setPageId(String pageId) 
-    {
-        this.pageId = pageId;
-    }
-
-    public String getPageId() 
-    {
-        return pageId;
-    }
-    public void setTableId(Long tableId) 
-    {
-        this.tableId = tableId;
-    }
-
-    public Long getTableId() 
-    {
-        return tableId;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setDescText(String descText) 
-    {
-        this.descText = descText;
-    }
-
-    public String getDescText() 
-    {
-        return descText;
-    }
-    public void setConfig(String config) 
-    {
-        this.config = config;
-    }
-
-    public String getConfig() 
-    {
-        return config;
-    }
-    public void setVersion(Long version) 
-    {
-        this.version = version;
-    }
-
-    public Long getVersion() 
-    {
-        return version;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("pageId", getPageId())
-            .append("tableId", getTableId())
-            .append("name", getName())
-            .append("descText", getDescText())
-            .append("config", getConfig())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("version", getVersion())
-            .toString();
-    }
-}

+ 0 - 382
ips-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java

@@ -1,382 +0,0 @@
-package com.ruoyi.generator.domain;
-
-import java.util.List;
-import javax.validation.Valid;
-import javax.validation.constraints.NotBlank;
-import org.apache.commons.lang3.ArrayUtils;
-import com.ruoyi.common.constant.GenConstants;
-import com.ruoyi.common.core.domain.BaseEntity;
-import com.ruoyi.common.utils.StringUtils;
-
-/**
- * 业务表 gen_table
- * 
- * @author ruoyi
- */
-public class GenTable extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 编号 */
-    private Long tableId;
-
-    /** 表名称 */
-    @NotBlank(message = "表名称不能为空")
-    private String tableName;
-
-    /** 表描述 */
-    @NotBlank(message = "表描述不能为空")
-    private String tableComment;
-
-    /** 关联父表的表名 */
-    private String subTableName;
-
-    /** 本表关联父表的外键名 */
-    private String subTableFkName;
-
-    /** 实体类名称(首字母大写) */
-    @NotBlank(message = "实体类名称不能为空")
-    private String className;
-
-    /** 使用的模板(crud单表操作 tree树表操作 sub主子表操作) */
-    private String tplCategory;
-
-    /** 生成包路径 */
-    @NotBlank(message = "生成包路径不能为空")
-    private String packageName;
-
-    /** 生成模块名 */
-    @NotBlank(message = "生成模块名不能为空")
-    private String moduleName;
-
-    /** 生成业务名 */
-    @NotBlank(message = "生成业务名不能为空")
-    private String businessName;
-
-    /** 生成功能名 */
-    @NotBlank(message = "生成功能名不能为空")
-    private String functionName;
-
-    /** 生成作者 */
-    @NotBlank(message = "作者不能为空")
-    private String functionAuthor;
-
-    /** 生成代码方式(0zip压缩包 1自定义路径) */
-    private String genType;
-
-    /** 生成路径(不填默认项目路径) */
-    private String genPath;
-
-    /** 主键信息 */
-    private GenTableColumn pkColumn;
-
-    /** 子表信息 */
-    private GenTable subTable;
-
-    /** 表列信息 */
-    @Valid
-    private List<GenTableColumn> columns;
-
-    /** 其它生成选项 */
-    private String options;
-
-    /** 树编码字段 */
-    private String treeCode;
-
-    /** 树父编码字段 */
-    private String treeParentCode;
-
-    /** 树名称字段 */
-    private String treeName;
-
-    /** 上级菜单ID字段 */
-    private String parentMenuId;
-
-    /** 上级菜单名称字段 */
-    private String parentMenuName;
-
-    private List<GenChildTables> GenChildTablesList;
-
-    public Long getTableId()
-    {
-        return tableId;
-    }
-
-    public void setTableId(Long tableId)
-    {
-        this.tableId = tableId;
-    }
-
-    public String getTableName()
-    {
-        return tableName;
-    }
-
-    public void setTableName(String tableName)
-    {
-        this.tableName = tableName;
-    }
-
-    public String getTableComment()
-    {
-        return tableComment;
-    }
-
-    public void setTableComment(String tableComment)
-    {
-        this.tableComment = tableComment;
-    }
-
-    public String getSubTableName()
-    {
-        return subTableName;
-    }
-
-    public void setSubTableName(String subTableName)
-    {
-        this.subTableName = subTableName;
-    }
-
-    public String getSubTableFkName()
-    {
-        return subTableFkName;
-    }
-
-    public void setSubTableFkName(String subTableFkName)
-    {
-        this.subTableFkName = subTableFkName;
-    }
-
-    public String getClassName()
-    {
-        return className;
-    }
-
-    public void setClassName(String className)
-    {
-        this.className = className;
-    }
-
-    public String getTplCategory()
-    {
-        return tplCategory;
-    }
-
-    public void setTplCategory(String tplCategory)
-    {
-        this.tplCategory = tplCategory;
-    }
-
-    public String getPackageName()
-    {
-        return packageName;
-    }
-
-    public void setPackageName(String packageName)
-    {
-        this.packageName = packageName;
-    }
-
-    public String getModuleName()
-    {
-        return moduleName;
-    }
-
-    public void setModuleName(String moduleName)
-    {
-        this.moduleName = moduleName;
-    }
-
-    public String getBusinessName()
-    {
-        return businessName;
-    }
-
-    public void setBusinessName(String businessName)
-    {
-        this.businessName = businessName;
-    }
-
-    public String getFunctionName()
-    {
-        return functionName;
-    }
-
-    public void setFunctionName(String functionName)
-    {
-        this.functionName = functionName;
-    }
-
-    public String getFunctionAuthor()
-    {
-        return functionAuthor;
-    }
-
-    public void setFunctionAuthor(String functionAuthor)
-    {
-        this.functionAuthor = functionAuthor;
-    }
-
-    public String getGenType()
-    {
-        return genType;
-    }
-
-    public void setGenType(String genType)
-    {
-        this.genType = genType;
-    }
-
-    public String getGenPath()
-    {
-        return genPath;
-    }
-
-    public void setGenPath(String genPath)
-    {
-        this.genPath = genPath;
-    }
-
-    public GenTableColumn getPkColumn()
-    {
-        return pkColumn;
-    }
-
-    public void setPkColumn(GenTableColumn pkColumn)
-    {
-        this.pkColumn = pkColumn;
-    }
-
-    public GenTable getSubTable()
-    {
-        return subTable;
-    }
-
-    public void setSubTable(GenTable subTable)
-    {
-        this.subTable = subTable;
-    }
-
-    public List<GenTableColumn> getColumns()
-    {
-        return columns;
-    }
-
-    public void setColumns(List<GenTableColumn> columns)
-    {
-        this.columns = columns;
-    }
-
-    public String getOptions()
-    {
-        return options;
-    }
-
-    public void setOptions(String options)
-    {
-        this.options = options;
-    }
-
-    public String getTreeCode()
-    {
-        return treeCode;
-    }
-
-    public void setTreeCode(String treeCode)
-    {
-        this.treeCode = treeCode;
-    }
-
-    public String getTreeParentCode()
-    {
-        return treeParentCode;
-    }
-
-    public void setTreeParentCode(String treeParentCode)
-    {
-        this.treeParentCode = treeParentCode;
-    }
-
-    public String getTreeName()
-    {
-        return treeName;
-    }
-
-    public void setTreeName(String treeName)
-    {
-        this.treeName = treeName;
-    }
-
-    public String getParentMenuId()
-    {
-        return parentMenuId;
-    }
-
-    public void setParentMenuId(String parentMenuId)
-    {
-        this.parentMenuId = parentMenuId;
-    }
-
-    public String getParentMenuName()
-    {
-        return parentMenuName;
-    }
-
-    public void setParentMenuName(String parentMenuName)
-    {
-        this.parentMenuName = parentMenuName;
-    }
-
-    public boolean isSub()
-    {
-        return isSub(this.tplCategory);
-    }
-
-    public static boolean isSub(String tplCategory)
-    {
-        return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory);
-    }
-
-    public boolean isTree()
-    {
-        return isTree(this.tplCategory);
-    }
-
-    public static boolean isTree(String tplCategory)
-    {
-        return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory);
-    }
-
-    public boolean isCrud()
-    {
-        return isCrud(this.tplCategory);
-    }
-
-    public static boolean isCrud(String tplCategory)
-    {
-        return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory);
-    }
-
-    public boolean isSuperColumn(String javaField)
-    {
-        return isSuperColumn(this.tplCategory, javaField);
-    }
-
-    public static boolean isSuperColumn(String tplCategory, String javaField)
-    {
-        if (isTree(tplCategory))
-        {
-            return StringUtils.equalsAnyIgnoreCase(javaField,
-                    ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY));
-        }
-        return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
-    }
-
-    public List<GenChildTables> getGenChildTablesList() {
-        return GenChildTablesList;
-    }
-
-    public void setGenChildTablesList(List<GenChildTables> genChildTablesList) {
-        GenChildTablesList = genChildTablesList;
-    }
-}

+ 0 - 396
ips-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java

@@ -1,396 +0,0 @@
-package com.ruoyi.generator.domain;
-
-import javax.validation.constraints.NotBlank;
-import com.ruoyi.common.core.domain.BaseEntity;
-import com.ruoyi.common.utils.StringUtils;
-
-/**
- * 代码生成业务字段表 gen_table_column
- * 
- * @author ruoyi
- */
-public class GenTableColumn extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 编号 */
-    private Long columnId;
-
-    /** 归属表编号 */
-    private Long tableId;
-
-    /** 列名称 */
-    private String columnName;
-
-    /** 列描述 */
-    private String columnComment;
-
-    /** 列类型 */
-    private String columnType;
-
-    /** JAVA类型 */
-    private String javaType;
-
-    /** JAVA字段名 */
-    @NotBlank(message = "Java属性不能为空")
-    private String javaField;
-
-    /** 是否主键(1是) */
-    private String isPk;
-
-    /** 是否自增(1是) */
-    private String isIncrement;
-
-    /** 是否必填(1是) */
-    private String isRequired;
-
-    /** 是否为插入字段(1是) */
-    private String isInsert;
-
-    /** 是否编辑字段(1是) */
-    private String isEdit;
-
-    /** 是否列表字段(1是) */
-    private String isList;
-
-    /** 是否查询字段(1是) */
-    private String isQuery;
-
-    /** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */
-    private String queryType;
-
-    /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、image图片上传控件、upload文件上传控件、editor富文本控件) */
-    private String htmlType;
-
-    /** 字典类型 */
-    private String dictType;
-
-    /** 排序 */
-    private Integer sort;
-
-    /**配置的关联业务对象 */
-    private String bizObj;
-
-    /**关联业务对象中字段配置 */
-    private String fieldConfig;
-
-    public void setColumnId(Long columnId)
-    {
-        this.columnId = columnId;
-    }
-
-    public Long getColumnId()
-    {
-        return columnId;
-    }
-
-    public void setTableId(Long tableId)
-    {
-        this.tableId = tableId;
-    }
-
-    public Long getTableId()
-    {
-        return tableId;
-    }
-
-    public void setColumnName(String columnName)
-    {
-        this.columnName = columnName;
-    }
-
-    public String getColumnName()
-    {
-        return columnName;
-    }
-
-    public void setColumnComment(String columnComment)
-    {
-        this.columnComment = columnComment;
-    }
-
-    public String getColumnComment()
-    {
-        return columnComment;
-    }
-
-    public void setColumnType(String columnType)
-    {
-        this.columnType = columnType;
-    }
-
-    public String getColumnType()
-    {
-        return columnType;
-    }
-
-    public void setJavaType(String javaType)
-    {
-        this.javaType = javaType;
-    }
-
-    public String getJavaType()
-    {
-        return javaType;
-    }
-
-    public void setJavaField(String javaField)
-    {
-        this.javaField = javaField;
-    }
-
-    public String getJavaField()
-    {
-        return javaField;
-    }
-
-    public String getCapJavaField()
-    {
-        return StringUtils.capitalize(javaField);
-    }
-
-    public void setIsPk(String isPk)
-    {
-        this.isPk = isPk;
-    }
-
-    public String getIsPk()
-    {
-        return isPk;
-    }
-
-    public boolean isPk()
-    {
-        return isPk(this.isPk);
-    }
-
-    public boolean isPk(String isPk)
-    {
-        return isPk != null && StringUtils.equals("1", isPk);
-    }
-
-    public String getIsIncrement()
-    {
-        return isIncrement;
-    }
-
-    public void setIsIncrement(String isIncrement)
-    {
-        this.isIncrement = isIncrement;
-    }
-
-    public boolean isIncrement()
-    {
-        return isIncrement(this.isIncrement);
-    }
-
-    public boolean isIncrement(String isIncrement)
-    {
-        return isIncrement != null && StringUtils.equals("1", isIncrement);
-    }
-
-    public void setIsRequired(String isRequired)
-    {
-        this.isRequired = isRequired;
-    }
-
-    public String getIsRequired()
-    {
-        return isRequired;
-    }
-
-    public boolean isRequired()
-    {
-        return isRequired(this.isRequired);
-    }
-
-    public boolean isRequired(String isRequired)
-    {
-        return isRequired != null && StringUtils.equals("1", isRequired);
-    }
-
-    public void setIsInsert(String isInsert)
-    {
-        this.isInsert = isInsert;
-    }
-
-    public String getIsInsert()
-    {
-        return isInsert;
-    }
-
-    public boolean isInsert()
-    {
-        return isInsert(this.isInsert);
-    }
-
-    public boolean isInsert(String isInsert)
-    {
-        return isInsert != null && StringUtils.equals("1", isInsert);
-    }
-
-    public void setIsEdit(String isEdit)
-    {
-        this.isEdit = isEdit;
-    }
-
-    public String getIsEdit()
-    {
-        return isEdit;
-    }
-
-    public boolean isEdit()
-    {
-        return isInsert(this.isEdit);
-    }
-
-    public boolean isEdit(String isEdit)
-    {
-        return isEdit != null && StringUtils.equals("1", isEdit);
-    }
-
-    public void setIsList(String isList)
-    {
-        this.isList = isList;
-    }
-
-    public String getIsList()
-    {
-        return isList;
-    }
-
-    public boolean isList()
-    {
-        return isList(this.isList);
-    }
-
-    public boolean isList(String isList)
-    {
-        return isList != null && StringUtils.equals("1", isList);
-    }
-
-    public void setIsQuery(String isQuery)
-    {
-        this.isQuery = isQuery;
-    }
-
-    public String getIsQuery()
-    {
-        return isQuery;
-    }
-
-    public boolean isQuery()
-    {
-        return isQuery(this.isQuery);
-    }
-
-    public boolean isQuery(String isQuery)
-    {
-        return isQuery != null && StringUtils.equals("1", isQuery);
-    }
-
-    public void setQueryType(String queryType)
-    {
-        this.queryType = queryType;
-    }
-
-    public String getQueryType()
-    {
-        return queryType;
-    }
-
-    public String getHtmlType()
-    {
-        return htmlType;
-    }
-
-    public void setHtmlType(String htmlType)
-    {
-        this.htmlType = htmlType;
-    }
-
-    public void setDictType(String dictType)
-    {
-        this.dictType = dictType;
-    }
-
-    public String getDictType()
-    {
-        return dictType;
-    }
-
-    public void setSort(Integer sort)
-    {
-        this.sort = sort;
-    }
-
-    public Integer getSort()
-    {
-        return sort;
-    }
-
-    public String getBizObj() {
-        return bizObj;
-    }
-
-    public void setBizObj(String bizObj) {
-        this.bizObj = bizObj;
-    }
-
-    public String getFieldConfig() {
-        return fieldConfig;
-    }
-
-    public void setFieldConfig(String fieldConfig) {
-        this.fieldConfig = fieldConfig;
-    }
-
-    // super column 是在BaseEntity中的定义的column
-    public boolean isSuperColumn()
-    {
-        return isSuperColumn(this.javaField);
-    }
-
-    public static boolean isSuperColumn(String javaField)
-    {
-        return StringUtils.equalsAnyIgnoreCase(javaField,
-                // BaseEntity
-                "createBy", "createTime", "updateBy", "updateTime", "remark",
-                // TreeEntity
-                "parentName", "parentId", "orderNum", "ancestors");
-    }
-
-    public boolean isUsableColumn()
-    {
-        return isUsableColumn(javaField);
-    }
-
-    public static boolean isUsableColumn(String javaField)
-    {
-        // isSuperColumn()中的名单用于避免生成多余Domain属性,若某些属性在生成页面时需要用到不能忽略,则放在此处白名单
-        return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark");
-    }
-
-    public String readConverterExp()
-    {
-        String remarks = StringUtils.substringBetween(this.columnComment, "(", ")");
-        StringBuffer sb = new StringBuffer();
-        if (StringUtils.isNotEmpty(remarks))
-        {
-            for (String value : remarks.split(" "))
-            {
-                if (StringUtils.isNotEmpty(value))
-                {
-                    Object startStr = value.subSequence(0, 1);
-                    String endStr = value.substring(1);
-                    sb.append("").append(startStr).append("=").append(endStr).append(",");
-                }
-            }
-            return sb.deleteCharAt(sb.length() - 1).toString();
-        }
-        else
-        {
-            return this.columnComment;
-        }
-    }
-}

+ 0 - 43
ips-generator/src/main/java/com/ruoyi/generator/domain/RelBizObjConfig.java

@@ -1,43 +0,0 @@
-package com.ruoyi.generator.domain;
-
-import com.ruoyi.common.core.domain.BaseEntity;
-
-public class RelBizObjConfig extends BaseEntity {
-
-    private String name;
-    private String textDesc;
-    private Integer bizObj;
-    private String labelField;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getTextDesc() {
-        return textDesc;
-    }
-
-    public void setTextDesc(String textDesc) {
-        this.textDesc = textDesc;
-    }
-
-    public Integer getBizObj() {
-        return bizObj;
-    }
-
-    public void setBizObj(Integer bizObj) {
-        this.bizObj = bizObj;
-    }
-
-    public String getLabelField() {
-        return labelField;
-    }
-
-    public void setLabelField(String labelField) {
-        this.labelField = labelField;
-    }
-}

+ 0 - 63
ips-generator/src/main/java/com/ruoyi/generator/mapper/GenChildTablesMapper.java

@@ -1,63 +0,0 @@
-package com.ruoyi.generator.mapper;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.generator.domain.GenChildTables;
-
-/**
- * 子业务对象Mapper接口
- * 
- * @author wudi
- * @date 2023-10-30
- */
-public interface GenChildTablesMapper extends BaseMapper<GenChildTables>
-{
-    /**
-     * 查询子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 子业务对象
-     */
-    public GenChildTables selectGenChildTablesByTableId(String tableId);
-
-    /**
-     * 查询子业务对象列表
-     * 
-     * @param genChildTables 子业务对象
-     * @return 子业务对象集合
-     */
-    public List<GenChildTables> selectGenChildTablesList(GenChildTables genChildTables);
-
-    /**
-     * 新增子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int insertGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 修改子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int updateGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 删除子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableId(String tableId);
-
-    /**
-     * 批量删除子业务对象
-     * 
-     * @param tableIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableIds(String[] tableIds);
-}

+ 0 - 61
ips-generator/src/main/java/com/ruoyi/generator/mapper/GenPageMapper.java

@@ -1,61 +0,0 @@
-package com.ruoyi.generator.mapper;
-
-import java.util.List;
-import com.ruoyi.generator.domain.GenPage;
-
-/**
- * 页面信息Mapper接口
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-public interface GenPageMapper 
-{
-    /**
-     * 查询页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 页面信息
-     */
-    public GenPage selectGenPageByPageId(String pageId);
-
-    /**
-     * 查询页面信息列表
-     * 
-     * @param genPage 页面信息
-     * @return 页面信息集合
-     */
-    public List<GenPage> selectGenPageList(GenPage genPage);
-
-    /**
-     * 新增页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int insertGenPage(GenPage genPage);
-
-    /**
-     * 修改页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int updateGenPage(GenPage genPage);
-
-    /**
-     * 删除页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 结果
-     */
-    public int deleteGenPageByPageId(String pageId);
-
-    /**
-     * 批量删除页面信息
-     * 
-     * @param pageIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteGenPageByPageIds(String[] pageIds);
-}

+ 0 - 63
ips-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java

@@ -1,63 +0,0 @@
-package com.ruoyi.generator.mapper;
-
-import java.util.List;
-import com.ruoyi.generator.domain.GenTableColumn;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 业务字段 数据层
- * 
- * @author ruoyi
- */
-public interface GenTableColumnMapper
-{
-    /**
-     * 根据表名称查询列信息
-     * 
-     * @param tableName 表名称
-     * @return 列信息
-     */
-    public List<GenTableColumn> selectDbTableColumnsByName(String tableName);
-
-    /**
-     * 查询业务字段列表
-     * 
-     * @param tableId 业务字段编号
-     * @return 业务字段集合
-     */
-    public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
-
-    /**
-     * 新增业务字段
-     * 
-     * @param genTableColumn 业务字段信息
-     * @return 结果
-     */
-    public int insertGenTableColumn(GenTableColumn genTableColumn);
-
-    /**
-     * 修改业务字段
-     * 
-     * @param genTableColumn 业务字段信息
-     * @return 结果
-     */
-    public int updateGenTableColumn(GenTableColumn genTableColumn);
-
-    /**
-     * 删除业务字段
-     * 
-     * @param genTableColumns 列数据
-     * @return 结果
-     */
-    public int deleteGenTableColumns(List<GenTableColumn> genTableColumns);
-
-    /**
-     * 批量删除业务字段
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteGenTableColumnByIds(Long[] ids);
-
-    List<GenTableColumn> getGenTableColumns(@Param("tableIds")List<String> tableIds);
-}

+ 0 - 83
ips-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java

@@ -1,83 +0,0 @@
-package com.ruoyi.generator.mapper;
-
-import java.util.List;
-import com.ruoyi.generator.domain.GenTable;
-
-/**
- * 业务 数据层
- * 
- * @author ruoyi
- */
-public interface GenTableMapper
-{
-    /**
-     * 查询业务列表
-     * 
-     * @param genTable 业务信息
-     * @return 业务集合
-     */
-    public List<GenTable> selectGenTableList(GenTable genTable);
-
-    /**
-     * 查询据库列表
-     * 
-     * @param genTable 业务信息
-     * @return 数据库表集合
-     */
-    public List<GenTable> selectDbTableList(GenTable genTable);
-
-    /**
-     * 查询据库列表
-     * 
-     * @param tableNames 表名称组
-     * @return 数据库表集合
-     */
-    public List<GenTable> selectDbTableListByNames(String[] tableNames);
-
-    /**
-     * 查询所有表信息
-     * 
-     * @return 表信息集合
-     */
-    public List<GenTable> selectGenTableAll();
-
-    /**
-     * 查询表ID业务信息
-     * 
-     * @param id 业务ID
-     * @return 业务信息
-     */
-    public GenTable selectGenTableById(Long id);
-
-    /**
-     * 查询表名称业务信息
-     * 
-     * @param tableName 表名称
-     * @return 业务信息
-     */
-    public GenTable selectGenTableByName(String tableName);
-
-    /**
-     * 新增业务
-     * 
-     * @param genTable 业务信息
-     * @return 结果
-     */
-    public int insertGenTable(GenTable genTable);
-
-    /**
-     * 修改业务
-     * 
-     * @param genTable 业务信息
-     * @return 结果
-     */
-    public int updateGenTable(GenTable genTable);
-
-    /**
-     * 批量删除业务
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteGenTableByIds(Long[] ids);
-}

+ 0 - 96
ips-generator/src/main/java/com/ruoyi/generator/service/GenPageServiceImpl.java

@@ -1,96 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.generator.mapper.GenPageMapper;
-import com.ruoyi.generator.domain.GenPage;
-import com.ruoyi.generator.service.IGenPageService;
-
-/**
- * 页面信息Service业务层处理
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-@Service
-public class GenPageServiceImpl implements IGenPageService 
-{
-    @Autowired
-    private GenPageMapper genPageMapper;
-
-    /**
-     * 查询页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 页面信息
-     */
-    @Override
-    public GenPage selectGenPageByPageId(String pageId)
-    {
-        return genPageMapper.selectGenPageByPageId(pageId);
-    }
-
-    /**
-     * 查询页面信息列表
-     * 
-     * @param genPage 页面信息
-     * @return 页面信息
-     */
-    @Override
-    public List<GenPage> selectGenPageList(GenPage genPage)
-    {
-        return genPageMapper.selectGenPageList(genPage);
-    }
-
-    /**
-     * 新增页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    @Override
-    public int insertGenPage(GenPage genPage)
-    {
-        genPage.setCreateTime(DateUtils.getNowDate());
-        return genPageMapper.insertGenPage(genPage);
-    }
-
-    /**
-     * 修改页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    @Override
-    public int updateGenPage(GenPage genPage)
-    {
-        genPage.setUpdateTime(DateUtils.getNowDate());
-        return genPageMapper.updateGenPage(genPage);
-    }
-
-    /**
-     * 批量删除页面信息
-     * 
-     * @param pageIds 需要删除的页面信息主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenPageByPageIds(String[] pageIds)
-    {
-        return genPageMapper.deleteGenPageByPageIds(pageIds);
-    }
-
-    /**
-     * 删除页面信息信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenPageByPageId(String pageId)
-    {
-        return genPageMapper.deleteGenPageByPageId(pageId);
-    }
-}

+ 0 - 68
ips-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java

@@ -1,68 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.common.core.text.Convert;
-import com.ruoyi.generator.domain.GenTableColumn;
-import com.ruoyi.generator.mapper.GenTableColumnMapper;
-
-/**
- * 业务字段 服务层实现
- * 
- * @author ruoyi
- */
-@Service
-public class GenTableColumnServiceImpl implements IGenTableColumnService 
-{
-	@Autowired
-	private GenTableColumnMapper genTableColumnMapper;
-
-	/**
-     * 查询业务字段列表
-     * 
-     * @param tableId 业务字段编号
-     * @return 业务字段集合
-     */
-	@Override
-	public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId)
-	{
-	    return genTableColumnMapper.selectGenTableColumnListByTableId(tableId);
-	}
-	
-    /**
-     * 新增业务字段
-     * 
-     * @param genTableColumn 业务字段信息
-     * @return 结果
-     */
-	@Override
-	public int insertGenTableColumn(GenTableColumn genTableColumn)
-	{
-	    return genTableColumnMapper.insertGenTableColumn(genTableColumn);
-	}
-	
-	/**
-     * 修改业务字段
-     * 
-     * @param genTableColumn 业务字段信息
-     * @return 结果
-     */
-	@Override
-	public int updateGenTableColumn(GenTableColumn genTableColumn)
-	{
-	    return genTableColumnMapper.updateGenTableColumn(genTableColumn);
-	}
-
-	/**
-     * 删除业务字段对象
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-	@Override
-	public int deleteGenTableColumnByIds(String ids)
-	{
-		return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids));
-	}
-}

+ 0 - 531
ips-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java

@@ -1,531 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import com.ruoyi.generator.domain.GenChildTables;
-import com.ruoyi.generator.mapper.GenChildTablesMapper;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.constant.GenConstants;
-import com.ruoyi.common.core.text.CharsetKit;
-import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.SecurityUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.generator.domain.GenTable;
-import com.ruoyi.generator.domain.GenTableColumn;
-import com.ruoyi.generator.mapper.GenTableColumnMapper;
-import com.ruoyi.generator.mapper.GenTableMapper;
-import com.ruoyi.generator.util.GenUtils;
-import com.ruoyi.generator.util.VelocityInitializer;
-import com.ruoyi.generator.util.VelocityUtils;
-
-/**
- * 业务 服务层实现
- * 
- * @author ruoyi
- */
-@Service
-public class GenTableServiceImpl implements IGenTableService
-{
-    private static final Logger log = LoggerFactory.getLogger(GenTableServiceImpl.class);
-
-    @Autowired
-    private GenTableMapper genTableMapper;
-
-    @Autowired
-    private GenChildTablesMapper genChildTablesMapper;
-
-    @Autowired
-    private GenTableColumnMapper genTableColumnMapper;
-
-    /**
-     * 查询业务信息
-     * 
-     * @param id 业务ID
-     * @return 业务信息
-     */
-    @Override
-    public GenTable selectGenTableById(Long id)
-    {
-        GenTable genTable = genTableMapper.selectGenTableById(id);
-        setTableFromOptions(genTable);
-        return genTable;
-    }
-
-    /**
-     * 查询业务列表
-     * 
-     * @param genTable 业务信息
-     * @return 业务集合
-     */
-    @Override
-    public List<GenTable> selectGenTableList(GenTable genTable)
-    {
-        return genTableMapper.selectGenTableList(genTable);
-    }
-
-    /**
-     * 查询据库列表
-     * 
-     * @param genTable 业务信息
-     * @return 数据库表集合
-     */
-    @Override
-    public List<GenTable> selectDbTableList(GenTable genTable)
-    {
-        return genTableMapper.selectDbTableList(genTable);
-    }
-
-    /**
-     * 查询据库列表
-     * 
-     * @param tableNames 表名称组
-     * @return 数据库表集合
-     */
-    @Override
-    public List<GenTable> selectDbTableListByNames(String[] tableNames)
-    {
-        return genTableMapper.selectDbTableListByNames(tableNames);
-    }
-
-    /**
-     * 查询所有表信息
-     * 
-     * @return 表信息集合
-     */
-    @Override
-    public List<GenTable> selectGenTableAll()
-    {
-        return genTableMapper.selectGenTableAll();
-    }
-
-    /**
-     * 修改业务
-     * 
-     * @param genTable 业务信息
-     * @return 结果
-     */
-    @Override
-    @Transactional
-    public void updateGenTable(GenTable genTable)
-    {
-        String options = JSON.toJSONString(genTable.getParams());
-        genTable.setOptions(options);
-        int row = genTableMapper.updateGenTable(genTable);
-        if (row > 0)
-        {
-            for (GenTableColumn cenTableColumn : genTable.getColumns())
-            {
-                genTableColumnMapper.updateGenTableColumn(cenTableColumn);
-            }
-        }
-    }
-
-    /**
-     * 删除业务对象
-     * 
-     * @param tableIds 需要删除的数据ID
-     * @return 结果
-     */
-    @Override
-    @Transactional
-    public void deleteGenTableByIds(Long[] tableIds)
-    {
-        genTableMapper.deleteGenTableByIds(tableIds);
-        genTableColumnMapper.deleteGenTableColumnByIds(tableIds);
-    }
-
-    /**
-     * 导入表结构
-     * 
-     * @param tableList 导入表列表
-     */
-    @Override
-    @Transactional
-    public void importGenTable(List<GenTable> tableList)
-    {
-        String operName = SecurityUtils.getUsername();
-        try
-        {
-            for (GenTable table : tableList)
-            {
-                String tableName = table.getTableName();
-                GenUtils.initTable(table, operName);
-                int row = genTableMapper.insertGenTable(table);
-                if (row > 0)
-                {
-                    // 保存列信息
-                    List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
-                    for (GenTableColumn column : genTableColumns)
-                    {
-                        GenUtils.initColumnField(column, table);
-                        genTableColumnMapper.insertGenTableColumn(column);
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            throw new ServiceException("导入失败:" + e.getMessage());
-        }
-    }
-
-    /**
-     * 预览代码
-     * 
-     * @param tableId 表编号
-     * @return 预览数据列表
-     */
-    @Override
-    public Map<String, String> previewCode(Long tableId)
-    {
-        Map<String, String> dataMap = new LinkedHashMap<>();
-        // 查询表信息
-        GenTable table = genTableMapper.selectGenTableById(tableId);
-        // 设置主子表信息
-        setSubTable(table);
-        // 设置主键列信息
-        setPkColumn(table);
-        VelocityInitializer.initVelocity();
-
-        VelocityContext context = VelocityUtils.prepareContext(table);
-
-        // 获取模板列表
-        List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory());
-        for (String template : templates)
-        {
-            // 渲染模板
-            StringWriter sw = new StringWriter();
-            Template tpl = Velocity.getTemplate(template, Constants.UTF8);
-            tpl.merge(context, sw);
-            dataMap.put(template, sw.toString());
-        }
-        return dataMap;
-    }
-
-    /**
-     * 生成代码(下载方式)
-     * 
-     * @param tableName 表名称
-     * @return 数据
-     */
-    @Override
-    public byte[] downloadCode(String tableName)
-    {
-        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-        ZipOutputStream zip = new ZipOutputStream(outputStream);
-        generatorCode(tableName, zip);
-        IOUtils.closeQuietly(zip);
-        return outputStream.toByteArray();
-    }
-
-    /**
-     * 生成代码(自定义路径)
-     * 
-     * @param tableName 表名称
-     */
-    @Override
-    public void generatorCode(String tableName)
-    {
-        // 查询表信息
-        GenTable table = genTableMapper.selectGenTableByName(tableName);
-        // 设置主子表信息
-        setSubTable(table);
-        // 设置主键列信息
-        setPkColumn(table);
-
-        VelocityInitializer.initVelocity();
-
-        VelocityContext context = VelocityUtils.prepareContext(table);
-
-        // 获取模板列表
-        List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory());
-        for (String template : templates)
-        {
-            if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm", "index3.vue.vm", "index-tree3.vue.vm"))
-            {
-                // 渲染模板
-                StringWriter sw = new StringWriter();
-                Template tpl = Velocity.getTemplate(template, Constants.UTF8);
-                tpl.merge(context, sw);
-                try
-                {
-                    String path = getGenPath(table, template);
-                    FileUtils.writeStringToFile(new File(path), sw.toString(), CharsetKit.UTF_8);
-                }
-                catch (IOException e)
-                {
-                    throw new ServiceException("渲染模板失败,表名:" + table.getTableName());
-                }
-            }
-        }
-    }
-
-    /**
-     * 同步数据库
-     * 
-     * @param tableName 表名称
-     */
-    @Override
-    @Transactional
-    public void synchDb(String tableName)
-    {
-        GenTable table = genTableMapper.selectGenTableByName(tableName);
-        List<GenTableColumn> tableColumns = table.getColumns();
-        Map<String, GenTableColumn> tableColumnMap = tableColumns.stream().collect(Collectors.toMap(GenTableColumn::getColumnName, Function.identity()));
-
-        List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
-        if (StringUtils.isEmpty(dbTableColumns))
-        {
-            throw new ServiceException("同步数据失败,原表结构不存在");
-        }
-        List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
-
-        dbTableColumns.forEach(column -> {
-            GenUtils.initColumnField(column, table);
-            if (tableColumnMap.containsKey(column.getColumnName()))
-            {
-                GenTableColumn prevColumn = tableColumnMap.get(column.getColumnName());
-                column.setColumnId(prevColumn.getColumnId());
-                if (column.isList())
-                {
-                    // 如果是列表,继续保留查询方式/字典类型选项
-                    column.setDictType(prevColumn.getDictType());
-                    column.setQueryType(prevColumn.getQueryType());
-                }
-                if (StringUtils.isNotEmpty(prevColumn.getIsRequired()) && !column.isPk()
-                        && (column.isInsert() || column.isEdit())
-                        && ((column.isUsableColumn()) || (!column.isSuperColumn())))
-                {
-                    // 如果是(新增/修改&非主键/非忽略及父属性),继续保留必填/显示类型选项
-                    column.setIsRequired(prevColumn.getIsRequired());
-                    column.setHtmlType(prevColumn.getHtmlType());
-                }
-                genTableColumnMapper.updateGenTableColumn(column);
-            }
-            else
-            {
-                genTableColumnMapper.insertGenTableColumn(column);
-            }
-        });
-
-        List<GenTableColumn> delColumns = tableColumns.stream().filter(column -> !dbTableColumnNames.contains(column.getColumnName())).collect(Collectors.toList());
-        if (StringUtils.isNotEmpty(delColumns))
-        {
-            genTableColumnMapper.deleteGenTableColumns(delColumns);
-        }
-    }
-
-    /**
-     * 批量生成代码(下载方式)
-     * 
-     * @param tableNames 表数组
-     * @return 数据
-     */
-    @Override
-    public byte[] downloadCode(String[] tableNames)
-    {
-        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-        ZipOutputStream zip = new ZipOutputStream(outputStream);
-        for (String tableName : tableNames)
-        {
-            generatorCode(tableName, zip);
-        }
-        IOUtils.closeQuietly(zip);
-        return outputStream.toByteArray();
-    }
-
-    /**
-     * 查询表信息并生成代码
-     */
-    private void generatorCode(String tableName, ZipOutputStream zip)
-    {
-        // 查询表信息
-        GenTable table = genTableMapper.selectGenTableByName(tableName);
-        // 设置主子表信息
-        setSubTable(table);
-        // 设置主键列信息
-        setPkColumn(table);
-
-        VelocityInitializer.initVelocity();
-
-        VelocityContext context = VelocityUtils.prepareContext(table);
-
-        // 获取模板列表
-        List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory());
-        for (String template : templates) {
-            // 渲染模板
-            StringWriter sw = new StringWriter();
-            Template tpl = Velocity.getTemplate(template, Constants.UTF8);
-            tpl.merge(context, sw);
-            try
-            {
-                // 添加到zip
-                zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table)));
-                IOUtils.write(sw.toString(), zip, Constants.UTF8);
-                IOUtils.closeQuietly(sw);
-                zip.flush();
-                zip.closeEntry();
-            }
-            catch (IOException e)
-            {
-                log.error("渲染模板失败,表名:" + table.getTableName(), e);
-            }
-        }
-    }
-
-    /**
-     * 修改保存参数校验
-     * 
-     * @param genTable 业务信息
-     */
-    @Override
-    public void validateEdit(GenTable genTable)
-    {
-        if (GenConstants.TPL_TREE.equals(genTable.getTplCategory()))
-        {
-            String options = JSON.toJSONString(genTable.getParams());
-            JSONObject paramsObj = JSON.parseObject(options);
-            if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE)))
-            {
-                throw new ServiceException("树编码字段不能为空");
-            }
-            else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE)))
-            {
-                throw new ServiceException("树父编码字段不能为空");
-            }
-            else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME)))
-            {
-                throw new ServiceException("树名称字段不能为空");
-            }
-            else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory()))
-            {
-                if (StringUtils.isEmpty(genTable.getSubTableName()))
-                {
-                    throw new ServiceException("关联子表的表名不能为空");
-                }
-                else if (StringUtils.isEmpty(genTable.getSubTableFkName()))
-                {
-                    throw new ServiceException("子表关联的外键名不能为空");
-                }
-            }
-        }
-    }
-
-
-
-    /**
-     * 设置主键列信息
-     * 
-     * @param table 业务表信息
-     */
-    public void setPkColumn(GenTable table)
-    {
-        for (GenTableColumn column : table.getColumns()) {
-            if (column.isPk()) {
-                table.setPkColumn(column);
-                break;
-            }
-        }
-        //处理没有定义pk的情况
-        if (StringUtils.isNull(table.getPkColumn())) {
-            table.setPkColumn(table.getColumns().get(0));
-        }
-        //父子表处理
-        if (GenConstants.TPL_SUB.equals(table.getTplCategory())) {
-            for (GenTableColumn column : table.getSubTable().getColumns()) {
-                if (column.isPk()) {
-                    table.getSubTable().setPkColumn(column);
-                    break;
-                }
-            }
-            if (StringUtils.isNull(table.getSubTable().getPkColumn())) {
-                table.getSubTable().setPkColumn(table.getSubTable().getColumns().get(0));
-            }
-        }
-    }
-
-    /**
-     * 设置主子表信息
-     * 
-     * @param table 业务表信息
-     */
-    public void setSubTable(GenTable table)
-    {
-        GenChildTables genChildTables =  new GenChildTables();
-        genChildTables.setTableId(table.getTableId().toString());
-        List<GenChildTables> genchildList = genChildTablesMapper.selectGenChildTablesList(genChildTables);
-        if (null !=genchildList && genchildList.size()>0)
-        {
-            table.setGenChildTablesList(genchildList);
-        }
-    }
-
-    /**
-     * 设置代码生成其他选项值
-     * 
-     * @param genTable 设置后的生成对象
-     */
-    public void setTableFromOptions(GenTable genTable)
-    {
-        JSONObject paramsObj = JSON.parseObject(genTable.getOptions());
-        if (StringUtils.isNotNull(paramsObj))
-        {
-            String treeCode = paramsObj.getString(GenConstants.TREE_CODE);
-            String treeParentCode = paramsObj.getString(GenConstants.TREE_PARENT_CODE);
-            String treeName = paramsObj.getString(GenConstants.TREE_NAME);
-            String parentMenuId = paramsObj.getString(GenConstants.PARENT_MENU_ID);
-            String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
-
-            genTable.setTreeCode(treeCode);
-            genTable.setTreeParentCode(treeParentCode);
-            genTable.setTreeName(treeName);
-            genTable.setParentMenuId(parentMenuId);
-            genTable.setParentMenuName(parentMenuName);
-        }
-    }
-
-    /**
-     * 获取代码生成地址
-     * 
-     * @param table 业务表信息
-     * @param template 模板文件路径
-     * @return 生成地址
-     */
-    public static String getGenPath(GenTable table, String template)
-    {
-        String genPath = table.getGenPath();
-        if (StringUtils.equals(genPath, "/"))
-        {
-            return System.getProperty("user.dir") + File.separator + "src" + File.separator + VelocityUtils.getFileName(template, table);
-        }
-        return genPath + File.separator + VelocityUtils.getFileName(template, table);
-    }
-
-    @Override
-    public List<GenTableColumn> getGenTableColumns(String tableId) {
-        return genTableColumnMapper.selectGenTableColumnListByTableId(Long.valueOf(tableId));
-    }
-}

+ 0 - 63
ips-generator/src/main/java/com/ruoyi/generator/service/IGenChildTablesService.java

@@ -1,63 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.generator.domain.GenChildTables;
-
-/**
- * 子业务对象Service接口
- * 
- * @author wudi
- * @date 2023-10-30
- */
-public interface IGenChildTablesService extends IService<GenChildTables>
-{
-    /**
-     * 查询子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 子业务对象
-     */
-    public GenChildTables selectGenChildTablesByTableId(String tableId);
-
-    /**
-     * 查询子业务对象列表
-     * 
-     * @param genChildTables 子业务对象
-     * @return 子业务对象集合
-     */
-    public List<GenChildTables> selectGenChildTablesList(GenChildTables genChildTables);
-
-    /**
-     * 新增子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int insertGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 修改子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    public int updateGenChildTables(GenChildTables genChildTables);
-
-    /**
-     * 批量删除子业务对象
-     * 
-     * @param tableIds 需要删除的子业务对象主键集合
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableIds(String[] tableIds);
-
-    /**
-     * 删除子业务对象信息
-     * 
-     * @param tableId 子业务对象主键
-     * @return 结果
-     */
-    public int deleteGenChildTablesByTableId(String tableId);
-}

+ 0 - 61
ips-generator/src/main/java/com/ruoyi/generator/service/IGenPageService.java

@@ -1,61 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.util.List;
-import com.ruoyi.generator.domain.GenPage;
-
-/**
- * 页面信息Service接口
- * 
- * @author ruoyi
- * @date 2023-10-27
- */
-public interface IGenPageService 
-{
-    /**
-     * 查询页面信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 页面信息
-     */
-    public GenPage selectGenPageByPageId(String pageId);
-
-    /**
-     * 查询页面信息列表
-     * 
-     * @param genPage 页面信息
-     * @return 页面信息集合
-     */
-    public List<GenPage> selectGenPageList(GenPage genPage);
-
-    /**
-     * 新增页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int insertGenPage(GenPage genPage);
-
-    /**
-     * 修改页面信息
-     * 
-     * @param genPage 页面信息
-     * @return 结果
-     */
-    public int updateGenPage(GenPage genPage);
-
-    /**
-     * 批量删除页面信息
-     * 
-     * @param pageIds 需要删除的页面信息主键集合
-     * @return 结果
-     */
-    public int deleteGenPageByPageIds(String[] pageIds);
-
-    /**
-     * 删除页面信息信息
-     * 
-     * @param pageId 页面信息主键
-     * @return 结果
-     */
-    public int deleteGenPageByPageId(String pageId);
-}

+ 0 - 44
ips-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java

@@ -1,44 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.util.List;
-import com.ruoyi.generator.domain.GenTableColumn;
-
-/**
- * 业务字段 服务层
- * 
- * @author ruoyi
- */
-public interface IGenTableColumnService
-{
-    /**
-     * 查询业务字段列表
-     * 
-     * @param tableId 业务字段编号
-     * @return 业务字段集合
-     */
-    public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
-
-    /**
-     * 新增业务字段
-     * 
-     * @param genTableColumn 业务字段信息
-     * @return 结果
-     */
-    public int insertGenTableColumn(GenTableColumn genTableColumn);
-
-    /**
-     * 修改业务字段
-     * 
-     * @param genTableColumn 业务字段信息
-     * @return 结果
-     */
-    public int updateGenTableColumn(GenTableColumn genTableColumn);
-
-    /**
-     * 删除业务字段信息
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteGenTableColumnByIds(String ids);
-}

+ 0 - 129
ips-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java

@@ -1,129 +0,0 @@
-package com.ruoyi.generator.service;
-
-import java.util.List;
-import java.util.Map;
-import com.ruoyi.generator.domain.GenTable;
-import com.ruoyi.generator.domain.GenTableColumn;
-
-/**
- * 业务 服务层
- * 
- * @author ruoyi
- */
-public interface IGenTableService
-{
-    /**
-     * 查询业务列表
-     * 
-     * @param genTable 业务信息
-     * @return 业务集合
-     */
-    public List<GenTable> selectGenTableList(GenTable genTable);
-
-    /**
-     * 查询据库列表
-     * 
-     * @param genTable 业务信息
-     * @return 数据库表集合
-     */
-    public List<GenTable> selectDbTableList(GenTable genTable);
-
-    /**
-     * 查询据库列表
-     * 
-     * @param tableNames 表名称组
-     * @return 数据库表集合
-     */
-    public List<GenTable> selectDbTableListByNames(String[] tableNames);
-
-    /**
-     * 查询所有表信息
-     * 
-     * @return 表信息集合
-     */
-    public List<GenTable> selectGenTableAll();
-
-    /**
-     * 查询业务信息
-     * 
-     * @param id 业务ID
-     * @return 业务信息
-     */
-    public GenTable selectGenTableById(Long id);
-
-    /**
-     * 修改业务
-     * 
-     * @param genTable 业务信息
-     * @return 结果
-     */
-    public void updateGenTable(GenTable genTable);
-
-    /**
-     * 删除业务信息
-     * 
-     * @param tableIds 需要删除的表数据ID
-     * @return 结果
-     */
-    public void deleteGenTableByIds(Long[] tableIds);
-
-    /**
-     * 导入表结构
-     * 
-     * @param tableList 导入表列表
-     */
-    public void importGenTable(List<GenTable> tableList);
-
-    /**
-     * 预览代码
-     * 
-     * @param tableId 表编号
-     * @return 预览数据列表
-     */
-    public Map<String, String> previewCode(Long tableId);
-
-    /**
-     * 生成代码(下载方式)
-     * 
-     * @param tableName 表名称
-     * @return 数据
-     */
-    public byte[] downloadCode(String tableName);
-
-    /**
-     * 生成代码(自定义路径)
-     * 
-     * @param tableName 表名称
-     * @return 数据
-     */
-    public void generatorCode(String tableName);
-
-    /**
-     * 同步数据库
-     * 
-     * @param tableName 表名称
-     */
-    public void synchDb(String tableName);
-
-    /**
-     * 批量生成代码(下载方式)
-     * 
-     * @param tableNames 表数组
-     * @return 数据
-     */
-    public byte[] downloadCode(String[] tableNames);
-
-    /**
-     * 修改保存参数校验
-     * 
-     * @param genTable 业务信息
-     */
-    public void validateEdit(GenTable genTable);
-
-    /**
-     * 获取多表字段信息
-     *
-     * @param tableId 业务对象id
-     */
-    List<GenTableColumn> getGenTableColumns(String tableId);
-}

+ 0 - 99
ips-generator/src/main/java/com/ruoyi/generator/service/impl/GenChildTablesServiceImpl.java

@@ -1,99 +0,0 @@
-package com.ruoyi.generator.service.impl;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.generator.mapper.GenChildTablesMapper;
-import com.ruoyi.generator.domain.GenChildTables;
-import com.ruoyi.generator.service.IGenChildTablesService;
-
-/**
- * 子业务对象Service业务层处理
- * 
- * @author wudi
- * @date 2023-10-30
- */
-@Service
-public class GenChildTablesServiceImpl extends ServiceImpl<GenChildTablesMapper,GenChildTables>
-        implements IGenChildTablesService
-{
-    @Autowired
-    private GenChildTablesMapper genChildTablesMapper;
-
-    /**
-     * 查询子业务对象
-     * 
-     * @param tableId 子业务对象主键
-     * @return 子业务对象
-     */
-    @Override
-    public GenChildTables selectGenChildTablesByTableId(String tableId)
-    {
-        return genChildTablesMapper.selectGenChildTablesByTableId(tableId);
-    }
-
-    /**
-     * 查询子业务对象列表
-     * 
-     * @param genChildTables 子业务对象
-     * @return 子业务对象
-     */
-    @Override
-    public List<GenChildTables> selectGenChildTablesList(GenChildTables genChildTables)
-    {
-        return genChildTablesMapper.selectGenChildTablesList(genChildTables);
-    }
-
-    /**
-     * 新增子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    @Override
-    public int insertGenChildTables(GenChildTables genChildTables)
-    {
-        genChildTables.setCreateTime(DateUtils.getNowDate());
-        return genChildTablesMapper.insertGenChildTables(genChildTables);
-    }
-
-    /**
-     * 修改子业务对象
-     * 
-     * @param genChildTables 子业务对象
-     * @return 结果
-     */
-    @Override
-    public int updateGenChildTables(GenChildTables genChildTables)
-    {
-        genChildTables.setUpdateTime(DateUtils.getNowDate());
-        return genChildTablesMapper.updateGenChildTables(genChildTables);
-    }
-
-    /**
-     * 批量删除子业务对象
-     * 
-     * @param tableIds 需要删除的子业务对象主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenChildTablesByTableIds(String[] tableIds)
-    {
-        return genChildTablesMapper.deleteGenChildTablesByTableIds(tableIds);
-    }
-
-    /**
-     * 删除子业务对象信息
-     * 
-     * @param tableId 子业务对象主键
-     * @return 结果
-     */
-    @Override
-    public int deleteGenChildTablesByTableId(String tableId)
-    {
-        return genChildTablesMapper.deleteGenChildTablesByTableId(tableId);
-    }
-}

+ 0 - 262
ips-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java

@@ -1,262 +0,0 @@
-package com.ruoyi.generator.util;
-
-import java.util.Arrays;
-import org.apache.commons.lang3.RegExUtils;
-import com.ruoyi.common.constant.GenConstants;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.generator.config.GenConfig;
-import com.ruoyi.generator.domain.GenTable;
-import com.ruoyi.generator.domain.GenTableColumn;
-
-/**
- * 代码生成器 工具类
- * 
- * @author ruoyi
- */
-public class GenUtils
-{
-    /**
-     * 初始化表信息
-     */
-    public static void initTable(GenTable genTable, String operName)
-    {
-        genTable.setClassName(convertClassName(genTable.getTableName()));
-        genTable.setPackageName(GenConfig.getPackageName());
-        genTable.setModuleName(getModuleName(GenConfig.getPackageName()));
-        genTable.setBusinessName(getBusinessName(genTable.getTableName()));
-        genTable.setFunctionName(replaceText(genTable.getTableComment()));
-        genTable.setFunctionAuthor(GenConfig.getAuthor());
-        genTable.setCreateBy(operName);
-    }
-
-    /**
-     * 初始化列属性字段
-     */
-    public static void initColumnField(GenTableColumn column, GenTable table)
-    {
-        String dataType = getDbType(column.getColumnType());
-        String columnName = column.getColumnName();
-        column.setTableId(table.getTableId());
-        column.setCreateBy(table.getCreateBy());
-        // 设置java字段名
-        column.setJavaField(StringUtils.toCamelCase(columnName));
-        // 设置默认类型
-        column.setJavaType(GenConstants.TYPE_STRING);
-        column.setQueryType(GenConstants.QUERY_EQ);
-
-        if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType) || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType))
-        {
-            // 字符串长度超过500设置为文本域
-            Integer columnLength = getColumnLength(column.getColumnType());
-            String htmlType = columnLength >= 500 || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType) ? GenConstants.HTML_TEXTAREA : GenConstants.HTML_INPUT;
-            column.setHtmlType(htmlType);
-        }
-        else if (arraysContains(GenConstants.COLUMNTYPE_TIME, dataType))
-        {
-            column.setJavaType(GenConstants.TYPE_DATE);
-            column.setHtmlType(GenConstants.HTML_DATETIME);
-        }
-        else if (arraysContains(GenConstants.COLUMNTYPE_INT, dataType) && !column.isPk())
-        {
-            column.setJavaType(GenConstants.TYPE_LONG);
-            column.setHtmlType(GenConstants.HTML_SELECT);
-        }
-        else if (arraysContains(GenConstants.COLUMNTYPE_NUMBER, dataType))
-        {
-            column.setHtmlType(GenConstants.HTML_INPUT);
-
-            // 如果是浮点型 统一用BigDecimal
-            String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
-            if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
-            {
-                column.setJavaType(GenConstants.TYPE_BIGDECIMAL);
-            }
-            // 如果是整形
-            else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
-            {
-                column.setJavaType(GenConstants.TYPE_INTEGER);
-            }
-            // 长整形
-            else
-            {
-                column.setJavaType(GenConstants.TYPE_LONG);
-            }
-        }
-
-        // 插入字段(默认所有字段都需要插入)
-        column.setIsInsert(GenConstants.REQUIRE);
-
-        // 编辑字段
-        if (!arraysContains(GenConstants.COLUMNNAME_NOT_EDIT, columnName) && !column.isPk())
-        {
-            column.setIsEdit(GenConstants.REQUIRE);
-        }
-        // 列表字段
-        if (!arraysContains(GenConstants.COLUMNNAME_NOT_LIST, columnName) && !column.isPk())
-        {
-            column.setIsList(GenConstants.REQUIRE);
-        }
-        // 查询字段
-        if (!arraysContains(GenConstants.COLUMNNAME_NOT_QUERY, columnName) && !column.isPk())
-        {
-            column.setIsQuery(GenConstants.REQUIRE);
-        }
-
-        // 查询字段类型
-        if (StringUtils.endsWithIgnoreCase(columnName, "name"))
-        {
-            column.setQueryType(GenConstants.QUERY_LIKE);
-        }
-        // 状态字段设置单选框
-        if (StringUtils.endsWithIgnoreCase(columnName, "status"))
-        {
-            column.setHtmlType(GenConstants.HTML_RADIO);
-        }
-        // 类型&性别字段设置下拉框
-        else if (StringUtils.endsWithIgnoreCase(columnName, "type")
-                || StringUtils.endsWithIgnoreCase(columnName, "sex"))
-        {
-            column.setHtmlType(GenConstants.HTML_SELECT);
-        }
-        // 图片字段设置图片上传控件
-        else if (StringUtils.endsWithIgnoreCase(columnName, "image"))
-        {
-            column.setHtmlType(GenConstants.HTML_IMAGE_UPLOAD);
-        }
-        // 文件字段设置文件上传控件
-        else if (StringUtils.endsWithIgnoreCase(columnName, "file"))
-        {
-            column.setHtmlType(GenConstants.HTML_FILE_UPLOAD);
-        }
-        // 内容字段设置富文本控件
-        else if (StringUtils.endsWithIgnoreCase(columnName, "content"))
-        {
-            column.setHtmlType(GenConstants.HTML_EDITOR);
-        }
-    }
-
-    /**
-     * 校验数组是否包含指定值
-     * 
-     * @param arr 数组
-     * @param targetValue 值
-     * @return 是否包含
-     */
-    public static boolean arraysContains(String[] arr, String targetValue)
-    {
-        return Arrays.asList(arr).contains(targetValue);
-    }
-
-    /**
-     * 获取模块名
-     * 
-     * @param packageName 包名
-     * @return 模块名
-     */
-    public static String getModuleName(String packageName)
-    {
-        int lastIndex = packageName.lastIndexOf(".");
-        int nameLength = packageName.length();
-        return StringUtils.substring(packageName, lastIndex + 1, nameLength);
-    }
-
-    /**
-     * 获取业务名
-     * 
-     * @param tableName 表名
-     * @return 业务名
-     */
-    public static String getBusinessName(String tableName)
-    {
-        int lastIndex = tableName.lastIndexOf("_");
-        int nameLength = tableName.length();
-        return StringUtils.substring(tableName, lastIndex + 1, nameLength);
-    }
-
-    /**
-     * 表名转换成Java类名
-     * 
-     * @param tableName 表名称
-     * @return 类名
-     */
-    public static String convertClassName(String tableName)
-    {
-        boolean autoRemovePre = GenConfig.getAutoRemovePre();
-        String tablePrefix = GenConfig.getTablePrefix();
-        if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix))
-        {
-            String[] searchList = StringUtils.split(tablePrefix, ",");
-            tableName = replaceFirst(tableName, searchList);
-        }
-        return StringUtils.convertToCamelCase(tableName);
-    }
-
-    /**
-     * 批量替换前缀
-     * 
-     * @param replacementm 替换值
-     * @param searchList 替换列表
-     * @return
-     */
-    public static String replaceFirst(String replacementm, String[] searchList)
-    {
-        String text = replacementm;
-        for (String searchString : searchList)
-        {
-            if (replacementm.startsWith(searchString))
-            {
-                text = replacementm.replaceFirst(searchString, "");
-                break;
-            }
-        }
-        return text;
-    }
-
-    /**
-     * 关键字替换
-     * 
-     * @param text 需要被替换的名字
-     * @return 替换后的名字
-     */
-    public static String replaceText(String text)
-    {
-        return RegExUtils.replaceAll(text, "(?:表|若依)", "");
-    }
-
-    /**
-     * 获取数据库类型字段
-     * 
-     * @param columnType 列类型
-     * @return 截取后的列类型
-     */
-    public static String getDbType(String columnType)
-    {
-        if (StringUtils.indexOf(columnType, "(") > 0)
-        {
-            return StringUtils.substringBefore(columnType, "(");
-        }
-        else
-        {
-            return columnType;
-        }
-    }
-
-    /**
-     * 获取字段长度
-     * 
-     * @param columnType 列类型
-     * @return 截取后的列类型
-     */
-    public static Integer getColumnLength(String columnType)
-    {
-        if (StringUtils.indexOf(columnType, "(") > 0)
-        {
-            String length = StringUtils.substringBetween(columnType, "(", ")");
-            return Integer.valueOf(length);
-        }
-        else
-        {
-            return 0;
-        }
-    }
-}

+ 0 - 34
ips-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java

@@ -1,34 +0,0 @@
-package com.ruoyi.generator.util;
-
-import java.util.Properties;
-import org.apache.velocity.app.Velocity;
-import com.ruoyi.common.constant.Constants;
-
-/**
- * VelocityEngine工厂
- * 
- * @author ruoyi
- */
-public class VelocityInitializer
-{
-    /**
-     * 初始化vm方法
-     */
-    public static void initVelocity()
-    {
-        Properties p = new Properties();
-        try
-        {
-            // 加载classpath目录下的vm文件
-            p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
-            // 定义字符集
-            p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
-            // 初始化Velocity引擎,指定配置Properties
-            Velocity.init(p);
-        }
-        catch (Exception e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-}

+ 0 - 422
ips-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java

@@ -1,422 +0,0 @@
-package com.ruoyi.generator.util;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.apache.velocity.VelocityContext;
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.ruoyi.common.constant.GenConstants;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.generator.domain.GenTable;
-import com.ruoyi.generator.domain.GenTableColumn;
-
-/**
- * 模板处理工具类
- * 
- * @author ruoyi
- */
-public class VelocityUtils
-{
-    /** 项目空间路径 */
-    private static final String PROJECT_PATH = "main/java";
-
-    /** mybatis空间路径 */
-    private static final String MYBATIS_PATH = "main/resources/mapper";
-
-    /** 默认上级菜单,系统工具 */
-    private static final String DEFAULT_PARENT_MENU_ID = "3";
-
-    /**
-     * 设置模板变量信息
-     *
-     * @return 模板列表
-     */
-    public static VelocityContext prepareContext(GenTable genTable)
-    {
-        String moduleName = genTable.getModuleName();
-        String businessName = genTable.getBusinessName();
-        String packageName = genTable.getPackageName();
-        String tplCategory = genTable.getTplCategory();    // 操作类型, 有单表crud,树表处理,父子表处理
-        String functionName = genTable.getFunctionName();  // 业务名称
-
-        VelocityContext velocityContext = new VelocityContext();
-        velocityContext.put("tplCategory", genTable.getTplCategory());
-        velocityContext.put("tableName", genTable.getTableName());
-        velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "【请填写功能名称】");
-        velocityContext.put("ClassName", genTable.getClassName());
-        velocityContext.put("className", StringUtils.uncapitalize(genTable.getClassName()));
-        velocityContext.put("moduleName", genTable.getModuleName());
-        velocityContext.put("BusinessName", StringUtils.capitalize(genTable.getBusinessName()));
-        velocityContext.put("businessName", genTable.getBusinessName());
-        velocityContext.put("basePackage", getPackagePrefix(packageName));
-        velocityContext.put("packageName", packageName);
-        velocityContext.put("author", genTable.getFunctionAuthor());
-        velocityContext.put("datetime", DateUtils.getDate());
-        velocityContext.put("pkColumn", genTable.getPkColumn());
-        velocityContext.put("importList", getImportList(genTable));
-        velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName));
-        velocityContext.put("columns", genTable.getColumns());
-        velocityContext.put("table", genTable);
-        velocityContext.put("dicts", getDicts(genTable));
-        velocityContext.put("relObjs", getRelObjs(genTable));
-        setMenuVelocityContext(velocityContext, genTable);
-        if (GenConstants.TPL_TREE.equals(tplCategory))
-        {
-            setTreeVelocityContext(velocityContext, genTable);
-        }
-        if (GenConstants.TPL_SUB.equals(tplCategory))
-        {
-            setSubVelocityContext(velocityContext, genTable);
-        }
-        return velocityContext;
-    }
-
-    public static void setMenuVelocityContext(VelocityContext context, GenTable genTable)
-    {
-        String options = genTable.getOptions();
-        JSONObject paramsObj = JSON.parseObject(options);
-        String parentMenuId = getParentMenuId(paramsObj);
-        context.put("parentMenuId", parentMenuId);
-    }
-
-    public static void setTreeVelocityContext(VelocityContext context, GenTable genTable)
-    {
-        String options = genTable.getOptions();
-        JSONObject paramsObj = JSON.parseObject(options);
-        String treeCode = getTreecode(paramsObj);
-        String treeParentCode = getTreeParentCode(paramsObj);
-        String treeName = getTreeName(paramsObj);
-
-        context.put("treeCode", treeCode);
-        context.put("treeParentCode", treeParentCode);
-        context.put("treeName", treeName);
-        context.put("expandColumn", getExpandColumn(genTable));
-        if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE))
-        {
-            context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE));
-        }
-        if (paramsObj.containsKey(GenConstants.TREE_NAME))
-        {
-            context.put("tree_name", paramsObj.getString(GenConstants.TREE_NAME));
-        }
-    }
-
-    public static void setSubVelocityContext(VelocityContext context, GenTable genTable)
-    {
-        GenTable subTable = genTable.getSubTable();
-        String subTableName = genTable.getSubTableName();
-        String subTableFkName = genTable.getSubTableFkName();
-        String subClassName = genTable.getSubTable().getClassName();
-        String subTableFkClassName = StringUtils.convertToCamelCase(subTableFkName);
-
-        context.put("subTable", subTable);
-        context.put("subTableName", subTableName);
-        context.put("subTableFkName", subTableFkName);
-        context.put("subTableFkClassName", subTableFkClassName);
-        context.put("subTableFkclassName", StringUtils.uncapitalize(subTableFkClassName));
-        context.put("subClassName", subClassName);
-        context.put("subclassName", StringUtils.uncapitalize(subClassName));
-        context.put("subImportList", getImportList(genTable.getSubTable()));
-    }
-
-    /**
-     * 获取模板信息
-     *
-     * @return 模板列表
-     */
-    public static List<String> getTemplateList(String tplCategory)
-    {
-        List<String> templates = new ArrayList<String>();
-        templates.add("vm/java/domain.java.vm");
-        templates.add("vm/java/mapper.java.vm");
-        templates.add("vm/java/service.java.vm");
-        templates.add("vm/java/serviceImpl.java.vm");
-        templates.add("vm/java/controller.java.vm");
-        templates.add("vm/xml/mapper.xml.vm");
-        templates.add("vm/sql/sql.vm");
-        templates.add("vm/js/api.js.vm");
-        if (GenConstants.TPL_CRUD.equals(tplCategory))
-        {
-            templates.add("vm/vue/index.vue.vm");
-            templates.add("vm/vue/v3/index3.vue.vm");
-        }
-        else if (GenConstants.TPL_TREE.equals(tplCategory))
-        {
-            templates.add("vm/vue/index-tree.vue.vm");
-            templates.add("vm/vue/v3/index-tree3.vue.vm");
-        }
-//        else if (GenConstants.TPL_SUB.equals(tplCategory))
-//        {
-//            templates.add("vm/vue/index.vue.vm");
-//            templates.add("vm/java/sub-domain.java.vm");
-//        }
-        return templates;
-    }
-
-    /**
-     * 获取文件名
-     */
-    public static String getFileName(String template, GenTable genTable)
-    {
-        // 文件名称
-        String fileName = "";
-        // 包路径
-        String packageName = genTable.getPackageName();
-        // 模块名
-        String moduleName = genTable.getModuleName();
-        // 大写类名
-        String className = genTable.getClassName();
-        // 业务名称
-        String businessName = genTable.getBusinessName();
-
-        String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/");
-        String mybatisPath = MYBATIS_PATH + "/" + moduleName;
-        String vuePath = "vue";
-
-        if (template.contains("domain.java.vm"))
-        {
-            fileName = StringUtils.format("{}/domain/{}.java", javaPath, className);
-        }
-        if (template.contains("sub-domain.java.vm") && StringUtils.equals(GenConstants.TPL_SUB, genTable.getTplCategory()))
-        {
-            fileName = StringUtils.format("{}/domain/{}.java", javaPath, genTable.getSubTable().getClassName());
-        }
-        else if (template.contains("mapper.java.vm"))
-        {
-            fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className);
-        }
-        else if (template.contains("service.java.vm"))
-        {
-            fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className);
-        }
-        else if (template.contains("serviceImpl.java.vm"))
-        {
-            fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className);
-        }
-        else if (template.contains("controller.java.vm"))
-        {
-            fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className);
-        }
-        else if (template.contains("mapper.xml.vm"))
-        {
-            fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className);
-        }
-        else if (template.contains("sql.vm"))
-        {
-            fileName = businessName + "Menu.sql";
-        }
-        else if (template.contains("api.js.vm"))
-        {
-            fileName = StringUtils.format("{}/api/{}/{}.js", vuePath, moduleName, businessName);
-        }
-        else if (template.contains("index.vue.vm"))
-        {
-            fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
-        }
-        else if (template.contains("index-tree.vue.vm"))
-        {
-            fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
-        }
-
-        else if (template.contains("index3.vue.vm"))
-        {
-            fileName = StringUtils.format("{}/views/{}/{}/v3/index.vue", vuePath, moduleName, businessName);
-        }
-        else if (template.contains("index-tree3.vue.vm"))
-        {
-            fileName = StringUtils.format("{}/views/{}/{}/v3/index.vue", vuePath, moduleName, businessName);
-        }
-        return fileName;
-    }
-
-    /**
-     * 获取包前缀
-     *
-     * @param packageName 包名称
-     * @return 包前缀名称
-     */
-    public static String getPackagePrefix(String packageName)
-    {
-        int lastIndex = packageName.lastIndexOf(".");
-        return StringUtils.substring(packageName, 0, lastIndex);
-    }
-
-    /**
-     * 根据列类型获取导入包
-     * 
-     * @param genTable 业务表对象
-     * @return 返回需要导入的包列表
-     */
-    public static HashSet<String> getImportList(GenTable genTable)
-    {
-        List<GenTableColumn> columns = genTable.getColumns();
-        GenTable subGenTable = genTable.getSubTable();
-        HashSet<String> importList = new HashSet<String>();
-        if (StringUtils.isNotNull(subGenTable)) {
-            importList.add("java.util.List");
-        }
-        for (GenTableColumn column : columns) {
-            // 不是superColumn,同时是date类型的处理方式
-            if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) {
-                importList.add("java.util.Date");
-                importList.add("com.fasterxml.jackson.annotation.JsonFormat");
-            } else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType())) {
-                importList.add("java.math.BigDecimal");
-            }
-        }
-        return importList;
-    }
-
-    /**
-     * 根据列类型获取字典组
-     * 
-     * @param genTable 业务表对象
-     * @return 返回字典组
-     */
-    public static String getDicts(GenTable genTable)
-    {
-        List<GenTableColumn> columns = genTable.getColumns();
-        Set<String> dicts = new HashSet<String>();
-        addDicts(dicts, columns);
-        // 子表的字典表,这块是不是要去掉,子表的就在子表代码生成时处理。
-//        if (StringUtils.isNotNull(genTable.getSubTable())) {
-//            List<GenTableColumn> subColumns = genTable.getSubTable().getColumns();
-//            addDicts(dicts, subColumns);
-//        }
-        return StringUtils.join(dicts, ", ");
-    }
-
-    /**
-     * 添加字典列表
-     * 
-     * @param dicts 字典列表
-     * @param columns 列集合
-     */
-    public static void addDicts(Set<String> dicts, List<GenTableColumn> columns)
-    {
-        for (GenTableColumn column : columns)
-        {
-            if (!column.isSuperColumn()
-                    && StringUtils.isNotEmpty(column.getDictType())
-                    && StringUtils.equalsAny(
-                            column.getHtmlType(),new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX })) {
-                dicts.add("'" + column.getDictType() + "'");
-            }
-        }
-    }
-
-    public static String getRelObjs(GenTable genTable)
-    {
-        List<GenTableColumn> columns = genTable.getColumns();
-        Set<String> relOjbs = new HashSet<String>();
-        for (GenTableColumn column : columns) {
-            if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getBizObj())){
-                relOjbs.add("'" + column.getBizObj() + "'");
-            }
-        }
-        return StringUtils.join(relOjbs, ", ");
-    }
-
-    /**
-     * 获取权限前缀
-     *
-     * @param moduleName 模块名称
-     * @param businessName 业务名称
-     * @return 返回权限前缀
-     */
-    public static String getPermissionPrefix(String moduleName, String businessName)
-    {
-        return StringUtils.format("{}:{}", moduleName, businessName);
-    }
-
-    /**
-     * 获取上级菜单ID字段
-     *
-     * @param paramsObj 生成其他选项
-     * @return 上级菜单ID字段
-     */
-    public static String getParentMenuId(JSONObject paramsObj)
-    {
-        if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)
-                && StringUtils.isNotEmpty(paramsObj.getString(GenConstants.PARENT_MENU_ID)))
-        {
-            return paramsObj.getString(GenConstants.PARENT_MENU_ID);
-        }
-        return DEFAULT_PARENT_MENU_ID;
-    }
-
-    /**
-     * 获取树编码
-     *
-     * @param paramsObj 生成其他选项
-     * @return 树编码
-     */
-    public static String getTreecode(JSONObject paramsObj)
-    {
-        if (paramsObj.containsKey(GenConstants.TREE_CODE))
-        {
-            return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_CODE));
-        }
-        return StringUtils.EMPTY;
-    }
-
-    /**
-     * 获取树父编码
-     *
-     * @param paramsObj 生成其他选项
-     * @return 树父编码
-     */
-    public static String getTreeParentCode(JSONObject paramsObj)
-    {
-        if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE))
-        {
-            return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_PARENT_CODE));
-        }
-        return StringUtils.EMPTY;
-    }
-
-    /**
-     * 获取树名称
-     *
-     * @param paramsObj 生成其他选项
-     * @return 树名称
-     */
-    public static String getTreeName(JSONObject paramsObj)
-    {
-        if (paramsObj.containsKey(GenConstants.TREE_NAME))
-        {
-            return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_NAME));
-        }
-        return StringUtils.EMPTY;
-    }
-
-    /**
-     * 获取需要在哪一列上面显示展开按钮
-     *
-     * @param genTable 业务表对象
-     * @return 展开按钮列序号
-     */
-    public static int getExpandColumn(GenTable genTable)
-    {
-        String options = genTable.getOptions();
-        JSONObject paramsObj = JSON.parseObject(options);
-        String treeName = paramsObj.getString(GenConstants.TREE_NAME);
-        int num = 0;
-        for (GenTableColumn column : genTable.getColumns())
-        {
-            if (column.isList())
-            {
-                num++;
-                String columnName = column.getColumnName();
-                if (columnName.equals(treeName))
-                {
-                    break;
-                }
-            }
-        }
-        return num;
-    }
-}

+ 0 - 107
ips-generator/src/main/resources/mapper/generator/GenChildTablesMapper.xml

@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.generator.mapper.GenChildTablesMapper">
-    
-    <resultMap type="GenChildTables" id="GenChildTablesResult">
-        <result property="tableId"    column="table_id"    />
-        <result property="tableName"    column="table_name"    />
-        <result property="childTableId"    column="child_table_id"    />
-        <result property="childTableName"    column="child_table_name"    />
-        <result property="relField"    column="rel_field"    />
-        <result property="name"    column="name"    />
-        <result property="descText"    column="desc_text"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectGenChildTablesVo">
-        SELECT
-            t1.table_id,
-            t2.table_name,
-            t1.child_table_id,
-            t3.table_name child_table_name,
-            t1.rel_field,
-            t1.name,
-            t1.desc_text,
-            t1.create_by,
-            t1.create_time,
-            t1.update_by,
-            t1.update_time
-        FROM
-            gen_child_tables t1
-                LEFT JOIN
-            gen_table t2 ON t1.table_id = t2.table_id
-                LEFT JOIN
-            gen_table t3 ON t1.child_table_id = t3.table_id
-    </sql>
-
-    <select id="selectGenChildTablesList" parameterType="GenChildTables" resultMap="GenChildTablesResult">
-        <include refid="selectGenChildTablesVo"/>
-        <where>  
-            <if test="relField != null  and relField != ''"> and rel_field = #{relField}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="descText != null  and descText != ''"> and desc_text = #{descText}</if>
-        </where>
-    </select>
-    
-    <select id="selectGenChildTablesByTableId" parameterType="String" resultMap="GenChildTablesResult">
-        <include refid="selectGenChildTablesVo"/>
-        where table_id = #{tableId}
-    </select>
-        
-    <insert id="insertGenChildTables" parameterType="GenChildTables">
-        insert into gen_child_tables
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="tableId != null">table_id,</if>
-            <if test="childTableId != null">child_table_id,</if>
-            <if test="relField != null and relField != ''">rel_field,</if>
-            <if test="name != null">name,</if>
-            <if test="descText != null">desc_text,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="tableId != null">#{tableId},</if>
-            <if test="childTableId != null">#{childTableId},</if>
-            <if test="relField != null and relField != ''">#{relField},</if>
-            <if test="name != null">#{name},</if>
-            <if test="descText != null">#{descText},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateGenChildTables" parameterType="GenChildTables">
-        update gen_child_tables
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="childTableId != null">child_table_id = #{childTableId},</if>
-            <if test="relField != null and relField != ''">rel_field = #{relField},</if>
-            <if test="name != null">name = #{name},</if>
-            <if test="descText != null">desc_text = #{descText},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where table_id = #{tableId}
-    </update>
-
-    <delete id="deleteGenChildTablesByTableId" parameterType="String">
-        delete from gen_child_tables where table_id = #{tableId}
-    </delete>
-
-    <delete id="deleteGenChildTablesByTableIds" parameterType="String">
-        delete from gen_child_tables where table_id in 
-        <foreach item="tableId" collection="array" open="(" separator="," close=")">
-            #{tableId}
-        </foreach>
-    </delete>
-</mapper>

+ 0 - 92
ips-generator/src/main/resources/mapper/generator/GenPageMapper.xml

@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.generator.mapper.GenPageMapper">
-    
-    <resultMap type="GenPage" id="GenPageResult">
-        <result property="pageId"    column="page_id"    />
-        <result property="tableId"    column="table_id"    />
-        <result property="name"    column="name"    />
-        <result property="descText"    column="desc_text"    />
-        <result property="config"    column="config"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="version"    column="version"    />
-    </resultMap>
-
-    <sql id="selectGenPageVo">
-        select page_id, table_id, name, desc_text, config, create_by, create_time, update_by, update_time, version from gen_page
-    </sql>
-
-    <select id="selectGenPageList" parameterType="GenPage" resultMap="GenPageResult">
-        <include refid="selectGenPageVo"/>
-        <where>  
-            <if test="tableId != null "> and table_id = #{tableId}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="descText != null  and descText != ''"> and desc_text = #{descText}</if>
-            <if test="config != null  and config != ''"> and config = #{config}</if>
-            <if test="version != null "> and version = #{version}</if>
-        </where>
-    </select>
-    
-    <select id="selectGenPageByPageId" parameterType="String" resultMap="GenPageResult">
-        <include refid="selectGenPageVo"/>
-        where page_id = #{pageId}
-    </select>
-        
-    <insert id="insertGenPage" parameterType="GenPage" useGeneratedKeys="true" keyProperty="pageId">
-        insert into gen_page
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="tableId != null">table_id,</if>
-            <if test="name != null">name,</if>
-            <if test="descText != null">desc_text,</if>
-            <if test="config != null">config,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="version != null">version,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="tableId != null">#{tableId},</if>
-            <if test="name != null">#{name},</if>
-            <if test="descText != null">#{descText},</if>
-            <if test="config != null">#{config},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="version != null">#{version},</if>
-         </trim>
-    </insert>
-
-    <update id="updateGenPage" parameterType="GenPage">
-        update gen_page
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="tableId != null">table_id = #{tableId},</if>
-            <if test="name != null">name = #{name},</if>
-            <if test="descText != null">desc_text = #{descText},</if>
-            <if test="config != null">config = #{config},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="version != null">version = #{version},</if>
-        </trim>
-        where page_id = #{pageId}
-    </update>
-
-    <delete id="deleteGenPageByPageId" parameterType="String">
-        delete from gen_page where page_id = #{pageId}
-    </delete>
-
-    <delete id="deleteGenPageByPageIds" parameterType="String">
-        delete from gen_page where page_id in 
-        <foreach item="pageId" collection="array" open="(" separator="," close=")">
-            #{pageId}
-        </foreach>
-    </delete>
-</mapper>

+ 2 - 23
ips-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.generator.mapper.GenTableColumnMapper">
+<mapper namespace="com.ips.generator.mapper.GenTableColumnMapper">
 
     <resultMap type="GenTableColumn" id="GenTableColumnResult">
         <id     property="columnId"       column="column_id"      />
@@ -27,15 +27,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"     column="create_time"    />
         <result property="updateBy"       column="update_by"      />
         <result property="updateTime"     column="update_time"    />
-        <result property="bizObj"     column="biz_obj"    />
-
     </resultMap>
 
 	<sql id="selectGenTableColumnVo">
-        select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type,
-               html_type, dict_type, sort, create_by, create_time, update_by, update_time,biz_obj
-
-        from gen_table_column
+        select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
     </sql>
 
     <select id="selectGenTableColumnListByTableId" parameterType="Long" resultMap="GenTableColumnResult">
@@ -44,16 +39,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by sort
     </select>
 
-
-    <select id="getGenTableColumns" parameterType="List" resultMap="GenTableColumnResult">
-        <include refid="selectGenTableColumnVo"/>
-        where table_id in
-        <foreach item="id" collection="tableIds" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-        order by sort
-    </select>
-
     <select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult">
 		select column_name, (case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else null end) as is_required, (case when column_key = 'PRI' then '1' else '0' end) as is_pk, ordinal_position as sort, column_comment, (case when extra = 'auto_increment' then '1' else '0' end) as is_increment, column_type
 		from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName})
@@ -80,8 +65,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="dictType != null and dictType != ''">dict_type,</if>
 			<if test="sort != null">sort,</if>
 			<if test="createBy != null and createBy != ''">create_by,</if>
-            <if test="bizObj != null and bizObj != ''">biz_obj,</if>
-
 			create_time
          )values(
 			<if test="tableId != null and tableId != ''">#{tableId},</if>
@@ -102,8 +85,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="dictType != null and dictType != ''">#{dictType},</if>
 			<if test="sort != null">#{sort},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>
-            <if test="bizObj != null and bizObj != ''">#{bizObj},</if>
-
 			sysdate()
          )
     </insert>
@@ -124,8 +105,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dictType != null">dict_type = #{dictType},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="bizObj != null">biz_obj = #{bizObj},</if>
-
             update_time = sysdate()
         </set>
         where column_id = #{columnId}

+ 3 - 3
ips-generator/src/main/resources/mapper/generator/GenTableMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.generator.mapper.GenTableMapper">
+<mapper namespace="com.ips.generator.mapper.GenTableMapper">
 
 	<resultMap type="GenTable" id="GenTableResult">
 	    <id     property="tableId"        column="table_id"          />
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
 		select table_name, table_comment, create_time, update_time from information_schema.tables
 		where table_schema = (select database())
-		AND table_name NOT LIKE 'qrtz_%'
+		AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
 		AND table_name NOT IN (select table_name from gen_table)
 		<if test="tableName != null and tableName != ''">
 			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
@@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="selectDbTableListByNames" resultMap="GenTableResult">
 		select table_name, table_comment, create_time, update_time from information_schema.tables
-		where table_name NOT LIKE 'qrtz_%'  and table_schema = (select database())
+		where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
 		and table_name in
 	    <foreach collection="array" item="name" open="(" separator="," close=")">
  			#{name}

+ 1 - 1
ips-generator/src/main/resources/vm/vue/index-tree.vue.vm

@@ -453,7 +453,7 @@ export default {
       this.reset();
       this.getTreeselect();
       if (row != null) {
-        this.form.${treeParentCode} = row.${treeParentCode};
+        this.form.${treeParentCode} = row.${treeCode};
       }
       get${BusinessName}(row.${pkColumn.javaField}).then(response => {
         this.form = response.data;

+ 0 - 474
ips-generator/src/main/resources/vm/vue/v3/index-tree3.vue.vm

@@ -1,474 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-#foreach($column in $columns)
-#if($column.query)
-#set($dictType=$column.dictType)
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.htmlType == "input")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-input
-          v-model="queryParams.${column.javaField}"
-          placeholder="请输入${comment}"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option
-            v-for="dict in ${dictType}"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-date-picker clearable
-          v-model="queryParams.${column.javaField}"
-          type="date"
-          value-format="YYYY-MM-DD"
-          placeholder="选择${comment}">
-        </el-date-picker>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-      <el-form-item label="${comment}" style="width: 308px">
-        <el-date-picker
-          v-model="daterange${AttrName}"
-          value-format="YYYY-MM-DD"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
-#end
-#end
-#end
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="Plus"
-          @click="handleAdd"
-          v-hasPermi="['${moduleName}:${businessName}:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="info"
-          plain
-          icon="Sort"
-          @click="toggleExpandAll"
-        >展开/折叠</el-button>
-      </el-col>
-      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table
-      v-if="refreshTable"
-      v-loading="loading"
-      :data="${businessName}List"
-      row-key="${treeCode}"
-      :default-expand-all="isExpandAll"
-      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-    >
-#foreach($column in $columns)
-#set($javaField=$column.javaField)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.pk)
-#elseif($column.list && $column.htmlType == "datetime")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
-        <template #default="scope">
-          <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-#elseif($column.list && $column.htmlType == "imageUpload")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
-        <template #default="scope">
-          <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
-        </template>
-      </el-table-column>
-#elseif($column.list && "" != $column.dictType)
-      <el-table-column label="${comment}" align="center" prop="${javaField}">
-        <template #default="scope">
-#if($column.htmlType == "checkbox")
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
-#else
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
-#end
-        </template>
-      </el-table-column>
-#elseif($column.list && "" != $javaField)
-#if(${foreach.index} == 1)
-      <el-table-column label="${comment}" prop="${javaField}" />
-#else
-      <el-table-column label="${comment}" align="center" prop="${javaField}" />
-#end
-#end
-#end
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template #default="scope">
-          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
-          <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
-          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <!-- 添加或修改${functionName}对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
-      <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
-#foreach($column in $columns)
-#set($field=$column.javaField)
-#if($column.insert && !$column.pk)
-#if(($column.usableColumn) || (!$column.superColumn))
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#set($dictType=$column.dictType)
-#if("" != $treeParentCode && $column.javaField == $treeParentCode)
-        <el-form-item label="${comment}" prop="${treeParentCode}">
-          <el-tree-select
-            v-model="form.${treeParentCode}"
-            :data="${businessName}Options"
-            :props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
-            value-key="${treeCode}"
-            placeholder="请选择${comment}"
-            check-strictly
-          />
-        </el-form-item>
-#elseif($column.htmlType == "input")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" placeholder="请输入${comment}" />
-        </el-form-item>
-#elseif($column.htmlType == "imageUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <image-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "fileUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <file-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "editor")
-        <el-form-item label="${comment}">
-          <editor v-model="form.${field}" :min-height="192"/>
-        </el-form-item>
-#elseif($column.htmlType == "select" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.label"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :value="parseInt(dict.value)"
-#else
-              :value="dict.value"
-#end
-            ></el-option>
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "select" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.value">
-              {{dict.label}}
-            </el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox>请选择字典生成</el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :label="parseInt(dict.value)"
-#else
-              :label="dict.value"
-#end
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio label="1">请选择字典生成</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "datetime")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-date-picker clearable
-            v-model="form.${field}"
-            type="date"
-            value-format="YYYY-MM-DD"
-            placeholder="选择${comment}">
-          </el-date-picker>
-        </el-form-item>
-#elseif($column.htmlType == "textarea")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-#end
-#end
-#end
-#end
-      </el-form>
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup name="${BusinessName}">
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
-
-const { proxy } = getCurrentInstance();
-#if(${dicts} != '')
-#set($dictsNoSymbol=$dicts.replace("'", ""))
-const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
-#end
-
-const ${businessName}List = ref([]);
-const ${businessName}Options = ref([]);
-const open = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const title = ref("");
-const isExpandAll = ref(true);
-const refreshTable = ref(true);
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-const daterange${AttrName} = ref([]);
-#end
-#end
-
-const data = reactive({
-  form: {},
-  queryParams: {
-    #foreach ($column in $columns)
-#if($column.query)
-    $column.javaField: null#if($foreach.count != $columns.size()),#end
-#end
-#end
-  },
-  rules: {
-    #foreach ($column in $columns)
-#if($column.required)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-    $column.javaField: [
-      { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
-    ]#if($foreach.count != $columns.size()),#end
-#end
-#end
-  }
-});
-
-const { queryParams, form, rules } = toRefs(data);
-
-/** 查询${functionName}列表 */
-function getList() {
-  loading.value = true;
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-  queryParams.value.params = {};
-#break
-#end
-#end
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  if (null != daterange${AttrName} && '' != daterange${AttrName}) {
-    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
-    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
-  }
-#end
-#end
-  list${BusinessName}(queryParams.value).then(response => {
-    ${businessName}List.value = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
-    loading.value = false;
-  });
-}
-
-/** 查询${functionName}下拉树结构 */
-function getTreeselect() {
-  list${BusinessName}().then(response => {
-    ${businessName}Options.value = [];
-    const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
-    data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
-    ${businessName}Options.value.push(data);
-  });
-}
-	
-// 取消按钮
-function cancel() {
-  open.value = false;
-  reset();
-}
-
-// 表单重置
-function reset() {
-  form.value = {
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    $column.javaField: []#if($foreach.count != $columns.size()),#end
-#else
-    $column.javaField: null#if($foreach.count != $columns.size()),#end
-#end
-#end
-  };
-  proxy.resetForm("${businessName}Ref");
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  daterange${AttrName}.value = [];
-#end
-#end
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-/** 新增按钮操作 */
-function handleAdd(row) {
-  reset();
-  getTreeselect();
-  if (row != null && row.${treeCode}) {
-    form.value.${treeParentCode} = row.${treeCode};
-  } else {
-    form.value.${treeParentCode} = 0;
-  }
-  open.value = true;
-  title.value = "添加${functionName}";
-}
-
-/** 展开/折叠操作 */
-function toggleExpandAll() {
-  refreshTable.value = false;
-  isExpandAll.value = !isExpandAll.value;
-  nextTick(() => {
-    refreshTable.value = true;
-  });
-}
-
-/** 修改按钮操作 */
-async function handleUpdate(row) {
-  reset();
-  await getTreeselect();
-  if (row != null) {
-    form.value.${treeParentCode} = row.${treeParentCode};
-  }
-  get${BusinessName}(row.${pkColumn.javaField}).then(response => {
-    form.value = response.data;
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    form.value.$column.javaField = form.value.${column.javaField}.split(",");
-#end
-#end
-    open.value = true;
-    title.value = "修改${functionName}";
-  });
-}
-
-/** 提交按钮 */
-function submitForm() {
-  proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
-    if (valid) {
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-      form.value.$column.javaField = form.value.${column.javaField}.join(",");
-#end
-#end
-      if (form.value.${pkColumn.javaField} != null) {
-        update${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        });
-      } else {
-        add${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        });
-      }
-    }
-  });
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
-    return del${BusinessName}(row.${pkColumn.javaField});
-  }).then(() => {
-    getList();
-    proxy.#[[$modal]]#.msgSuccess("删除成功");
-  }).catch(() => {});
-}
-
-getList();
-</script>

+ 0 - 590
ips-generator/src/main/resources/vm/vue/v3/index3.vue.vm

@@ -1,590 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-#foreach($column in $columns)
-#if($column.query)
-#set($dictType=$column.dictType)
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.htmlType == "input")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-input
-          v-model="queryParams.${column.javaField}"
-          placeholder="请输入${comment}"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option
-            v-for="dict in ${dictType}"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
-      <el-form-item label="${comment}" prop="${column.javaField}">
-        <el-date-picker clearable
-          v-model="queryParams.${column.javaField}"
-          type="date"
-          value-format="YYYY-MM-DD"
-          placeholder="请选择${comment}">
-        </el-date-picker>
-      </el-form-item>
-#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-      <el-form-item label="${comment}" style="width: 308px">
-        <el-date-picker
-          v-model="daterange${AttrName}"
-          value-format="YYYY-MM-DD"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
-#end
-#end
-#end
-      <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="Plus"
-          @click="handleAdd"
-          v-hasPermi="['${moduleName}:${businessName}:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="Edit"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['${moduleName}:${businessName}:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="Delete"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['${moduleName}:${businessName}:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="Download"
-          @click="handleExport"
-          v-hasPermi="['${moduleName}:${businessName}:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-#foreach($column in $columns)
-#set($javaField=$column.javaField)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.pk)
-      <el-table-column label="${comment}" align="center" prop="${javaField}" />
-#elseif($column.list && $column.htmlType == "datetime")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
-        <template #default="scope">
-          <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-#elseif($column.list && $column.htmlType == "imageUpload")
-      <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
-        <template #default="scope">
-          <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
-        </template>
-      </el-table-column>
-#elseif($column.list && "" != $column.dictType)
-      <el-table-column label="${comment}" align="center" prop="${javaField}">
-        <template #default="scope">
-#if($column.htmlType == "checkbox")
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
-#else
-          <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
-#end
-        </template>
-      </el-table-column>
-#elseif($column.list && "" != $javaField)
-      <el-table-column label="${comment}" align="center" prop="${javaField}" />
-#end
-#end
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template #default="scope">
-          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
-          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    
-    <pagination
-      v-show="total>0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改${functionName}对话框 -->
-    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
-      <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
-#foreach($column in $columns)
-#set($field=$column.javaField)
-#if($column.insert && !$column.pk)
-#if(($column.usableColumn) || (!$column.superColumn))
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#set($dictType=$column.dictType)
-#if($column.htmlType == "input")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" placeholder="请输入${comment}" />
-        </el-form-item>
-#elseif($column.htmlType == "imageUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <image-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "fileUpload")
-        <el-form-item label="${comment}" prop="${field}">
-          <file-upload v-model="form.${field}"/>
-        </el-form-item>
-#elseif($column.htmlType == "editor")
-        <el-form-item label="${comment}">
-          <editor v-model="form.${field}" :min-height="192"/>
-        </el-form-item>
-#elseif($column.htmlType == "select" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.label"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :value="parseInt(dict.value)"
-#else
-              :value="dict.value"
-#end
-            ></el-option>
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "select" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-select v-model="form.${field}" placeholder="请选择${comment}">
-            <el-option label="请选择字典生成" value="" />
-          </el-select>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-              :label="dict.value">
-              {{dict.label}}
-            </el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "checkbox" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-checkbox-group v-model="form.${field}">
-            <el-checkbox>请选择字典生成</el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && "" != $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio
-              v-for="dict in ${dictType}"
-              :key="dict.value"
-#if($column.javaType == "Integer" || $column.javaType == "Long")
-              :label="parseInt(dict.value)"
-#else
-              :label="dict.value"
-#end
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "radio" && $dictType)
-        <el-form-item label="${comment}" prop="${field}">
-          <el-radio-group v-model="form.${field}">
-            <el-radio label="1">请选择字典生成</el-radio>
-          </el-radio-group>
-        </el-form-item>
-#elseif($column.htmlType == "datetime")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-date-picker clearable
-            v-model="form.${field}"
-            type="date"
-            value-format="YYYY-MM-DD"
-            placeholder="请选择${comment}">
-          </el-date-picker>
-        </el-form-item>
-#elseif($column.htmlType == "textarea")
-        <el-form-item label="${comment}" prop="${field}">
-          <el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-#end
-#end
-#end
-#end
-#if($table.sub)
-        <el-divider content-position="center">${subTable.functionName}信息</el-divider>
-        <el-row :gutter="10" class="mb8">
-          <el-col :span="1.5">
-            <el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">添加</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button>
-          </el-col>
-        </el-row>
-        <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
-          <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="序号" align="center" prop="index" width="50"/>
-#foreach($column in $subTable.columns)
-#set($javaField=$column.javaField)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-#if($column.pk || $javaField == ${subTableFkclassName})
-#elseif($column.list && $column.htmlType == "input")
-          <el-table-column label="$comment" prop="${javaField}" width="150">
-            <template #default="scope">
-              <el-input v-model="scope.row.$javaField" placeholder="请输入$comment" />
-            </template>
-          </el-table-column>
-#elseif($column.list && $column.htmlType == "datetime")
-          <el-table-column label="$comment" prop="${javaField}" width="240">
-            <template #default="scope">
-              <el-date-picker clearable
-                v-model="scope.row.$javaField"
-                type="date"
-                value-format="YYYY-MM-DD"
-                placeholder="请选择$comment">
-              </el-date-picker>
-            </template>
-          </el-table-column>
-#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType)
-          <el-table-column label="$comment" prop="${javaField}" width="150">
-            <template #default="scope">
-              <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
-                <el-option
-                  v-for="dict in $column.dictType"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                ></el-option>
-              </el-select>
-            </template>
-          </el-table-column>
-#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType)
-          <el-table-column label="$comment" prop="${javaField}" width="150">
-            <template #default="scope">
-              <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
-                <el-option label="请选择字典生成" value="" />
-              </el-select>
-            </template>
-          </el-table-column>
-#end
-#end
-        </el-table>
-#end
-      </el-form>
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup name="${BusinessName}">
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
-
-const { proxy } = getCurrentInstance();
-#if(${dicts} != '')
-#set($dictsNoSymbol=$dicts.replace("'", ""))
-const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
-#end
-
-const ${businessName}List = ref([]);
-#if($table.sub)
-const ${subclassName}List = ref([]);
-#end
-const open = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const ids = ref([]);
-#if($table.sub)
-const checked${subClassName} = ref([]);
-#end
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const title = ref("");
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-const daterange${AttrName} = ref([]);
-#end
-#end
-
-const data = reactive({
-  form: {},
-  queryParams: {
-    pageNum: 1,
-    pageSize: 10,
-    #foreach ($column in $columns)
-#if($column.query)
-    $column.javaField: null#if($foreach.count != $columns.size()),#end
-#end
-#end
-  },
-  rules: {
-    #foreach ($column in $columns)
-#if($column.required)
-#set($parentheseIndex=$column.columnComment.indexOf("("))
-#if($parentheseIndex != -1)
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
-#else
-#set($comment=$column.columnComment)
-#end
-    $column.javaField: [
-      { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
-    ]#if($foreach.count != $columns.size()),#end
-#end
-#end
-  }
-});
-
-const { queryParams, form, rules } = toRefs(data);
-
-/** 查询${functionName}列表 */
-function getList() {
-  loading.value = true;
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-  queryParams.value.params = {};
-#break
-#end
-#end
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  if (null != daterange${AttrName} && '' != daterange${AttrName}) {
-    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
-    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
-  }
-#end
-#end
-  list${BusinessName}(queryParams.value).then(response => {
-    ${businessName}List.value = response.rows;
-    total.value = response.total;
-    loading.value = false;
-  });
-}
-
-// 取消按钮
-function cancel() {
-  open.value = false;
-  reset();
-}
-
-// 表单重置
-function reset() {
-  form.value = {
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    $column.javaField: []#if($foreach.count != $columns.size()),#end
-#else
-    $column.javaField: null#if($foreach.count != $columns.size()),#end
-#end
-#end
-  };
-#if($table.sub)
-  ${subclassName}List.value = [];
-#end
-  proxy.resetForm("${businessName}Ref");
-}
-
-/** 搜索按钮操作 */
-function handleQuery() {
-  queryParams.value.pageNum = 1;
-  getList();
-}
-
-/** 重置按钮操作 */
-function resetQuery() {
-#foreach ($column in $columns)
-#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-  daterange${AttrName}.value = [];
-#end
-#end
-  proxy.resetForm("queryRef");
-  handleQuery();
-}
-
-// 多选框选中数据
-function handleSelectionChange(selection) {
-  ids.value = selection.map(item => item.${pkColumn.javaField});
-  single.value = selection.length != 1;
-  multiple.value = !selection.length;
-}
-
-/** 新增按钮操作 */
-function handleAdd() {
-  reset();
-  open.value = true;
-  title.value = "添加${functionName}";
-}
-
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  reset();
-  const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
-  get${BusinessName}(_${pkColumn.javaField}).then(response => {
-    form.value = response.data;
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-    form.value.$column.javaField = form.value.${column.javaField}.split(",");
-#end
-#end
-#if($table.sub)
-    ${subclassName}List.value = response.data.${subclassName}List;
-#end
-    open.value = true;
-    title.value = "修改${functionName}";
-  });
-}
-
-/** 提交按钮 */
-function submitForm() {
-  proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
-    if (valid) {
-#foreach ($column in $columns)
-#if($column.htmlType == "checkbox")
-      form.value.$column.javaField = form.value.${column.javaField}.join(",");
-#end
-#end
-#if($table.sub)
-      form.value.${subclassName}List = ${subclassName}List.value;
-#end
-      if (form.value.${pkColumn.javaField} != null) {
-        update${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        });
-      } else {
-        add${BusinessName}(form.value).then(response => {
-          proxy.#[[$modal]]#.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        });
-      }
-    }
-  });
-}
-
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
-  proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
-    return del${BusinessName}(_${pkColumn.javaField}s);
-  }).then(() => {
-    getList();
-    proxy.#[[$modal]]#.msgSuccess("删除成功");
-  }).catch(() => {});
-}
-
-#if($table.sub)
-/** ${subTable.functionName}序号 */
-function row${subClassName}Index({ row, rowIndex }) {
-  row.index = rowIndex + 1;
-}
-
-/** ${subTable.functionName}添加按钮操作 */
-function handleAdd${subClassName}() {
-  let obj = {};
-#foreach($column in $subTable.columns)
-#if($column.pk || $column.javaField == ${subTableFkclassName})
-#elseif($column.list && "" != $javaField)
-  obj.$column.javaField = "";
-#end
-#end
-  ${subclassName}List.value.push(obj);
-}
-
-/** ${subTable.functionName}删除按钮操作 */
-function handleDelete${subClassName}() {
-  if (checked${subClassName}.value.length == 0) {
-    proxy.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
-  } else {
-    const ${subclassName}s = ${subclassName}List.value;
-    const checked${subClassName}s = checked${subClassName}.value;
-    ${subclassName}List.value = ${subclassName}s.filter(function(item) {
-      return checked${subClassName}s.indexOf(item.index) == -1
-    });
-  }
-}
-
-/** 复选框选中数据 */
-function handle${subClassName}SelectionChange(selection) {
-  checked${subClassName}.value = selection.map(item => item.index)
-}
-
-#end
-/** 导出按钮操作 */
-function handleExport() {
-  proxy.download('${moduleName}/${businessName}/export', {
-    ...queryParams.value
-  }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
-}
-
-getList();
-</script>

+ 1 - 1
ips-ui/dist_electron/background.js

@@ -1219,7 +1219,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var elec
 /*! no static exports found */
 /***/ (function(module, exports, __webpack_require__) {
 
-eval("module.exports = __webpack_require__(/*! E:\\workspace\\NWPU-IPS\\ips-ui\\src\\background.js */\"./src/background.js\");\n\n\n//# sourceURL=webpack:///multi_./src/background.js?");
+eval("module.exports = __webpack_require__(/*! D:\\workspace\\java\\NWPU-IPS\\ips-ui\\src\\background.js */\"./src/background.js\");\n\n\n//# sourceURL=webpack:///multi_./src/background.js?");
 
 /***/ }),
 

+ 0 - 97
ips-ui/src/api/tool/gen.js

@@ -74,100 +74,3 @@ export function synchDb(tableName) {
     method: 'get'
   })
 }
-
-// 页面设计列表
-export function listPage(query) {
-  return request({
-    url: '/generator/page/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询pageDesign详细
-export function getPage(pageId) {
-  return request({
-    url: '/generator/page/' + pageId,
-    method: 'get'
-  })
-}
-
-// 新增pageDesign
-export function addPage(data) {
-  return request({
-    url: '/generator/page',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改pageDesign
-export function updatePage(data) {
-  return request({
-    url: '/generator/page',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除pageDesign
-export function delPage(pageId) {
-  return request({
-    url: '/generator/page/' + pageId,
-    method: 'delete'
-  })
-}
-
-
-
-// 查询子业务对象列表
-export function listChildTables(query) {
-  return request({
-    url: '/generator/childTables/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询子业务对象详细
-export function getChildTables(tableId) {
-  return request({
-    url: '/generator/childTables/' + tableId,
-    method: 'get'
-  })
-}
-
-// 新增子业务对象
-export function addChildTables(data) {
-  return request({
-    url: '/generator/childTables',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改子业务对象
-export function updateChildTables(data) {
-  return request({
-    url: '/generator/childTables',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除子业务对象
-export function delChildTables(tableId) {
-  return request({
-    url: '/generator/childTables/' + tableId,
-    method: 'delete'
-  })
-}
-
-
-// 获取bizObj的字段信息
-export function getBizObjList(tableId) {
-  return request({
-    url: '/tool/gen/getBizObjList/' + tableId,
-    method: 'get'
-  })
-}

+ 19 - 208
ips-ui/src/views/tool/gen/editTable.vue

@@ -10,7 +10,7 @@
           <el-table-column
             label="字段列名"
             prop="columnName"
-            min-width="6%"
+            min-width="10%"
             :show-overflow-tooltip="true"
           />
           <el-table-column label="字段描述" min-width="10%">
@@ -21,10 +21,10 @@
           <el-table-column
             label="物理类型"
             prop="columnType"
-            min-width="6%"
+            min-width="10%"
             :show-overflow-tooltip="true"
           />
-          <el-table-column label="Java类型" min-width="6%">
+          <el-table-column label="Java类型" min-width="11%">
             <template slot-scope="scope">
               <el-select v-model="scope.row.javaType">
                 <el-option label="Long" value="Long" />
@@ -37,33 +37,33 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column label="java属性" min-width="8%">
+          <el-table-column label="java属性" min-width="10%">
             <template slot-scope="scope">
               <el-input v-model="scope.row.javaField"></el-input>
             </template>
           </el-table-column>
 
-          <el-table-column v-if="show" label="插入" min-width="5%">
+          <el-table-column label="插入" min-width="5%">
             <template slot-scope="scope">
               <el-checkbox true-label="1" false-label="0" v-model="scope.row.isInsert"></el-checkbox>
             </template>
           </el-table-column>
-          <el-table-column v-if="show" label="编辑" min-width="5%">
+          <el-table-column label="编辑" min-width="5%">
             <template slot-scope="scope">
               <el-checkbox true-label="1" false-label="0" v-model="scope.row.isEdit"></el-checkbox>
             </template>
           </el-table-column>
-          <el-table-column v-if="show" label="列表" min-width="5%">
+          <el-table-column label="列表" min-width="5%">
             <template slot-scope="scope">
               <el-checkbox true-label="1" false-label="0" v-model="scope.row.isList"></el-checkbox>
             </template>
           </el-table-column>
-          <el-table-column v-if="show" label="查询" min-width="5%">
+          <el-table-column label="查询" min-width="5%">
             <template slot-scope="scope">
               <el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
             </template>
           </el-table-column>
-          <el-table-column v-if="show" label="查询方式" min-width="10%">
+          <el-table-column label="查询方式" min-width="10%">
             <template slot-scope="scope">
               <el-select v-model="scope.row.queryType">
                 <el-option label="=" value="EQ" />
@@ -77,14 +77,14 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column label="必填" min-width="3%">
+          <el-table-column label="必填" min-width="5%">
             <template slot-scope="scope">
               <el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
             </template>
           </el-table-column>
-          <el-table-column label="显示类型" min-width="7%">
+          <el-table-column label="显示类型" min-width="12%">
             <template slot-scope="scope">
-              <el-select v-model="scope.row.htmlType" @change="clearBizObjAndDict(scope.row)">
+              <el-select v-model="scope.row.htmlType">
                 <el-option label="文本框" value="input" />
                 <el-option label="文本域" value="textarea" />
                 <el-option label="下拉框" value="select" />
@@ -94,19 +94,12 @@
                 <el-option label="图片上传" value="imageUpload" />
                 <el-option label="文件上传" value="fileUpload" />
                 <el-option label="富文本控件" value="editor" />
-                <el-option label="对话框" value="dialogue" />
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column  label="字典类型" min-width="12%">
+          <el-table-column label="字典类型" min-width="12%">
             <template slot-scope="scope">
-              <el-select 
-              v-if="selections.indexOf(scope.row.htmlType)>=0 " 
-              v-model="scope.row.dictType" 
-              @change="clearBizObj(scope.row)"
-              clearable 
-              filterable 
-              placeholder="请选择">
+              <el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">
                 <el-option
                   v-for="dict in dictOptions"
                   :key="dict.dictType"
@@ -118,49 +111,10 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column  label="业务对象" min-width="12%">
-            <template slot-scope="scope" style="margin-top: 15px;"  >
-              <el-input 
-                v-model="scope.row.bizObj" 
-                class="input-with-select" 
-                v-if="selections.indexOf(scope.row.htmlType)>=0 "  
-                readonly
-                clearable 
-                @change="clearDict(scope.row)">
-                <el-button slot="prepend" 
-                  icon="el-icon-edit" 
-                  style="background-color:white"
-                  @click="editBizObj(scope.row)"></el-button>
-                <el-button slot="append" 
-                  icon="el-icon-remove" 
-                  style="background-color:white"
-                  @click="clearBizObj(scope.row)"></el-button>
-              </el-input>
-            </template>
-            <!-- <template slot-scope="scope">
-              <el-select 
-              v-if="selections.indexOf(scope.row.htmlType)>=0 "  
-              v-model="scope.row.bizObj" 
-              @change="clearDict(scope.row)"
-              clearable 
-              filterable 
-              placeholder="请选择" >
-                <el-option
-                  v-for="(table, index) in tables"
-                  :key="index"
-                  :label="table.tableName + ':' + table.tableComment"
-                  :value="table.tableName"
-                ></el-option>
-              </el-select>
-            </template> -->
-          </el-table-column>
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="生成信息" name="genInfo">
-        <gen-info-form ref="genInfo" :info="info" :tables="this.tables"  :menus="menus"/>
-      </el-tab-pane>
-      <el-tab-pane label="页面信息" name="pageInfo">
-        <page-info-form ref="pageInfo" :info="info" :tables="tables" :menus="menus"/>
+        <gen-info-form ref="genInfo" :info="info" :tables="tables" :menus="menus"/>
       </el-tab-pane>
     </el-tabs>
     <el-form label-width="100px">
@@ -169,56 +123,6 @@
         <el-button @click="close()">返回</el-button>
       </el-form-item>
     </el-form>
-
-
-    <!-- 添加或修改子业务对象对话框 -->
-    <el-dialog title="关联业务对象配置" :visible.sync="open" width="600px" @opened="handleDialogOpen" append-to-body>
-      <el-form ref="form" :model="form"  label-width="120px">
-        <el-form-item label="业务对象" prop="bizObj">
-          <el-select v-model="form.bizObj" 
-            placeholder="请选择业务对象" 
-            style="width:100%"  
-            filterable
-            clearable
-            @change="handleChildTable">
-            <el-option
-              v-for="item in this.tables2"
-              :key="item.tableId"
-              :label="item.tableId+' '+item.tableName+' '+item.tableComment"
-              :value="item.tableId"
-            >
-              <span style="width:30px; text-align:left;  display:block; float:left;">{{item.tableId }}</span>
-              <span style="width:150px; text-align:left;  display:block; float:left; color: #8492a6; font-size: 13px">{{ item.tableName }}</span>
-              <span style="width:150px; text-align:right;  display:block; float:left; color: #8492a6; font-size: 13px">{{ item.tableComment }}</span>
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="LABEL字段" prop="labelField">
-          <el-select v-model="form.labelField"
-            filterable 
-            style="width:100%"   
-            placeholder="请选择关联字段">
-            <el-option
-              v-for="item in this.columns2"
-              :key="item.columnName"
-              :label="item.columnName"
-              :value="item.columnName"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入名称" />
-        </el-form-item>
-        <el-form-item label="描述" prop="descText">
-          <el-input v-model="form.descText" placeholder="请输入描述" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="saveConfigEdit">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
   </el-card>
 </template>
 
@@ -228,15 +132,13 @@ import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
 import { listMenu as getMenuTreeselect } from "@/api/system/menu";
 import basicInfoForm from "./basicInfoForm";
 import genInfoForm from "./genInfoForm";
-import pageInfoForm from "./pageInfoForm";
 import Sortable from 'sortablejs'
 
 export default {
   name: "GenEdit",
   components: {
     basicInfoForm,
-    genInfoForm,
-    pageInfoForm
+    genInfoForm
   },
   data() {
     return {
@@ -248,30 +150,12 @@ export default {
       tables: [],
       // 表列信息
       columns: [],
-      columns2: [],
       // 字典信息
       dictOptions: [],
       // 菜单信息
       menus: [],
       // 表详细信息
-      info: {},
-      show:true,
-      selections:[
-                "select",
-                "radio",
-                "checkbox" ,
-                "dialogue"
-      ],
-      open:false,
-      form: {
-        bizObj:"",
-        labelField:"",
-        name:"",
-        textDesc:"",
-        row:{}
-      },
-      currentRow:{},
-      tables2:[]
+      info: {}
     };
   },
   created() {
@@ -279,7 +163,7 @@ export default {
     if (tableId) {
       // 获取表详细信息
       getGenTable(tableId).then(res => {
-        this.columns = res.data.cols;
+        this.columns = res.data.rows;
         this.info = res.data.info;
         this.tables = res.data.tables;
       });
@@ -331,80 +215,7 @@ export default {
     close() {
       const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } };
       this.$tab.closeOpenPage(obj);
-    },
-    clearDict(row) {
-      debugger
-      row.dictType=''
-    },
-    clearBizObj(row) {
-      row.bizObj=''
-    },
-    clearBizObjAndDict(row) {
-      this.clearBizObj(row)
-      this.clearDict(row)
-    },
-    editBizObj(row){
-      this.open=true
-      this.currentRow = row
-      this.form={}
-      if(row.bizObj!=null && row.bizObj!=undefined && row.bizObj!=''){
-        let jsonObj = JSON.parse(row.bizObj)
-        this.form=jsonObj
-        
-      }else{
-        
-      }
-      
-    },
-    handleDialogOpen(){
-      // let tables = this.tables
-      // this.tables2 = tables.filter(d => d.tableId !=this.info.tableId)
-      this.tables2 = this.tables
-    },
-
-    /** 获取子表主键 */
-    handleChildTable(){
-      // debugger
-      getGenTable(this.form.bizObj).then(res => {
-        // let columns = res.data.cols.filter(d => d.columnName.includes('id') )
-        // this.columns = columns;
-        this.columns2 = res.data.cols;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        tableId: null,
-        childTableId: null,
-        relField: null,
-        name: null,
-        descText: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
-      };
-      this.resetForm("form");
-    },
-
-    /** 填写关联业务对象字段配置 */
-    saveConfigEdit() {
-      this.open=false
-      let obj = this.form
-      // obj.name = this.form.name
-      // obj.descText = this.form.descText
-      // obj.labelField = this.form.labelField
-      // obj.bizObj = this.form.bizObj
-      this.currentRow.bizObj = JSON.stringify(obj)
-      if(Object.keys(obj).length>0){
-        this.currentRow.dictType=''
-      }
-    },
+    }
   },
   mounted() {
     const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];

+ 36 - 275
ips-ui/src/views/tool/gen/genInfoForm.vue

@@ -171,134 +171,51 @@
         </el-form-item>
       </el-col>
     </el-row>
-    <!-- <el-row v-show="info.tplCategory == 'sub'"> -->
-    <el-row :gutter="10" v-show="true" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['generator:childTables:add']"
-        >新增</el-button>
-      </el-col>
-      
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['generator:childTables:remove']"
-        >删除</el-button>
-      </el-col>
-     
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="childTablesList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="业务对象id" align="center" prop="tableId" />
-      <el-table-column label="业务对象id" align="center" prop="tableName" />
-      <el-table-column label="子业务对象id" align="center" prop="childTableId" />
-      <el-table-column label="子业务对象id" align="center" prop="childTableName" />
-      <el-table-column label="关联字段" align="center" prop="relField" />
-
-      <el-table-column label="父子业务对象关系" align="center" prop="name" />
-      <el-table-column label="父子业务对象关系" align="center" prop="descText" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['generator:childTables:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['generator:childTables:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-    <!-- 添加或修改子业务对象对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" @opened="handleDialogueOpen" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item  label="父表id" prop="tableId">
-          <el-select ref="select" v-model="form.tableId"  disabled placeholder="请选择父表id" style="width:100%">
-            <el-option
-              v-for="item in this.tables"
-              :key="item.tableId"
-               :label="item.tableId+' '+item.tableName+' '+item.tableComment"
-              :value="item.tableId"
-            >
-              <span style="width:30px; text-align:left;  display:block; float:left;">{{item.tableId }}</span>
-              <span style="width:150px; text-align:left;  display:block; float:left; color: #8492a6; font-size: 13px">{{ item.tableName }}</span>
-              <span style="width:150px; text-align:right;  display:block; float:left; color: #8492a6; font-size: 13px">{{ item.tableComment }}</span>
-            </el-option>
-          </el-select>
-            
-          
-        </el-form-item>
-        <el-form-item label="子表id" prop="childTableId">
-          <el-select v-model="form.childTableId" placeholder="请选择子表id" style="width:100%"  @change="handleChildTable">
+    <el-row v-show="info.tplCategory == 'sub'">
+      <h4 class="form-header">关联信息</h4>
+      <el-col :span="12">
+        <el-form-item>
+          <span slot="label">
+            关联子表的表名
+            <el-tooltip content="关联子表的表名, 如:sys_user" placement="top">
+              <i class="el-icon-question"></i>
+            </el-tooltip>
+          </span>
+          <el-select v-model="info.subTableName" placeholder="请选择" @change="subSelectChange">
             <el-option
-              v-for="item in this.tables2"
-              :key="item.tableId"
-              :label="item.tableId+' '+item.tableName+' '+item.tableComment"
-              :value="item.tableId"
-            >
-              <span style="width:30px; text-align:left;  display:block; float:left;">{{item.tableId }}</span>
-              <span style="width:150px; text-align:left;  display:block; float:left; color: #8492a6; font-size: 13px">{{ item.tableName }}</span>
-              <span style="width:150px; text-align:right;  display:block; float:left; color: #8492a6; font-size: 13px">{{ item.tableComment }}</span>
-            </el-option>
+              v-for="(table, index) in tables"
+              :key="index"
+              :label="table.tableName + ':' + table.tableComment"
+              :value="table.tableName"
+            ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="关联字段" prop="relField">
-          <el-select v-model="form.relField" placeholder="请选择关联字段">
+      </el-col>
+      <el-col :span="12">
+        <el-form-item>
+          <span slot="label">
+            子表关联的外键名
+            <el-tooltip content="子表关联的外键名, 如:user_id" placement="top">
+              <i class="el-icon-question"></i>
+            </el-tooltip>
+          </span>
+          <el-select v-model="info.subTableFkName" placeholder="请选择">
             <el-option
-              v-for="item in this.columns"
-              :key="item.columnName"
-              :label="item.columnName"
-              :value="item.columnName"
-            >
-            </el-option>
+              v-for="(column, index) in subColumns"
+              :key="index"
+              :label="column.columnName + ':' + column.columnComment"
+              :value="column.columnName"
+            ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入名称" />
-        </el-form-item>
-        <el-form-item label="描述" prop="descText">
-          <el-input v-model="form.descText" placeholder="请输入描述" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
+      </el-col>
+    </el-row>
   </el-form>
 </template>
 
 <script>
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { listChildTables, getChildTables, delChildTables, addChildTables, updateChildTables, getGenTable } from "@/api/tool/gen";
 
 export default {
   components: { Treeselect },
@@ -314,10 +231,8 @@ export default {
     menus: {
       type: Array,
       default: []
-    }
+    },
   },
-  dicts: ['sys_job_group', 'sys_job_status'],
-  
   data() {
     return {
       subColumns: [],
@@ -337,47 +252,10 @@ export default {
         functionName: [
           { required: true, message: "请输入生成功能名", trigger: "blur" }
         ],
-        relField: [
-          { required: true, message: "关联字段不能为空", trigger: "change" }
-        ],
-      },
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 子业务对象表格数据
-      childTablesList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        relField: null,
-        name: null,
-        descText: null,
-      },
-      // 表单参数
-      form: {},
-      columns:[],
-      tables2:[],
-      operation:1  //1: 新增,2:更新
+      }
     };
   },
-  created() {
-    this.getList();
-  },
-
+  created() {},
   watch: {
     'info.subTableName': function(val) {
       this.setSubTableColumns(val);
@@ -415,123 +293,6 @@ export default {
           break;
         }
       }
-    },
-    /** 查询子业务对象列表 */
-    getList() {
-      this.loading = true;
-      listChildTables(this.queryParams).then(response => {
-        this.childTablesList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        tableId: null,
-        childTableId: null,
-        relField: null,
-        name: null,
-        descText: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.tableId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      // debugger
-      this.form.tableId= this.info.tableId
-      this.open = true;
-      this.title = "添加子业务对象";
-      this.operation=1;
-    },
-
-    handleDialogueOpen(){
-      let tables = this.tables
-      this.tables2 = tables.filter(d => d.tableId !=this.info.tableId)
-    },
-    /** 获取子表主键 */
-    handleChildTable(){
-      // debugger
-      getGenTable(this.form.childTableId).then(res => {
-        let columns = res.data.cols.filter(d => d.columnName.includes('id') )
-        this.columns = columns;
-
-      });
-    },
-    
-
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      this.operation=2
-      const tableId = row.tableId || this.ids
-      getChildTables(tableId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改子业务对象";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.operation == 2) {
-            updateChildTables(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addChildTables(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const tableIds = row.tableId || this.ids;
-      this.$modal.confirm('是否确认删除子业务对象编号为"' + tableIds + '"的数据项?').then(function() {
-        return delChildTables(tableIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('generator/childTables/export', {
-        ...this.queryParams
-      }, `childTables_${new Date().getTime()}.xlsx`)
     }
   }
 };

+ 8 - 33
ips-ui/src/views/tool/gen/index.vue

@@ -89,24 +89,24 @@
       </el-table-column>
       <el-table-column
         label="表名称"
-        align="left"
+        align="center"
         prop="tableName"
         :show-overflow-tooltip="true"
-        width="200"
+        width="120"
       />
       <el-table-column
         label="表描述"
-        align="left"
+        align="center"
         prop="tableComment"
         :show-overflow-tooltip="true"
-        width="200"
+        width="120"
       />
       <el-table-column
         label="实体"
-        align="left"
+        align="center"
         prop="className"
         :show-overflow-tooltip="true"
-        width="200"
+        width="120"
       />
       <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
       <el-table-column label="更新时间" align="center" prop="updateTime" width="160" />
@@ -125,14 +125,7 @@
             icon="el-icon-edit"
             @click="handleEditTable(scope.row)"
             v-hasPermi="['tool:gen:edit']"
-          >编辑对象</el-button>
-          <!-- <el-button
-            type="text"
-            size="small"
-            icon="el-icon-edit"
-            @click="handlePageDesign(scope.row)"
-            v-hasPermi="['tool:gen:edit']"
-          >设计页面</el-button> -->
+          >编辑</el-button>
           <el-button
             type="text"
             size="small"
@@ -153,14 +146,7 @@
             icon="el-icon-download"
             @click="handleGenTable(scope.row)"
             v-hasPermi="['tool:gen:code']"
-          >生成代码xxxx</el-button>
-          <el-button
-            type="text"
-            size="small"
-            icon="el-icon-download"
-            @click="clickMe(scope.row)"
-            v-hasPermi="['tool:gen:code']"
-          >fuck</el-button>
+          >生成代码</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -271,7 +257,6 @@ export default {
     },
     /** 生成代码操作 */
     handleGenTable(row) {
-      console.log('row:',row)
       const tableNames = row.tableName || this.tableNames;
       if (tableNames == "") {
         this.$modal.msgError("请选择要生成的数据");
@@ -282,7 +267,6 @@ export default {
           this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
         });
       } else {
-        console.log('in zippp',row)
         this.$download.zip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip");
       }
     },
@@ -338,15 +322,6 @@ export default {
       const params = { pageNum: this.queryParams.pageNum };
       this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params);
     },
-    /** 打开页面设计器 */
-     handlePageDesign(row) {
-      const tableId = row.tableId || this.ids[0];
-      const tableName = row.tableName || this.tableNames[0];
-      const params = { obj: this.queryParams.pageNum };
-      this.$tab.openPage(tableName + " 页面设计", '/tool/design/index/' + tableId, params);
-    },
-
-
     /** 删除按钮操作 */
     handleDelete(row) {
       const tableIds = row.tableId || this.ids;

+ 0 - 329
ips-ui/src/views/tool/gen/pageInfoForm.vue

@@ -1,329 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="名称" prop="name">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['generator:page:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['generator:page:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['generator:page:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['generator:page:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="pageList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="页面id" align="center" prop="pageId" />
-      <el-table-column label="业务对象id" align="center" prop="tableId" />
-      <el-table-column label="名称" align="center" prop="name" />
-      <el-table-column label="描述" align="center" prop="descText" />
-      <el-table-column label="配置数据" align="center" prop="config" />
-      <el-table-column label="版本号" align="center" prop="version" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['generator:page:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['generator:page:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改pageDesign对话框 -->
-    
-    <el-dialog :title="title" :visible.sync="open"  fullscreen append-to-body @closed="diaClose" >
-      <pageDesign label-width="80px" :bizObjList="this.bizObjList" ref="child" />  
-    </el-dialog>
-    
-  </div>
-</template>
-
-<script>
-import { getGenTable, updateGenTable, getBizObjList } from "@/api/tool/gen";
-import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
-import { listMenu as getMenuTreeselect } from "@/api/system/menu";
-import { listPage, getPage, delPage, addPage, updatePage } from "@/api/tool/gen";
-import pageDesign from '../design/index';
-
-export default {
-  name: "Page",
-  components: { pageDesign },
-  
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // pageDesign表格数据
-      pageList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        tableId: null,
-        name: null,
-        descText: null,
-        config: null,
-        version: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      },
-      // 表信息
-      tables: [],
-      // 表列信息
-      columns: [],
-      // 字典信息
-      dictOptions: [],
-      // 菜单信息
-      menus: [],
-      // 表详细信息
-      info: {},
-      tableId: "",
-      bizObjList:{}
-    };
-  },
-  created() {
-    const tableId = this.$route.params && this.$route.params.tableId;
-    this.tableId = tableId
-    if (tableId) {
-      // 获取表详细信息
-      getGenTable(tableId).then(res => {
-        this.columns = res.data.cols;
-        this.info = res.data.info;
-        this.tables = res.data.tables;
-      });
-      // getOtherTable(tableId).then(res => {
-      //   this.columns = res.data.cols;
-      //   this.info = res.data.info;
-      //   this.tables = res.data.tables;
-      // });
-      /** 查询字典下拉列表 */
-      getDictOptionselect().then(response => {
-        this.dictOptions = response.data;
-      });
-      /** 查询菜单下拉列表 */
-      getMenuTreeselect().then(response => {
-        this.menus = this.handleTree(response.data, "menuId");
-      });
-    }
-    this.queryParams.tableId=tableId
-    this.getList();
-  },
-  methods: {
-    /** 查询pageDesign列表 */
-    getList() {
-      this.loading = true;
-      listPage(this.queryParams).then(response => {
-        this.pageList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      // this.form = {
-      //   pageId: null,
-      //   tableId: null,
-      //   name: null,
-      //   descText: null,
-      //   config: null,
-      //   createBy: null,
-      //   createTime: null,
-      //   updateBy: null,
-      //   updateTime: null,
-      //   version: null
-      // };
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.pageId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      // this.reset();
-      this.bizObjList = {}
-      this.open = true;
-      this.title = "页面设计";
-      this.getBizObjList().then(res=>{
-        this.reset();
-        this.open = true;
-        this.title = "页面设计";
-      })
-      
-      // handlePageDesign()
-    },
-
-    getBizObjList(){
-      return new Promise((resolve,reject)=>{
-          getBizObjList(this.tableId).then(res => {
-          // debugger
-          this.bizObjList = res.data
-          console.log(res)
-          resolve(res.data)
-        })
-      }) 
-    },
-
-    diaClose(){
-      debugger
-      this.$refs.child.drawingList = []
-      this.open=false
-    },
-
-    handlePageDesign(row) {
-      const tableId = row.tableId || this.ids[0];
-      const tableName = row.tableName || this.tableNames[0];
-      const params = { obj: this.queryParams.pageNum };
-      this.$tab.openPage(tableName + " 页面设计", '/tool/design/index/' + tableId, params);
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const pageId = row.pageId || this.ids
-      getPage(pageId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改pageDesign";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.pageId != null) {
-            updatePage(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addPage(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const pageIds = row.pageId || this.ids;
-      this.$modal.confirm('是否确认删除pageDesign编号为"' + pageIds + '"的数据项?').then(function() {
-        return delPage(pageIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('generator/page/export', {
-        ...this.queryParams
-      }, `page_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
-</script>
-

+ 118 - 1
sql/biz.sql

@@ -139,4 +139,121 @@ CREATE TABLE `gen_page` (
   `update_by`         varchar(64)     default ''                 comment '更新者',
   `update_time`       datetime                                   comment '更新时间',
   PRIMARY KEY (`page_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='页面配置表';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='页面配置表';
+
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('算法配置', '0', '1', 'config', 'biz/config/index', 1, 0, 'C', '0', '0', 'biz:config:list', '#', 'admin', sysdate(), '', null, '算法配置菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('算法配置查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'biz:config:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('算法配置新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'biz:config:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('算法配置修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'biz:config:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('算法配置删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'biz:config:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('算法配置导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'biz:config:export',       '#', 'admin', sysdate(), '', null, '');
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('特征提取', '3', '1', 'features', 'biz/features/index', 1, 0, 'C', '0', '0', 'biz:features:list', '#', 'admin', sysdate(), '', null, '特征提取菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('特征提取查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'biz:features:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('特征提取新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'biz:features:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('特征提取修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'biz:features:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('特征提取删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'biz:features:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('特征提取导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'biz:features:export',       '#', 'admin', sysdate(), '', null, '');
+
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('数据预处理', '3', '1', 'preprocessed', 'biz/preprocessed/index', 1, 0, 'C', '0', '0', 'biz:preprocessed:list', '#', 'admin', sysdate(), '', null, '数据预处理菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('数据预处理查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'biz:preprocessed:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('数据预处理新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'biz:preprocessed:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('数据预处理修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'biz:preprocessed:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('数据预处理删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'biz:preprocessed:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('数据预处理导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'biz:preprocessed:export',       '#', 'admin', sysdate(), '', null, '');
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('分类测试', '0', '1', 'test', 'biz/test/index', 1, 0, 'C', '0', '0', 'biz:test:list', '#', 'admin', sysdate(), '', null, '分类测试菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('分类测试查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'biz:test:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('分类测试新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'biz:test:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('分类测试修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'biz:test:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('分类测试删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'biz:test:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('分类测试导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'biz:test:export',       '#', 'admin', sysdate(), '', null, '');
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('模型训练', '3', '1', 'training', 'biz/training/index', 1, 0, 'C', '0', '0', 'biz:training:list', '#', 'admin', sysdate(), '', null, '模型训练菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('模型训练查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'biz:training:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('模型训练新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'biz:training:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('模型训练修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'biz:training:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('模型训练删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'biz:training:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('模型训练导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'biz:training:export',       '#', 'admin', sysdate(), '', null, '');