Score
0
Watch 5 Star 26 Fork 16

Sxile / RuoYi-SqlserverJavaMIT

Merged
!1 代码生成相关问题

王荣:masterSxile:master

王荣 Created on: 2019-09-20 17:15
bug

1)修正numeric类型,如果正常生成domain问题
2)修正代码生成导入画面,无法模糊查询问题

0 comments, 1 participants

Show action logs Hide action logs
Sxile merged Pull Request 2019-09-29 15:11
王荣 added label bug 2019-09-20 17:15

Sign in to comment

2019-09-20

(1)
ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
@@ -26,7 +26,7 @@ public class GenConstants
/** 数据库数字类型 */
public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
"bigint", "float", "float", "double", "decimal" };
"bigint", "float", "float", "double", "decimal", "numeric" };
/** 页面不需要编辑字段 */
public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult">
SELECT
cast(A.NAME as nvarchar) as column_name,
cast(B.NAME as nvarchar) as column_type,
cast(B.NAME as nvarchar) + (case when B.NAME ='numeric' then '('+cast(A.prec as nvarchar)+','+cast(A.scale as nvarchar)+')' else '' end) as column_type,
cast(G.[VALUE] as nvarchar) as column_comment,
(SELECT 1 FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE Z WHERE TABLE_NAME=D.NAME and A.NAME = Z.column_name ) as is_pk
FROM SYSCOLUMNS A
ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -72,10 +72,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND F.MINOR_ID=0 AND D.XTYPE='U' AND D.NAME!='DTPROPERTIES'
AND D.NAME NOT IN (select table_name from gen_table)
<if test="tableName != null and tableName != ''">
AND table_name like '%'+#{tableName}+ '%'
AND D.NAME like '%'+#{tableName}+ '%'
</if>
<if test="tableComment != null and tableComment != ''">
AND table_comment like '%'+#{tableComment}+ '%'
AND cast(F.VALUE as nvarchar) like '%'+#{tableComment}+ '%'
</if>
</select>
Java
1
https://gitee.com/gzizi/RuoYi-Sqlserver.git
git@gitee.com:gzizi/RuoYi-Sqlserver.git
gzizi
RuoYi-Sqlserver
RuoYi-Sqlserver

Help Search

191139_cd20d5fd_5186603 191143_ebef6f8d_5186603