Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
renren-generator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
renren-generator
Commits
7b1343e4
Commit
7b1343e4
authored
Jun 02, 2020
by
小四
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复sqlservice备注乱码,nvarchar不能自动识别错误
parent
aa84ce70
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
generator.properties
src/main/resources/generator.properties
+3
-0
SQLServerGeneratorDao.xml
src/main/resources/mapper/SQLServerGeneratorDao.xml
+5
-5
No files found.
src/main/resources/generator.properties
View file @
7b1343e4
...
@@ -61,3 +61,5 @@ int8=Long
...
@@ -61,3 +61,5 @@ int8=Long
int4
=
Integer
int4
=
Integer
int2
=
Integer
int2
=
Integer
numeric
=
BigDecimal
numeric
=
BigDecimal
nvarchar
=
String
\ No newline at end of file
src/main/resources/mapper/SQLServerGeneratorDao.xml
View file @
7b1343e4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<select
id=
"queryList"
resultType=
"map"
>
<select
id=
"queryList"
resultType=
"map"
>
select * from
select * from
(
(
select cast(so.name as
varchar(500)) as tableName, cast(sep.value as
varchar(500)) as tableComment, getDate() as createTime
select cast(so.name as
nvarchar(500)) as tableName, cast(sep.value as n
varchar(500)) as tableComment, getDate() as createTime
from sysobjects so
from sysobjects so
left JOIN sys.extended_properties sep
left JOIN sys.extended_properties sep
on sep.major_id=so.id and sep.minor_id=0
on sep.major_id=so.id and sep.minor_id=0
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<select
id=
"queryTable"
resultType=
"map"
>
<select
id=
"queryTable"
resultType=
"map"
>
select * from (
select * from (
select cast(so.name as
varchar(500)) as tableName, 'mssql' as engine,cast(sep.value as
varchar(500)) as tableComment, getDate() as createTime
select cast(so.name as
nvarchar(500)) as tableName, 'mssql' as engine,cast(sep.value as n
varchar(500)) as tableComment, getDate() as createTime
from sysobjects so
from sysobjects so
left JOIN sys.extended_properties sep on sep.major_id=so.id and sep.minor_id=0
left JOIN sys.extended_properties sep on sep.major_id=so.id and sep.minor_id=0
where (xtype='U' or xtype='v')
where (xtype='U' or xtype='v')
...
@@ -29,13 +29,13 @@
...
@@ -29,13 +29,13 @@
<select
id=
"queryColumns"
resultType=
"map"
>
<select
id=
"queryColumns"
resultType=
"map"
>
SELECT
SELECT
cast(
cast(
b.NAME AS VARCHAR(500)
b.NAME AS
N
VARCHAR(500)
) AS columnName,
) AS columnName,
cast(
cast(
sys.types.NAME AS VARCHAR(500)
sys.types.NAME AS
N
VARCHAR(500)
) AS dataType,
) AS dataType,
cast(
cast(
c.VALUE AS VARCHAR(500)
c.VALUE AS
N
VARCHAR(500)
) AS columnComment,
) AS columnComment,
(
(
SELECT
SELECT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment