浏览代码

添加cloumn的CRUD未完成

Administrator 4 年之前
父节点
当前提交
7705eaa282

+ 41 - 41
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/GenController.java

@@ -5,6 +5,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
+
+import com.boman.common.core.constant.UserConstants;
+import com.boman.common.core.utils.SecurityUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
@@ -30,13 +33,12 @@ import com.boman.gen.service.IGenTableService;
 
 
 /**
 /**
  * 代码生成 操作处理
  * 代码生成 操作处理
- * 
+ *
  * @author ruoyi
  * @author ruoyi
  */
  */
 @RequestMapping("/gen")
 @RequestMapping("/gen")
 @RestController
 @RestController
-public class GenController extends BaseController
-{
+public class GenController extends BaseController {
     @Autowired
     @Autowired
     private IGenTableService genTableService;
     private IGenTableService genTableService;
 
 
@@ -48,8 +50,7 @@ public class GenController extends BaseController
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:list")
     @PreAuthorize(hasPermi = "tool:gen:list")
     @GetMapping("/list")
     @GetMapping("/list")
-    public TableDataInfo genList(GenTable genTable)
-    {
+    public TableDataInfo genList(GenTable genTable) {
         startPage();
         startPage();
         List<GenTable> list = genTableService.selectGenTableList(genTable);
         List<GenTable> list = genTableService.selectGenTableList(genTable);
         return getDataTable(list);
         return getDataTable(list);
@@ -60,15 +61,14 @@ public class GenController extends BaseController
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:query")
     @PreAuthorize(hasPermi = "tool:gen:query")
     @GetMapping(value = "/{talbleId}")
     @GetMapping(value = "/{talbleId}")
-    public AjaxResult getInfo(@PathVariable Long talbleId)
-    {
+    public AjaxResult getInfo(@PathVariable Long talbleId) {
         GenTable table = genTableService.selectGenTableById(talbleId);
         GenTable table = genTableService.selectGenTableById(talbleId);
         List<GenTable> tables = genTableService.selectGenTableAll();
         List<GenTable> tables = genTableService.selectGenTableAll();
         List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(talbleId);
         List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(talbleId);
         Map<String, Object> map = new HashMap<String, Object>();
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("info", table);
-        map.put("rows", list);
-        map.put("tables", tables);
+        map.put("info" , table);
+        map.put("rows" , list);
+        map.put("tables" , tables);
         return AjaxResult.success(map);
         return AjaxResult.success(map);
     }
     }
 
 
@@ -77,8 +77,7 @@ public class GenController extends BaseController
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:list")
     @PreAuthorize(hasPermi = "tool:gen:list")
     @GetMapping("/db/list")
     @GetMapping("/db/list")
-    public TableDataInfo dataList(GenTable genTable)
-    {
+    public TableDataInfo dataList(GenTable genTable) {
         startPage();
         startPage();
         List<GenTable> list = genTableService.selectDbTableList(genTable);
         List<GenTable> list = genTableService.selectDbTableList(genTable);
         return getDataTable(list);
         return getDataTable(list);
@@ -88,8 +87,7 @@ public class GenController extends BaseController
      * 查询数据表字段列表
      * 查询数据表字段列表
      */
      */
     @GetMapping(value = "/column/{talbleId}")
     @GetMapping(value = "/column/{talbleId}")
-    public TableDataInfo columnList(Long tableId)
-    {
+    public TableDataInfo columnList(Long tableId) {
         TableDataInfo dataInfo = new TableDataInfo();
         TableDataInfo dataInfo = new TableDataInfo();
         List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
         List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
         dataInfo.setRows(list);
         dataInfo.setRows(list);
@@ -101,10 +99,9 @@ public class GenController extends BaseController
      * 导入表结构(保存)
      * 导入表结构(保存)
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:list")
     @PreAuthorize(hasPermi = "tool:gen:list")
-    @Log(title = "代码生成", businessType = BusinessType.IMPORT)
+    @Log(title = "代码生成" , businessType = BusinessType.IMPORT)
     @PostMapping("/importTable")
     @PostMapping("/importTable")
-    public AjaxResult importTableSave(String tables)
-    {
+    public AjaxResult importTableSave(String tables) {
         String[] tableNames = Convert.toStrArray(tables);
         String[] tableNames = Convert.toStrArray(tables);
         // 查询表信息
         // 查询表信息
         List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames);
         List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames);
@@ -116,10 +113,9 @@ public class GenController extends BaseController
      * 修改保存代码生成业务
      * 修改保存代码生成业务
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:edit")
     @PreAuthorize(hasPermi = "tool:gen:edit")
-    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
+    @Log(title = "代码生成" , businessType = BusinessType.UPDATE)
     @PutMapping
     @PutMapping
-    public AjaxResult editSave(@Validated @RequestBody GenTable genTable)
-    {
+    public AjaxResult editSave(@Validated @RequestBody GenTable genTable) {
         genTableService.validateEdit(genTable);
         genTableService.validateEdit(genTable);
         genTableService.updateGenTable(genTable);
         genTableService.updateGenTable(genTable);
         return AjaxResult.success();
         return AjaxResult.success();
@@ -129,10 +125,9 @@ public class GenController extends BaseController
      * 删除代码生成
      * 删除代码生成
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:remove")
     @PreAuthorize(hasPermi = "tool:gen:remove")
-    @Log(title = "代码生成", businessType = BusinessType.DELETE)
+    @Log(title = "代码生成" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{tableIds}")
     @DeleteMapping("/{tableIds}")
-    public AjaxResult remove(@PathVariable Long[] tableIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] tableIds) {
         genTableService.deleteGenTableByIds(tableIds);
         genTableService.deleteGenTableByIds(tableIds);
         return AjaxResult.success();
         return AjaxResult.success();
     }
     }
@@ -142,8 +137,7 @@ public class GenController extends BaseController
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:preview")
     @PreAuthorize(hasPermi = "tool:gen:preview")
     @GetMapping("/preview/{tableId}")
     @GetMapping("/preview/{tableId}")
-    public AjaxResult preview(@PathVariable("tableId") Long tableId) throws IOException
-    {
+    public AjaxResult preview(@PathVariable("tableId") Long tableId) throws IOException {
         Map<String, String> dataMap = genTableService.previewCode(tableId);
         Map<String, String> dataMap = genTableService.previewCode(tableId);
         return AjaxResult.success(dataMap);
         return AjaxResult.success(dataMap);
     }
     }
@@ -152,10 +146,9 @@ public class GenController extends BaseController
      * 生成代码(下载方式)
      * 生成代码(下载方式)
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:code")
     @PreAuthorize(hasPermi = "tool:gen:code")
-    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
+    @Log(title = "代码生成" , businessType = BusinessType.GENCODE)
     @GetMapping("/download/{tableName}")
     @GetMapping("/download/{tableName}")
-    public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException
-    {
+    public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException {
         byte[] data = genTableService.downloadCode(tableName);
         byte[] data = genTableService.downloadCode(tableName);
         genCode(response, data);
         genCode(response, data);
     }
     }
@@ -164,10 +157,9 @@ public class GenController extends BaseController
      * 生成代码(自定义路径)
      * 生成代码(自定义路径)
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:code")
     @PreAuthorize(hasPermi = "tool:gen:code")
-    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
+    @Log(title = "代码生成" , businessType = BusinessType.GENCODE)
     @GetMapping("/genCode/{tableName}")
     @GetMapping("/genCode/{tableName}")
-    public AjaxResult genCode(@PathVariable("tableName") String tableName)
-    {
+    public AjaxResult genCode(@PathVariable("tableName") String tableName) {
         genTableService.generatorCode(tableName);
         genTableService.generatorCode(tableName);
         return AjaxResult.success();
         return AjaxResult.success();
     }
     }
@@ -176,10 +168,9 @@ public class GenController extends BaseController
      * 同步数据库
      * 同步数据库
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:edit")
     @PreAuthorize(hasPermi = "tool:gen:edit")
-    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
+    @Log(title = "代码生成" , businessType = BusinessType.UPDATE)
     @GetMapping("/synchDb/{tableName}")
     @GetMapping("/synchDb/{tableName}")
-    public AjaxResult synchDb(@PathVariable("tableName") String tableName)
-    {
+    public AjaxResult synchDb(@PathVariable("tableName") String tableName) {
         genTableService.synchDb(tableName);
         genTableService.synchDb(tableName);
         return AjaxResult.success();
         return AjaxResult.success();
     }
     }
@@ -188,10 +179,9 @@ public class GenController extends BaseController
      * 批量生成代码
      * 批量生成代码
      */
      */
     @PreAuthorize(hasPermi = "tool:gen:code")
     @PreAuthorize(hasPermi = "tool:gen:code")
-    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
+    @Log(title = "代码生成" , businessType = BusinessType.GENCODE)
     @GetMapping("/batchGenCode")
     @GetMapping("/batchGenCode")
-    public void batchGenCode(HttpServletResponse response, String tables) throws IOException
-    {
+    public void batchGenCode(HttpServletResponse response, String tables) throws IOException {
         String[] tableNames = Convert.toStrArray(tables);
         String[] tableNames = Convert.toStrArray(tables);
         byte[] data = genTableService.downloadCode(tableNames);
         byte[] data = genTableService.downloadCode(tableNames);
         genCode(response, data);
         genCode(response, data);
@@ -200,12 +190,22 @@ public class GenController extends BaseController
     /**
     /**
      * 生成zip文件
      * 生成zip文件
      */
      */
-    private void genCode(HttpServletResponse response, byte[] data) throws IOException
-    {
+    private void genCode(HttpServletResponse response, byte[] data) throws IOException {
         response.reset();
         response.reset();
-        response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
-        response.addHeader("Content-Length", "" + data.length);
+        response.setHeader("Content-Disposition" , "attachment; filename=\"boMan.zip\"");
+        response.addHeader("Content-Length" , "" + data.length);
         response.setContentType("application/octet-stream; charset=UTF-8");
         response.setContentType("application/octet-stream; charset=UTF-8");
         IOUtils.write(data, response.getOutputStream());
         IOUtils.write(data, response.getOutputStream());
     }
     }
+
+
+    /**
+    * @Description 代码生成增加新增功能
+    * @Author: tjf
+    * @Date: 2021/3/24
+    */
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody GenTable genTable) {
+        return genTableService.insertGenTable(genTable);
+    }
 }
 }

+ 56 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/GenTableColumnController.java

@@ -0,0 +1,56 @@
+package com.boman.gen.controller;
+
+
+import com.boman.common.core.constant.UserConstants;
+import com.boman.common.core.utils.SecurityUtils;
+import com.boman.common.core.web.controller.BaseController;
+import com.boman.common.core.web.domain.AjaxResult;
+import com.boman.common.log.annotation.Log;
+import com.boman.common.log.enums.BusinessType;
+import com.boman.common.security.annotation.PreAuthorize;
+import com.boman.gen.domain.GenTableColumn;
+import com.boman.gen.service.IGenTableColumnService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author tjf
+ * @Description gen_table_column
+ * @Date 2021/3/24
+ */
+@RequestMapping("/genTableColumn")
+@RestController
+public class GenTableColumnController extends BaseController {
+
+    @Autowired
+    private IGenTableColumnService genTableColumnService;
+
+
+
+    /**
+    * @Description 新增业务表字段
+    * @author tjf
+    * @Date 2021/3/24
+    */
+    @PostMapping
+    @Log(title = "新增业务表字段", businessType = BusinessType.INSERT)
+    public AjaxResult add(@Validated @RequestBody GenTableColumn genTableColumn) {
+        return toAjax(genTableColumnService.insertGenTableColumn(genTableColumn));
+    }
+
+
+
+    /**
+    * @Description 修改业务表字段
+    * @author tjf
+    * @Date 2021/3/24
+    */
+    @Log(title = "修改业务表字段", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody GenTableColumn genTableColumn)
+    {
+
+        return toAjax( genTableColumnService.updateGenTableColumn(genTableColumn));
+    }
+}

+ 54 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/domain/GenTable.java

@@ -80,6 +80,28 @@ public class GenTable extends BaseEntity
     /** 其它生成选项 */
     /** 其它生成选项 */
     private String options;
     private String options;
 
 
+    /**
+     * 是否菜单
+     */
+    private String isMenu;
+
+    /**
+     * 菜单权限(AMDQSUE)
+     */
+    @NotBlank(message = "菜单权限不能为空")
+    private String menuRole;
+
+    /**
+     * 输入字段
+     */
+    private Long akColumn;
+
+    /**
+     * 输出字段
+     */
+    private Long dkColumn;
+
+
     /** 树编码字段 */
     /** 树编码字段 */
     private String treeCode;
     private String treeCode;
 
 
@@ -95,6 +117,38 @@ public class GenTable extends BaseEntity
     /** 上级菜单名称字段 */
     /** 上级菜单名称字段 */
     private String parentMenuName;
     private String parentMenuName;
 
 
+    public Long getAkColumn() {
+        return akColumn;
+    }
+
+    public void setAkColumn(Long akColumn) {
+        this.akColumn = akColumn;
+    }
+
+    public Long getDkColumn() {
+        return dkColumn;
+    }
+
+    public void setDkColumn(Long dkColumn) {
+        this.dkColumn = dkColumn;
+    }
+
+    public String getIsMenu() {
+        return isMenu;
+    }
+
+    public void setIsMenu(String isMenu) {
+        this.isMenu = isMenu;
+    }
+
+    public String getMenuRole() {
+        return menuRole;
+    }
+
+    public void setMenuRole(String menuRole) {
+        this.menuRole = menuRole;
+    }
+
     public Long getTableId()
     public Long getTableId()
     {
     {
         return tableId;
         return tableId;

+ 10 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/service/GenTableColumnServiceImpl.java

@@ -81,4 +81,14 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService
 	{
 	{
 		return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids));
 		return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids));
 	}
 	}
+
+	/**
+	 * 校验column_name是否重复
+	 * @param genTableColumn
+	 * @return
+	 */
+	@Override
+	public String checkConfigKeyUnique(GenTableColumn genTableColumn) {
+		return null;
+	}
 }
 }

+ 18 - 2
boman-modules/boman-gen/src/main/java/com/boman/gen/service/GenTableServiceImpl.java

@@ -10,6 +10,8 @@ import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 import java.util.zip.ZipOutputStream;
+
+import com.boman.common.core.web.domain.AjaxResult;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.velocity.Template;
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.VelocityContext;
@@ -281,18 +283,21 @@ public class GenTableServiceImpl implements IGenTableService
      * @param tableName 表名称
      * @param tableName 表名称
      */
      */
     @Override
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Exception.class)
     public void synchDb(String tableName)
     public void synchDb(String tableName)
     {
     {
         GenTable table = genTableMapper.selectGenTableByName(tableName);
         GenTable table = genTableMapper.selectGenTableByName(tableName);
+        //获取表字段集合
         List<GenTableColumn> tableColumns = table.getColumns();
         List<GenTableColumn> tableColumns = table.getColumns();
+        //获取列名称集合
         List<String> tableColumnNames = tableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
         List<String> tableColumnNames = tableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
-
+        //根据表名称查询原列信息
         List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
         List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
         if (StringUtils.isEmpty(dbTableColumns))
         if (StringUtils.isEmpty(dbTableColumns))
         {
         {
             throw new CustomException("同步数据失败,原表结构不存在");
             throw new CustomException("同步数据失败,原表结构不存在");
         }
         }
+        //获取原表列名称集合
         List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
         List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
 
 
         dbTableColumns.forEach(column -> {
         dbTableColumns.forEach(column -> {
@@ -407,6 +412,17 @@ public class GenTableServiceImpl implements IGenTableService
         }
         }
     }
     }
 
 
+    /**
+     * 代码生成业务表新增
+     * @param genTable
+     * @return
+     */
+    @Override
+    public AjaxResult insertGenTable(GenTable genTable) {
+        //判断是否是菜单
+        return  genTableMapper.insertGenTable(genTable) > 0?AjaxResult.success():AjaxResult.error();
+    }
+
     /**
     /**
      * 设置主键列信息
      * 设置主键列信息
      * 
      * 

+ 10 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/service/IGenTableColumnService.java

@@ -49,4 +49,14 @@ public interface IGenTableColumnService
      * @return 结果
      * @return 结果
      */
      */
     public int deleteGenTableColumnByIds(String ids);
     public int deleteGenTableColumnByIds(String ids);
+
+
+    /**
+    *校验column_name是否重复
+    * @param genTableColumn
+    * @return 结果
+    * @author tjf
+    * @Date 2021/3/24
+    */
+    public String checkConfigKeyUnique(GenTableColumn genTableColumn);
 }
 }

+ 9 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/service/IGenTableService.java

@@ -2,6 +2,8 @@ package com.boman.gen.service;
 
 
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+
+import com.boman.common.core.web.domain.AjaxResult;
 import com.boman.gen.domain.GenTable;
 import com.boman.gen.domain.GenTable;
 
 
 /**
 /**
@@ -118,4 +120,11 @@ public interface IGenTableService
      * @param genTable 业务信息
      * @param genTable 业务信息
      */
      */
     public void validateEdit(GenTable genTable);
     public void validateEdit(GenTable genTable);
+
+    /**
+     * 代码生成业务新增
+     * @param genTable
+     * @return
+     */
+    public AjaxResult insertGenTable(GenTable genTable);
 }
 }

+ 4 - 1
boman-modules/boman-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml

@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isQuery"        column="is_query"       />
         <result property="isQuery"        column="is_query"       />
         <result property="queryType"      column="query_type"     />
         <result property="queryType"      column="query_type"     />
         <result property="htmlType"       column="html_type"      />
         <result property="htmlType"       column="html_type"      />
+        <result property="foreignKey"     column="foreign_key"      />
         <result property="dictType"       column="dict_type"      />
         <result property="dictType"       column="dict_type"      />
         <result property="sort"           column="sort"           />
         <result property="sort"           column="sort"           />
         <result property="createBy"       column="create_by"      />
         <result property="createBy"       column="create_by"      />
@@ -30,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     </resultMap>
 	
 	
 	<sql id="selectGenTableColumnVo">
 	<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 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, foreign_key, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
     </sql>
     </sql>
 	
 	
     <select id="selectGenTableColumnListByTableId" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
     <select id="selectGenTableColumnListByTableId" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
@@ -71,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="isQuery != null and isQuery != ''">is_query,</if>
 			<if test="isQuery != null and isQuery != ''">is_query,</if>
 			<if test="queryType != null and queryType != ''">query_type,</if>
 			<if test="queryType != null and queryType != ''">query_type,</if>
 			<if test="htmlType != null and htmlType != ''">html_type,</if>
 			<if test="htmlType != null and htmlType != ''">html_type,</if>
+			<if test="foreignKey != null ">foreign_key,</if>
 			<if test="dictType != null and dictType != ''">dict_type,</if>
 			<if test="dictType != null and dictType != ''">dict_type,</if>
 			<if test="sort != null">sort,</if>
 			<if test="sort != null">sort,</if>
 			<if test="createBy != null and createBy != ''">create_by,</if>
 			<if test="createBy != null and createBy != ''">create_by,</if>
@@ -91,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="isQuery != null and isQuery != ''">#{isQuery},</if>
 			<if test="isQuery != null and isQuery != ''">#{isQuery},</if>
 			<if test="queryType != null and queryType != ''">#{queryType},</if>
 			<if test="queryType != null and queryType != ''">#{queryType},</if>
 			<if test="htmlType != null and htmlType != ''">#{htmlType},</if>
 			<if test="htmlType != null and htmlType != ''">#{htmlType},</if>
+			<if test="foreignKey != null">#{foreignKey},</if>
 			<if test="dictType != null and dictType != ''">#{dictType},</if>
 			<if test="dictType != null and dictType != ''">#{dictType},</if>
 			<if test="sort != null">#{sort},</if>
 			<if test="sort != null">#{sort},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>

+ 17 - 1
boman-modules/boman-gen/src/main/resources/mapper/generator/GenTableMapper.xml

@@ -25,6 +25,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="updateBy"       column="update_by"         />
 		<result property="updateBy"       column="update_by"         />
 		<result property="updateTime"     column="update_time"       />
 		<result property="updateTime"     column="update_time"       />
 		<result property="remark"         column="remark"            />
 		<result property="remark"         column="remark"            />
+		<result property="isMenu"         column="is_menu"            />
+		<result property="menuRole"         column="menu_role"            />
+		<result property="akColumn"         column="ak_column"            />
+		<result property="dkColumn"         column="dk_column"            />
 		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />
 		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />
 	</resultMap>
 	</resultMap>
 	
 	
@@ -54,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     </resultMap>
 	
 	
 	<sql id="selectGenTableVo">
 	<sql id="selectGenTableVo">
-        select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
+        select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark, is_menu, menu_role, ak_column, dk_columnfrom gen_table
     </sql>
     </sql>
     
     
     <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
     <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
@@ -150,6 +154,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="genType != null and genType != ''">gen_type,</if>
 			<if test="genType != null and genType != ''">gen_type,</if>
 			<if test="genPath != null and genPath != ''">gen_path,</if>
 			<if test="genPath != null and genPath != ''">gen_path,</if>
 			<if test="remark != null and remark != ''">remark,</if>
 			<if test="remark != null and remark != ''">remark,</if>
+			<if test="isMenu != null and isMenu != ''">is_menu,</if>
+			<if test="menuRole != null and menuRole != ''">menu_role,</if>
+			<if test="akColumn != null ">ak_column,</if>
+			<if test="dkColumn != null">dk_column,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
 			create_time
 			create_time
          )values(
          )values(
@@ -165,6 +173,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="genType != null and genType != ''">#{genType},</if>
 			<if test="genType != null and genType != ''">#{genType},</if>
 			<if test="genPath != null and genPath != ''">#{genPath},</if>
 			<if test="genPath != null and genPath != ''">#{genPath},</if>
 			<if test="remark != null and remark != ''">#{remark},</if>
 			<if test="remark != null and remark != ''">#{remark},</if>
+			<if test="isMenu != null and isMenu != ''">#{isMenu},</if>
+			<if test="menuRole != null and menuRole != ''">#{menuRole},</if>
+			<if test="akColumn != null">#{akColumn},</if>
+			<if test="dkColumn != null ">#{dkColumn},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
 			sysdate()
 			sysdate()
          )
          )
@@ -189,6 +201,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="options != null and options != ''">options = #{options},</if>
             <if test="options != null and options != ''">options = #{options},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="isMenu != null and isMenu != ''">is_menu = #{isMenu},</if>
+            <if test="menuRole != null and menuRole != ''">menu_role = #{menuRole},</if>
+            <if test="akColumn != null">ak_column = #{akColumn},</if>
+            <if test="dkColumn != null">dk_column = #{dkColumn},</if>
             update_time = sysdate()
             update_time = sysdate()
         </set>
         </set>
         where table_id = #{tableId}
         where table_id = #{tableId}