Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
df59bfd6
Commit
df59bfd6
authored
May 14, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板增加模块字段
parent
9076d024
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
8 deletions
+39
-8
guns-sys/src/main/webapp/assets/expand/css/style.css
+18
-0
guns-sys/src/main/webapp/pages/common/_container.html
+1
-0
guns-vip-gen/src/main/java/cn/stylefeng/guns/generator/core/generator/base/model/ContextParam.java
+5
-0
guns-vip-gen/src/main/java/cn/stylefeng/guns/generator/modular/controller/GeneratorController.java
+2
-1
guns-vip-gen/src/main/resources/gunsTemplates/controller.java.btl
+1
-1
guns-vip-gen/src/main/resources/gunsTemplates/page.html.btl
+1
-1
guns-vip-gen/src/main/resources/gunsTemplates/page_add.html.btl
+1
-1
guns-vip-gen/src/main/resources/gunsTemplates/page_edit.html.btl
+1
-1
guns-vip-gen/src/main/webapp/pages/gen/gen.html
+9
-3
No files found.
guns-sys/src/main/webapp/assets/expand/css/style.css
View file @
df59bfd6
.text-danger
{
.text-danger
{
color
:
#FF5722
;
color
:
#FF5722
;
}
}
.text-success
{
.text-success
{
color
:
#5FB878
;
color
:
#5FB878
;
}
}
.text-waring
{
.text-waring
{
color
:
#FFB800
;
color
:
#FFB800
;
}
.layui-form-label
{
float
:
left
;
display
:
block
;
padding
:
9px
15px
;
width
:
90px
;
font-weight
:
400
;
line-height
:
20px
;
text-align
:
right
;
}
.layui-input-block
{
margin-left
:
120px
;
min-height
:
36px
;
}
}
\ No newline at end of file
guns-sys/src/main/webapp/pages/common/_container.html
View file @
df59bfd6
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<title>
${title!"管理系统"}
</title>
<title>
${title!"管理系统"}
</title>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/module/admin.css"
media=
"all"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/module/admin.css"
media=
"all"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/expand/css/style.css"
media=
"all"
/>
<!--其他插件css-->
<!--其他插件css-->
@if(isNotEmpty(plugins)){
@if(isNotEmpty(plugins)){
...
...
guns-vip-gen/src/main/java/cn/stylefeng/guns/generator/core/generator/base/model/ContextParam.java
View file @
df59bfd6
...
@@ -46,4 +46,9 @@ public class ContextParam {
...
@@ -46,4 +46,9 @@ public class ContextParam {
*/
*/
private
String
author
=
"fengshuonan"
;
private
String
author
=
"fengshuonan"
;
/**
* 模块名称
*/
private
String
modularName
;
}
}
guns-vip-gen/src/main/java/cn/stylefeng/guns/generator/modular/controller/GeneratorController.java
View file @
df59bfd6
...
@@ -151,7 +151,7 @@ public class GeneratorController {
...
@@ -151,7 +151,7 @@ public class GeneratorController {
@RequestMapping
(
value
=
"/execute"
)
@RequestMapping
(
value
=
"/execute"
)
@ResponseBody
@ResponseBody
public
ResponseEntity
<
InputStreamResource
>
execute
(
String
author
,
String
proPackage
,
String
removePrefix
,
public
ResponseEntity
<
InputStreamResource
>
execute
(
String
author
,
String
proPackage
,
String
removePrefix
,
Long
dataSourceId
,
String
tables
)
{
Long
dataSourceId
,
String
tables
,
String
modularName
)
{
//获取字符串拼接数组
//获取字符串拼接数组
String
[]
tableArray
=
ConcatUtil
.
getArray
(
tables
);
String
[]
tableArray
=
ConcatUtil
.
getArray
(
tables
);
...
@@ -165,6 +165,7 @@ public class GeneratorController {
...
@@ -165,6 +165,7 @@ public class GeneratorController {
contextParam
.
setJdbcUserName
(
databaseInfo
.
getUserName
());
contextParam
.
setJdbcUserName
(
databaseInfo
.
getUserName
());
contextParam
.
setJdbcPassword
(
databaseInfo
.
getPassword
());
contextParam
.
setJdbcPassword
(
databaseInfo
.
getPassword
());
contextParam
.
setJdbcUrl
(
databaseInfo
.
getJdbcUrl
());
contextParam
.
setJdbcUrl
(
databaseInfo
.
getJdbcUrl
());
contextParam
.
setModularName
(
modularName
);
//获取临时目录
//获取临时目录
long
fileName
=
IdWorker
.
getId
();
long
fileName
=
IdWorker
.
getId
();
...
...
guns-vip-gen/src/main/resources/gunsTemplates/controller.java.btl
View file @
df59bfd6
...
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
@
RequestMapping
(
"/${lowerEntity}"
)
@
RequestMapping
(
"/${lowerEntity}"
)
public
class
${
entity
}
Controller
extends
BaseController
{
public
class
${
entity
}
Controller
extends
BaseController
{
private
String
PREFIX
=
"/${lowerEntity}"
;
private
String
PREFIX
=
"/${
context.modularName}/${
lowerEntity}"
;
@
Autowired
@
Autowired
private
${
entity
}
Service
${
lowerEntityService
};
private
${
entity
}
Service
${
lowerEntityService
};
...
...
guns-vip-gen/src/main/resources/gunsTemplates/page.html.btl
View file @
df59bfd6
@layout("/common/_container.html",{js:["/assets/${lowerEntity}/${lowerEntity}.js"]}){
@layout("/common/_container.html",{js:["/assets/${
context.modularName}/${
lowerEntity}/${lowerEntity}.js"]}){
<div class="layui-body-header">
<div class="layui-body-header">
<span class="layui-body-header-title">${tableComment}管理</span>
<span class="layui-body-header-title">${tableComment}管理</span>
...
...
guns-vip-gen/src/main/resources/gunsTemplates/page_add.html.btl
View file @
df59bfd6
@layout("/common/_container.html",{js:["/assets/
modular
/${lowerEntity}/${lowerEntity}_add.js"]}){
@layout("/common/_container.html",{js:["/assets/
${context.modularName}
/${lowerEntity}/${lowerEntity}_add.js"]}){
<div class="layui-body-header">
<div class="layui-body-header">
<span class="layui-body-header-title">添加</span>
<span class="layui-body-header-title">添加</span>
...
...
guns-vip-gen/src/main/resources/gunsTemplates/page_edit.html.btl
View file @
df59bfd6
@layout("/common/_container.html",{js:["/assets/
modular
/${lowerEntity}/${lowerEntity}_edit.js"]}){
@layout("/common/_container.html",{js:["/assets/
${context.modularName}
/${lowerEntity}/${lowerEntity}_edit.js"]}){
<div class="layui-body-header">
<div class="layui-body-header">
<span class="layui-body-header-title">修改</span>
<span class="layui-body-header-title">修改</span>
...
...
guns-vip-gen/src/main/webapp/pages/gen/gen.html
View file @
df59bfd6
...
@@ -25,13 +25,19 @@
...
@@ -25,13 +25,19 @@
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
项目包名称
</label>
<label
class=
"layui-form-label"
>
项目包名称
<i
class=
"layui-icon layui-icon-tips"
lay-tips=
"具体到模块包"
></i>
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"proPackage"
name=
"proPackage"
lay-verify=
"title"
autocomplete=
"off"
placeholder=
"项目包名称"
class=
"layui-input"
>
<input
type=
"text"
id=
"proPackage"
name=
"proPackage"
lay-verify=
"title"
autocomplete=
"off"
placeholder=
"项目包名称
,例如:cn.stylefeng.guns.modular.demos
"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
表前缀移除
</label>
<label
class=
"layui-form-label"
>
模块名称
<i
class=
"layui-icon layui-icon-tips"
lay-tips=
"利用模块名称来为业务分类,本字段可为空"
></i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"modularName"
name=
"modularName"
lay-verify=
"title"
autocomplete=
"off"
placeholder=
"模块名称"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
表前缀移除
<i
class=
"layui-icon layui-icon-tips"
lay-tips=
"移除表的前缀关键字"
></i></label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"removePrefix"
name=
"removePrefix"
lay-verify=
"title"
autocomplete=
"off"
placeholder=
"表前缀移除"
class=
"layui-input"
>
<input
type=
"text"
id=
"removePrefix"
name=
"removePrefix"
lay-verify=
"title"
autocomplete=
"off"
placeholder=
"表前缀移除"
class=
"layui-input"
>
</div>
</div>
...
...
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