浏览代码

fix 优化接口访问速度

Administrator 4 年之前
父节点
当前提交
4a1ca0bebf

+ 8 - 0
boman-common/boman-common-core/src/main/java/com/boman/common/core/constant/UserConstants.java

@@ -82,4 +82,12 @@ public class UserConstants
     public static final String INCREMENT = "1";
 
     public static final String ISMENU = "Y";
+    /**
+     * 基本信息保存
+     */
+    public static final String UPLOAD_TYPE = "1";
+    /**
+     * 字段保存
+     */
+    public static final String UPLOAD_TYPE_TWO = "2";
 }

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

@@ -7,6 +7,8 @@ import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
 import com.boman.common.core.constant.UserConstants;
+import com.boman.gen.service.ILoadTableServer;
+import com.boman.gen.service.LoadTableServerImpl;
 import org.apache.commons.io.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
@@ -44,6 +46,9 @@ public class GenController extends BaseController {
     @Autowired
     private IGenTableColumnService genTableColumnService;
 
+    @Autowired
+    private ILoadTableServer loadTableServer;
+
     /**
      * 查询代码生成列表
      */
@@ -65,9 +70,9 @@ public class GenController extends BaseController {
         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("rows" , list);
-        map.put("tables" , tables);
+        map.put("info", table);
+        map.put("rows", list);
+        map.put("tables", tables);
         return AjaxResult.success(map);
     }
 
@@ -120,7 +125,7 @@ public class GenController extends BaseController {
      * 导入表结构(保存)
      */
     @PreAuthorize(hasPermi = "tool:gen:list")
-    @Log(title = "代码生成" , businessType = BusinessType.IMPORT)
+    @Log(title = "代码生成", businessType = BusinessType.IMPORT)
     @PostMapping("/importTable")
     public AjaxResult importTableSave(String tables) {
         String[] tableNames = Convert.toStrArray(tables);
@@ -134,11 +139,12 @@ public class GenController extends BaseController {
      * 修改保存代码生成业务
      */
     @PreAuthorize(hasPermi = "tool:gen:edit")
-    @Log(title = "代码生成" , businessType = BusinessType.UPDATE)
+    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult editSave(@Validated @RequestBody GenTable genTable) {
         genTableService.validateEdit(genTable);
         genTableService.updateGenTable(genTable);
+        loadTableServer.loadTable(new GenTable());
         return AjaxResult.success();
     }
 
@@ -146,10 +152,11 @@ public class GenController extends BaseController {
      * 删除代码生成
      */
     @PreAuthorize(hasPermi = "tool:gen:remove")
-    @Log(title = "代码生成" , businessType = BusinessType.DELETE)
+    @Log(title = "代码生成", businessType = BusinessType.DELETE)
     @DeleteMapping("/{tableIds}")
     public AjaxResult remove(@PathVariable Long[] tableIds) {
         genTableService.deleteGenTableByIds(tableIds);
+        loadTableServer.loadTable(new GenTable());
         return AjaxResult.success();
     }
 
@@ -167,7 +174,7 @@ public class GenController extends BaseController {
      * 生成代码(下载方式)
      */
     //@PreAuthorize(hasPermi = "tool:gen:code")
-    @Log(title = "代码生成" , businessType = BusinessType.GENCODE)
+    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
     @GetMapping("/download/{tableName}")
     public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException {
         byte[] data = genTableService.downloadCode(tableName);
@@ -178,7 +185,7 @@ public class GenController extends BaseController {
      * 生成代码(自定义路径)
      */
     @PreAuthorize(hasPermi = "tool:gen:code")
-    @Log(title = "代码生成" , businessType = BusinessType.GENCODE)
+    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
     @GetMapping("/genCode/{tableName}")
     public AjaxResult genCode(@PathVariable("tableName") String tableName) {
         genTableService.generatorCode(tableName);
@@ -189,7 +196,7 @@ public class GenController extends BaseController {
      * 同步数据库
      */
     @PreAuthorize(hasPermi = "tool:gen:edit")
-    @Log(title = "代码生成" , businessType = BusinessType.UPDATE)
+    @Log(title = "代码生成", businessType = BusinessType.UPDATE)
     @GetMapping("/synchDb/{tableName}")
     public AjaxResult synchDb(@PathVariable("tableName") String tableName) {
         genTableService.synchDb(tableName);
@@ -200,7 +207,7 @@ public class GenController extends BaseController {
      * 批量生成代码
      */
     @PreAuthorize(hasPermi = "tool:gen:code")
-    @Log(title = "代码生成" , businessType = BusinessType.GENCODE)
+    @Log(title = "代码生成", businessType = BusinessType.GENCODE)
     @GetMapping("/batchGenCode")
     public void batchGenCode(HttpServletResponse response, String tables) throws IOException {
         String[] tableNames = Convert.toStrArray(tables);
@@ -213,8 +220,8 @@ public class GenController extends BaseController {
      */
     private void genCode(HttpServletResponse response, byte[] data) throws IOException {
         response.reset();
-        response.setHeader("Content-Disposition" , "attachment; filename=\"boMan.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");
         IOUtils.write(data, response.getOutputStream());
     }
@@ -226,10 +233,11 @@ public class GenController extends BaseController {
      */
     @PostMapping("/addTable")
     public AjaxResult add(@Validated @RequestBody GenTable genTable) {
-        if (UserConstants.NOT_UNIQUE.equals(genTableService.checkTableNameUnique(genTable)))
-        {
+        if (UserConstants.NOT_UNIQUE.equals(genTableService.checkTableNameUnique(genTable))) {
             return AjaxResult.error("新增表名'" + genTable.getTableName() + "'失败,表名已存在");
         }
-        return genTableService.insertGenTable(genTable);
+        AjaxResult ajaxResult = genTableService.insertGenTable(genTable);
+        loadTableServer.loadTable(new GenTable());
+        return ajaxResult;
     }
 }

+ 4 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/mapper/GenTableMapper.java

@@ -2,6 +2,7 @@ package com.boman.gen.mapper;
 
 import java.util.List;
 import com.boman.domain.GenTable;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 业务 数据层
@@ -73,6 +74,9 @@ public interface GenTableMapper
      */
     public int updateGenTable(GenTable genTable);
 
+
+    public int updateGenTableColumnNull(@Param("tableId") Long tableId);
+
     /**
      * 批量删除业务
      * 

+ 90 - 64
boman-modules/boman-gen/src/main/java/com/boman/gen/service/GenTableColumnServiceImpl.java

@@ -18,6 +18,7 @@ import com.google.common.collect.Maps;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -36,8 +37,6 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
     private GenTableMapper genTableMapper;
     @Autowired
     private TableSqlMapper tableSqlMapper;
-    @Autowired
-    private ILoadTableServer loadTableServer;
 
     /**
      * 查询业务字段列表
@@ -49,15 +48,15 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
     public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId) {
         List<GenTableColumn> genTableColumns = genTableColumnMapper.selectGenTableColumnListByTableId(tableId);
         for (GenTableColumn genTableColumn : genTableColumns) {
-            if (genTableColumn.getHrParentId() != null){
+            if (genTableColumn.getHrParentId() != null) {
                 for (GenTableColumn tableColumn : genTableColumns) {
-                    if (genTableColumn.getHrParentId().equals(tableColumn.getId())){
+                    if (genTableColumn.getHrParentId().equals(tableColumn.getId())) {
                         genTableColumn.setHrParentName(tableColumn.getColumnName());
                         break;
                     }
                 }
             }
-            if (genTableColumn.getForeignKey() != null){
+            if (genTableColumn.getForeignKey() != null) {
                 GenTableColumn genTableColumn1 = selectGenTableColumnListByColumnId(genTableColumn.getId());
                 genTableColumn.setForeignKeyName(genTableColumn1.getColumnName());
             }
@@ -127,9 +126,10 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
     @Override
     public int insertGenTableColumn(GenTableColumn genTableColumn) {
         int i = genTableColumnMapper.insertGenTableColumn(genTableColumn);
-        isAk(genTableColumn);
-        insertCreateLog(genTableColumn, BusinessType.INSERT);
-        loadTableServer.loadTable(new GenTable());
+        List<GenTableColumn> list = new ArrayList<>();
+        list.add(genTableColumn);
+        isAk(list);
+        insertCreateLog(list, BusinessType.INSERT);
         return i;
     }
 
@@ -141,35 +141,53 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
      */
     @Override
     public int updateGenTableColumn(GenTableColumn genTableColumn) {
+        List<GenTableColumn> list = new ArrayList<>();
+        list.add(genTableColumn);
+        isAk(list);
+        insertCreateLog(list, BusinessType.UPDATE);
+        return genTableColumnMapper.updateGenTableColumn(genTableColumn);
+    }
+
+
+    /**
+     * 批量修改genTableColumn
+     *
+     * @param genTableColumn
+     * @return
+     */
+    @Override
+    public void updateGenTableColumnList(List<GenTableColumn> genTableColumn) {
         isAk(genTableColumn);
-        insertCreateLog(genTableColumn, BusinessType.UPDATE);
-        int i = genTableColumnMapper.updateGenTableColumn(genTableColumn);
-        loadTableServer.loadTable(new GenTable());
-        return i;
+        insertCreateLog(genTableColumn,BusinessType.UPDATE);
+        for (GenTableColumn tableColumn : genTableColumn) {
+            genTableColumnMapper.updateGenTableColumn(tableColumn);
+        }
     }
 
     /**
      * 插入表sql日志
      */
-    public void insertCreateLog(GenTableColumn genTableColumn, BusinessType type) {
-        GenTable genTable = genTableMapper.selectGenTableById(genTableColumn.getTableId());
+    public void insertCreateLog(List<GenTableColumn> genTableColumnList, BusinessType type) {
+        GenTable genTable = genTableMapper.selectGenTableById(genTableColumnList.get(0).getTableId());
+        TableSql tableSql = tableSqlMapper.selectTableSqlByTableId(genTableColumnList.get(0).getTableId());
         //新增业务字段的同时新增一条建表sql修改日志
-        TableSql tableSql = tableSqlMapper.selectTableSqlByTableId(genTableColumn.getTableId());
         String createLog = "";
         if (tableSql != null) {
             createLog = tableSql.getCreateLog();
         }
         StringBuffer sb = new StringBuffer(createLog);
-        //ALTER TABLE table_name ADD COLUMN column_name VARCHAR(100) DEFAULT NULL COMMENT '新加字段';
-        sb.append("\r\n").append(DateUtils.getTime()).append(" ").append(SecurityUtils.getUsername()).append(" ALTER TABLE ").append(genTable.getTableName());
-        if (BusinessType.INSERT.equals(type)) {
-            sb.append(" ADD COLUMN ").append(genTableColumn.getColumnName()).append(" ").append(genTableColumn.getColumnType());
-            sb = genTableColumn.getDefaultValue() == null ? sb.append(" DEFAULT NULL COMMENT ") : sb.append(" DEFAULT '").append(genTableColumn.getDefaultValue()).append("' COMMENT '");
-            sb.append(genTableColumn.getColumnComment()).append("';");
-        } else if (BusinessType.UPDATE.equals(type)) {
-            sb.append(" MODIFY ").append(genTableColumn.getColumnName()).append(" ").append(genTableColumn.getColumnType()).append(";");
-        } else if (BusinessType.DELETE.equals(type)) {
-            sb.append(" DROP ").append(genTableColumn.getColumnName()).append(";");
+        for (GenTableColumn genTableColumn : genTableColumnList) {
+            //ALTER TABLE table_name ADD COLUMN column_name VARCHAR(100) DEFAULT NULL COMMENT '新加字段';
+            sb.append("\r\n").append(DateUtils.getTime()).append(" ").append(SecurityUtils.getUsername()).append(" ALTER TABLE ").append(genTable.getTableName());
+            if (BusinessType.INSERT.equals(type)) {
+                sb.append(" ADD COLUMN ").append(genTableColumn.getColumnName()).append(" ").append(genTableColumn.getColumnType());
+                sb = genTableColumn.getDefaultValue() == null ? sb.append(" DEFAULT NULL COMMENT ") : sb.append(" DEFAULT '").append(genTableColumn.getDefaultValue()).append("' COMMENT '");
+                sb.append(genTableColumn.getColumnComment()).append("';");
+            } else if (BusinessType.UPDATE.equals(type)) {
+                sb.append(" MODIFY ").append(genTableColumn.getColumnName()).append(" ").append(genTableColumn.getColumnType()).append(";");
+            } else if (BusinessType.DELETE.equals(type)) {
+                sb.append(" DROP ").append(genTableColumn.getColumnName()).append(";");
+            }
         }
         if (tableSql != null) {
             tableSql.setCreateLog(sb.toString());
@@ -180,43 +198,53 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
     /**
      * 判断对象是否设置显示和输入字段
      *
-     * @param genTableColumn
+     * @param genTableColumnList
      */
-    public void isAk(GenTableColumn genTableColumn) {
-
-        //是否是输入
-        String isIn = genTableColumn.getIsIn();
-        //是否是显示
-        String isOut = genTableColumn.getIsOut();
-        //查询出该表所有是输入或者是显示的字段
-        List<GenTableColumn> genTableColumns = genTableColumnMapper.selectGenTableColumnListByTableId(genTableColumn.getTableId());
-        GenTable genTable = new GenTable();
-        if (UserConstants.YES.equals(isIn)) {
-            //判断是否已经存在输入字段且不是同一个字段
-            for (GenTableColumn tableColumn : genTableColumns) {
-                if (UserConstants.YES.equals(tableColumn.getIsIn()) && !tableColumn.getId().equals(genTableColumn.getId())) {
-                    tableColumn.setIsIn("N");
-                    genTableColumnMapper.updateGenTableColumn(tableColumn);
-                    break;
+    public void isAk(List<GenTableColumn> genTableColumnList) {
+        for (GenTableColumn genTableColumn : genTableColumnList) {
+            //是否是输入
+            String isIn = genTableColumn.getIsIn();
+            //是否是显示
+            String isOut = genTableColumn.getIsOut();
+            //查询出该表所有是输入或者是显示的字段
+            List<GenTableColumn> genTableColumns = genTableColumnMapper.selectGenTableColumnIsListByTableId(genTableColumn.getTableId());
+            GenTable genTable = new GenTable();
+            if (UserConstants.YES.equals(isIn)) {
+                //判断是否已经存在输入字段且不是同一个字段
+                if (genTableColumns.size() > 0) {
+                    for (GenTableColumn tableColumn : genTableColumns) {
+                        if (UserConstants.YES.equals(tableColumn.getIsIn()) && !tableColumn.getId().equals(genTableColumn.getId())) {
+                            tableColumn.setIsIn("N");
+                            genTableColumnMapper.updateGenTableColumn(tableColumn);
+                            break;
+                        }
+                    }
                 }
+                genTable.setId(genTableColumn.getTableId());
+                genTable.setAkColumn(genTableColumn.getId());
+                genTable.setDkColumn(null);
             }
-            genTable.setId(genTableColumn.getTableId());
-            genTable.setAkColumn(genTableColumn.getId());
-        }
-        if (UserConstants.YES.equals(isOut)) {
-            //判断是否已经存在显示字段且不是同一个字段
-            for (GenTableColumn tableColumn : genTableColumns) {
-                if (UserConstants.YES.equals(tableColumn.getIsOut()) && !tableColumn.getId().equals(genTableColumn.getId())) {
-                    tableColumn.setIsOut("N");
-                    genTableColumnMapper.updateGenTableColumn(tableColumn);
-                    break;
+            if (UserConstants.YES.equals(isOut)) {
+                //判断是否已经存在显示字段且不是同一个字段
+                if (genTableColumns.size() > 0) {
+                    for (GenTableColumn tableColumn : genTableColumns) {
+                        if (UserConstants.YES.equals(tableColumn.getIsOut()) && !tableColumn.getId().equals(genTableColumn.getId())) {
+                            tableColumn.setIsOut("N");
+                            genTableColumnMapper.updateGenTableColumn(tableColumn);
+                            break;
+                        }
+                    }
                 }
+                genTable.setId(genTableColumn.getTableId());
+                genTable.setDkColumn(genTableColumn.getId());
+                genTable.setAkColumn(null);
+            }
+            if (genTable.getId() != null) {
+                genTableMapper.updateGenTable(genTable);
+            } else {
+                //表明没有显示和输入字段更新到gen表上
+                genTableMapper.updateGenTableColumnNull(genTableColumn.getTableId());
             }
-            genTable.setId(genTableColumn.getTableId());
-            genTable.setDkColumn(genTableColumn.getId());
-        }
-        if (genTable.getId() != null) {
-            genTableMapper.updateGenTable(genTable);
         }
     }
 
@@ -229,9 +257,7 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
      */
     @Override
     public int deleteGenTableColumnByIds(String ids) {
-        int i = genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids));
-        loadTableServer.loadTable(new GenTable());
-        return i;
+        return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids));
     }
 
     /**
@@ -243,13 +269,13 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
     @Override
     public int deleteGenTableColumnByColumnIds(String ids) {
         Long[] longs = Convert.toLongArray(ids);
+        List<GenTableColumn> list = new ArrayList<>();
         for (Long aLong : longs) {
             GenTableColumn genTableColumn = genTableColumnMapper.selectGenTableColumnByColumnId(aLong);
-            insertCreateLog(genTableColumn, BusinessType.DELETE);
+            list.add(genTableColumn);
         }
-        int i = genTableColumnMapper.deleteGenTableColumnByColumnIds(Convert.toLongArray(ids));
-        loadTableServer.loadTable(new GenTable());
-        return i;
+        insertCreateLog(list, BusinessType.DELETE);
+        return genTableColumnMapper.deleteGenTableColumnByColumnIds(Convert.toLongArray(ids));
     }
 
     /**

+ 6 - 11
boman-modules/boman-gen/src/main/java/com/boman/gen/service/GenTableServiceImpl.java

@@ -79,9 +79,6 @@ public class GenTableServiceImpl implements IGenTableService {
     @Autowired
     private GenTableRelationMapper genTableRelationMapper;
 
-    @Autowired
-    private ILoadTableServer loadTableServer;
-
     /**
      * 查询业务信息
      *
@@ -188,18 +185,18 @@ public class GenTableServiceImpl implements IGenTableService {
     @Transactional
     public void updateGenTable(GenTable genTable) {
         String updateType = genTable.getUpdateType();
-        if ("1".equals(updateType)){
+        if (UserConstants.UPLOAD_TYPE.equals(updateType)) {
             String options = JSON.toJSONString(genTable.getParams());
             genTable.setOptions(options);
             isMenu(genTable, BusinessType.UPDATE);
             genTableMapper.updateGenTable(genTable);
         }
-        if ("2".equals(updateType)){
-            for (GenTableColumn cenTableColumn : genTable.getColumns()) {
-                tableColumnService.updateGenTableColumn(cenTableColumn);
+        if (UserConstants.UPLOAD_TYPE_TWO.equals(updateType)) {
+            List<GenTableColumn> columns = genTable.getColumns();
+            if (columns.size() > 0){
+                tableColumnService.updateGenTableColumnList(columns);
             }
         }
-        loadTableServer.loadTable(new GenTable());
     }
 
     /**
@@ -216,7 +213,6 @@ public class GenTableServiceImpl implements IGenTableService {
         tableSqlService.deleteTableSqlByTableIds(tableIds);
         //删除关联关系
         genTableRelationMapper.deleteGenTableRelationByParentId(tableIds);
-        loadTableServer.loadTable(new GenTable());
     }
 
     /**
@@ -470,7 +466,6 @@ public class GenTableServiceImpl implements IGenTableService {
             TableSql tableSql = new TableSql();
             tableSql.setTableId(genTable.getId());
             tableSqlService.insertTableSql(tableSql);
-            loadTableServer.loadTable(new GenTable());
             return AjaxResult.success();
         }
         return AjaxResult.error();
@@ -544,7 +539,7 @@ public class GenTableServiceImpl implements IGenTableService {
                 genTableColumn.setIsPk("1");
                 genTableColumn.setHrParentId(genTableColumnBaseInfo.getId());
             }
-            if ("is_del".equals(columnName[i]) ){
+            if ("is_del".equals(columnName[i])) {
                 genTableColumn.setDefaultValue("N");
             }
             genTableColumnMapper.insertGenTableColumn(genTableColumn);

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

@@ -62,6 +62,13 @@ public interface IGenTableColumnService
      */
     public int updateGenTableColumn(GenTableColumn genTableColumn);
 
+    /**
+     * 批量修改业务字段
+     * @param genTableColumn
+     * @return
+     */
+    public void updateGenTableColumnList(List<GenTableColumn> genTableColumn);
+
     /**
      * 删除业务字段信息
      * 

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

@@ -52,8 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectGenTableColumnIsListByTableId" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
         <include refid="selectGenTableColumnVo"/>
-        where table_id = #{tableId}
-        order by sort
+        where table_id = #{tableId} and (is_in = 'Y' or is_out = 'Y')
     </select>
 
     <select id="selectGenTableColumnList" parameterType="GenTableColumn" resultMap="GenTableColumnResult">

+ 6 - 2
boman-modules/boman-gen/src/main/resources/mapper/generator/GenTableMapper.xml

@@ -226,8 +226,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            ak_column = #{akColumn},
+            dk_column = #{dkColumn},
 			<if test="triggerCreate != null and triggerCreate != ''">trigger_create = #{triggerCreate},</if>
 			<if test="triggerRetrieve != null and triggerRetrieve != ''">trigger_retrieve = #{triggerRetrieve},</if>
 			<if test="triggerUpdate != null and triggerUpdate != ''">trigger_update = #{triggerUpdate},</if>
@@ -241,6 +241,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </set>
         where id = #{id}
     </update>
+
+	<update id="updateGenTableColumnNull" parameterType="long">
+		update gen_table set ak_column = null, dk_column = null where id = #{tableId}
+	</update>
     
     <delete id="deleteGenTableByIds" parameterType="Long">
         delete from gen_table where id in