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
87a9adf2
Commit
87a9adf2
authored
Jun 09, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成页面添加模块英文名称
parent
59950c3b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
src/main/java/com/stylefeng/guns/modular/system/controller/CodeController.java
+4
-2
src/main/webapp/WEB-INF/view/system/code/code.html
+6
-0
src/main/webapp/static/modular/system/code/code.js
+1
-0
No files found.
src/main/java/com/stylefeng/guns/modular/system/controller/CodeController.java
View file @
87a9adf2
...
...
@@ -42,20 +42,22 @@ public class CodeController extends BaseController {
*/
@ApiOperation
(
"生成代码"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"moduleName"
,
value
=
"模块名称"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"bizChName"
,
value
=
"业务名称"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"bizEnName"
,
value
=
"业务英文名称"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"path"
,
value
=
"项目生成类路径"
,
required
=
true
,
dataType
=
"String"
)
})
@RequestMapping
(
value
=
"/generate"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/generate"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@Permission
(
Const
.
ADMIN_NAME
)
public
Object
add
(
String
bizChName
,
String
bizEnName
,
String
path
)
{
public
Object
add
(
String
moduleName
,
String
bizChName
,
String
bizEnName
,
String
path
)
{
if
(
ToolUtil
.
isOneEmpty
(
bizChName
,
bizEnName
))
{
throw
new
BussinessException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
ContextConfig
contextConfig
=
new
ContextConfig
();
contextConfig
.
setBizChName
(
bizChName
);
contextConfig
.
setBizEnName
(
bizEnName
);
contextConfig
.
setModuleName
(
moduleName
);
if
(
ToolUtil
.
isNotEmpty
(
path
))
{
contextConfig
.
setProjectPath
(
path
);
}
...
...
src/main/webapp/WEB-INF/view/system/code/code.html
View file @
87a9adf2
...
...
@@ -8,6 +8,12 @@
<div
class=
"ibox-content"
>
<div
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
模块英文名称
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
id=
"moduleName"
>
<span
class=
"help-block m-b-none"
>
例如:system
</span>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
业务名称
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
id=
"bizChName"
>
<span
class=
"help-block m-b-none"
>
例如:测试
</span>
...
...
src/main/webapp/static/modular/system/code/code.js
View file @
87a9adf2
...
...
@@ -13,5 +13,6 @@ Code.generate = function () {
baseAjax
.
set
(
"bizChName"
);
baseAjax
.
set
(
"bizEnName"
);
baseAjax
.
set
(
"path"
);
baseAjax
.
set
(
"moduleName"
);
baseAjax
.
start
();
};
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