Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
yaru
fgqyxxlr
Commits
bed64742
Commit
bed64742
authored
Aug 10, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复代码生成树表异常
parent
d408e2bf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
8 deletions
+9
-8
ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
+4
-0
ruoyi-generator/src/main/resources/vm/html/add.html.vm
+3
-4
ruoyi-generator/src/main/resources/vm/html/edit.html.vm
+0
-2
ruoyi-generator/src/main/resources/vm/html/tree.html.vm
+1
-1
ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
+1
-1
No files found.
ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
View file @
bed64742
...
@@ -75,6 +75,10 @@ public class VelocityUtils
...
@@ -75,6 +75,10 @@ public class VelocityUtils
{
{
context
.
put
(
"tree_parent_code"
,
paramsObj
.
getString
(
GenConstants
.
TREE_PARENT_CODE
));
context
.
put
(
"tree_parent_code"
,
paramsObj
.
getString
(
GenConstants
.
TREE_PARENT_CODE
));
}
}
if
(
paramsObj
.
containsKey
(
GenConstants
.
TREE_NAME
))
{
context
.
put
(
"tree_name"
,
paramsObj
.
getString
(
GenConstants
.
TREE_NAME
));
}
}
}
/**
/**
...
...
ruoyi-generator/src/main/resources/vm/html/add.html.vm
View file @
bed64742
...
@@ -28,10 +28,9 @@
...
@@ -28,10 +28,9 @@
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
#set($deptId = "${className}?.deptId")
#set($treeId = "${className}?.${treeCode}")
#set($deptName = "${className}?.deptName")
<input
id=
"treeId"
name=
"${treeParentCode}"
type=
"hidden"
th:value=
"${${treeId}}"
/>
<input
id=
"treeId"
name=
"${treeParentCode}"
type=
"hidden"
th:value=
"${${deptId}}"
/>
<input
class=
"form-control"
type=
"text"
onclick=
"select${BusinessName}Tree()"
id=
"treeName"
readonly=
"true"
th:value=
"${${treeName}}"
#
if
($
column
.
required
)
required
#
end
>
<input
class=
"form-control"
type=
"text"
onclick=
"select${BusinessName}Tree()"
id=
"treeName"
readonly=
"true"
th:value=
"${${deptName}}"
#
if
($
column
.
required
)
required
#
end
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-search"
></i></span>
<span
class=
"input-group-addon"
><i
class=
"fa fa-search"
></i></span>
</div>
</div>
</div>
</div>
...
...
ruoyi-generator/src/main/resources/vm/html/edit.html.vm
View file @
bed64742
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
#set($deptId = "${className}?.deptId")
#set($deptName = "${className}?.deptName")
<input
id=
"treeId"
name=
"${treeParentCode}"
type=
"hidden"
th:field=
"*{${treeParentCode}}"
/>
<input
id=
"treeId"
name=
"${treeParentCode}"
type=
"hidden"
th:field=
"*{${treeParentCode}}"
/>
<input
class=
"form-control"
type=
"text"
onclick=
"select${BusinessName}Tree()"
id=
"treeName"
readonly=
"true"
th:field=
"*{parentName}"
#
if
($
column
.
required
)
required
#
end
>
<input
class=
"form-control"
type=
"text"
onclick=
"select${BusinessName}Tree()"
id=
"treeName"
readonly=
"true"
th:field=
"*{parentName}"
#
if
($
column
.
required
)
required
#
end
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-search"
></i></span>
<span
class=
"input-group-addon"
><i
class=
"fa fa-search"
></i></span>
...
...
ruoyi-generator/src/main/resources/vm/html/tree.html.vm
View file @
bed64742
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<th:block
th:include=
"include :: ztree-js"
/>
<th:block
th:include=
"include :: ztree-js"
/>
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
$
(
function
()
{
$
(
function
()
{
var
url
=
ctx
+
"
system
/${businessName}/treeData"
;
var
url
=
ctx
+
"
${moduleName}
/${businessName}/treeData"
;
var
options
=
{
var
options
=
{
url
:
url
,
url
:
url
,
expandLevel
:
2
,
expandLevel
:
2
,
...
...
ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
View file @
bed64742
...
@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"select${ClassName}Vo"
/>
<include
refid=
"select${ClassName}Vo"
/>
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
#elseif($table.tree)
#elseif($table.tree)
select#foreach($column in $columns) t.$column.columnName,#end p.
dept_name
as parent_name
select#foreach($column in $columns) t.$column.columnName,#end p.
${tree_name}
as parent_name
from ${tableName} t
from ${tableName} t
left join ${tableName} p on p.${pkColumn.columnName} = t.${tree_parent_code}
left join ${tableName} p on p.${pkColumn.columnName} = t.${tree_parent_code}
where t.${pkColumn.columnName} = #{${pkColumn.javaField}}
where t.${pkColumn.columnName} = #{${pkColumn.javaField}}
...
...
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