From 8132ae09132afd31c368ae0e16e41e7b19243dab Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 1 Apr 2020 10:15:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E5=88=97?=
 =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=8E=92=E5=BA=8F=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ruoyi-ui/src/views/tool/gen/index.vue                         | 2 +-
 .../com/ruoyi/project/tool/gen/controller/GenController.java  | 1 -
 ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml      | 4 ++--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue
index 0c159a0..e71858a 100644
--- a/ruoyi-ui/src/views/tool/gen/index.vue
+++ b/ruoyi-ui/src/views/tool/gen/index.vue
@@ -80,7 +80,7 @@
 
     <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55"></el-table-column>
-      <el-table-column label="序号" align="center" prop="tableId" width="50px" />
+      <el-table-column label="序号" align="center" prop="tableId" width="60px" />
       <el-table-column
         label="表名称"
         align="center"
diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java
index f9d1bd9..2951012 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java
@@ -119,7 +119,6 @@ public class GenController extends BaseController
     @PutMapping
     public AjaxResult editSave(@Validated @RequestBody GenTable genTable)
     {
-        System.out.println(genTable.getParams().size());
         genTableService.validateEdit(genTable);
         genTableService.updateGenTable(genTable);
         return AjaxResult.success();
diff --git a/ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml b/ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml
index 25e64f8..d688599 100644
--- a/ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml
+++ b/ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml
@@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			   c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
 		FROM gen_table t
 			 LEFT JOIN gen_table_column c ON t.table_id = c.table_id
-		where t.table_id = #{tableId}
+		where t.table_id = #{tableId} order by c.sort
 	</select>
 	
 	<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
@@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			   c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
 		FROM gen_table t
 			 LEFT JOIN gen_table_column c ON t.table_id = c.table_id
-		where t.table_name = #{tableName}
+		where t.table_name = #{tableName} order by c.sort
 	</select>
 	
 	<insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId">