Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
quick_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
Lv xiang
quick_generator
Commits
5c4cb6c1
Commit
5c4cb6c1
authored
Jun 13, 2018
by
xxlv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tpl
parent
b001e2b3
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
151 additions
and
114 deletions
+151
-114
workspace.xml
.idea/workspace.xml
+102
-86
gen.py
gen.py
+26
-5
${PLACE}.java
template/${PLACE}.java
+1
-1
${PLACE}Biz.java
template/${PLACE}Biz.java
+3
-3
${PLACE}BizImpl.java
template/${PLACE}BizImpl.java
+4
-4
${PLACE}Facade.java
template/${PLACE}Facade.java
+4
-4
${PLACE}FacadeImpl.java
template/${PLACE}FacadeImpl.java
+6
-6
${PLACE}Mapper.java
template/${PLACE}Mapper.java
+3
-3
${PLACE}ReqDto.java
template/${PLACE}ReqDto.java
+1
-1
${PLACE}RespDto.java
template/${PLACE}RespDto.java
+1
-1
No files found.
.idea/workspace.xml
View file @
5c4cb6c1
...
@@ -2,8 +2,15 @@
...
@@ -2,8 +2,15 @@
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1abc04e8-e167-42cd-98ea-074bbb2150ed"
name=
"Default"
comment=
""
>
<list
default=
"true"
id=
"1abc04e8-e167-42cd-98ea-074bbb2150ed"
name=
"Default"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/README.md"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/gen.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/gen.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}Biz.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}Biz.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}BizImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}BizImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}Facade.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}Facade.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}Mapper.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}Mapper.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}ReqDto.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}ReqDto.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/template/${PLACE}RespDto.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/template/${PLACE}RespDto.java"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
@@ -17,11 +24,11 @@
...
@@ -17,11 +24,11 @@
</component>
</component>
<component
name=
"FileEditorManager"
>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"gen.py"
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
leaf-file-name=
"gen.py"
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/gen.py"
>
<entry
file=
"file://$PROJECT_DIR$/gen.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
461
"
>
<state
relative-caret-position=
"
270
"
>
<caret
line=
"
329"
column=
"36"
selection-start-line=
"329"
selection-start-column=
"36"
selection-end-line=
"329"
selection-end-column=
"36
"
/>
<caret
line=
"
284"
column=
"11"
selection-start-line=
"284"
selection-start-column=
"11"
selection-end-line=
"284"
selection-end-column=
"11
"
/>
<folding>
<folding>
<element
signature=
"e#42#51#0"
expanded=
"true"
/>
<element
signature=
"e#42#51#0"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -29,15 +36,6 @@
...
@@ -29,15 +36,6 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"README.md"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"435"
>
<caret
line=
"29"
lean-forward=
"true"
selection-start-line=
"29"
selection-end-line=
"29"
/>
</state>
</provider>
</entry>
</file>
</leaf>
</leaf>
</component>
</component>
<component
name=
"FindInProjectRecents"
>
<component
name=
"FindInProjectRecents"
>
...
@@ -46,8 +44,8 @@
...
@@ -46,8 +44,8 @@
<find>
{}/dat
</find>
<find>
{}/dat
</find>
<find>
clean_tmp
</find>
<find>
clean_tmp
</find>
<find>
gen_po
</find>
<find>
gen_po
</find>
<find>
config_mybatis
</find>
<find>
compile_table
</find>
<find>
compile_table
</find>
<find>
config_mybatis
</find>
</findStrings>
</findStrings>
<replaceStrings>
<replaceStrings>
<replace>
${PLACE}
</replace>
<replace>
${PLACE}
</replace>
...
@@ -60,14 +58,19 @@
...
@@ -60,14 +58,19 @@
<component
name=
"IdeDocumentHistory"
>
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<list>
<option
value=
"$PROJECT_DIR$/template/${PLACE}Facade.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}Biz.java"
/>
<option
value=
"$PROJECT_DIR$/heml.py"
/>
<option
value=
"$PROJECT_DIR$/heml.py"
/>
<option
value=
"$PROJECT_DIR$/tmp/generatorConfig.xml"
/>
<option
value=
"$PROJECT_DIR$/tmp/generatorConfig.xml"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/gen.py"
/>
<option
value=
"$PROJECT_DIR$/README.md"
/>
<option
value=
"$PROJECT_DIR$/README.md"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}Biz.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}BizImpl.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}Facade.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}Mapper.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}ReqDto.java"
/>
<option
value=
"$PROJECT_DIR$/template/${PLACE}RespDto.java"
/>
<option
value=
"$PROJECT_DIR$/gen.py"
/>
</list>
</list>
</option>
</option>
</component>
</component>
...
@@ -101,6 +104,11 @@
...
@@ -101,6 +104,11 @@
<item
name=
"quick_tpl"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"quick_tpl"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"quick_tpl"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"quick_tpl"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</path>
<path>
<item
name=
"quick_tpl"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"quick_tpl"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"template"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
</expand>
<select
/>
<select
/>
</subPane>
</subPane>
...
@@ -221,7 +229,7 @@
...
@@ -221,7 +229,7 @@
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"9"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"9"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"7"
visible=
"true"
weight=
"0.329718"
/>
<window_info
a
ctive=
"true"
a
nchor=
"bottom"
id=
"Terminal"
order=
"7"
visible=
"true"
weight=
"0.329718"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
weight=
"0.25235197"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
weight=
"0.25235197"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"9"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"9"
show_stripe_button=
"false"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"3"
/>
...
@@ -252,23 +260,24 @@
...
@@ -252,23 +260,24 @@
<window_info
id=
"Designer"
order=
"2"
/>
<window_info
id=
"Designer"
order=
"2"
/>
<window_info
anchor=
"right"
id=
"Palette"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Palette"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"12"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"12"
/>
<window_info
id=
"Image Layers"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
id=
"Image Layers"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Commander"
internal_type=
"SLIDING"
order=
"0"
type=
"SLIDING"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
<window_info
id=
"Capture Tool"
order=
"4"
/>
<window_info
id=
"Capture Tool"
order=
"4"
/>
<window_info
id=
"UI Designer"
order=
"5"
/>
<window_info
id=
"UI Designer"
order=
"5"
/>
<window_info
id=
"Favorites"
order=
"6"
side_tool=
"true"
/>
<window_info
id=
"Favorites"
order=
"6"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"8"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
weight=
"0.329718"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"13"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"13"
show_stripe_button=
"false"
/>
<window_info
anchor=
"right"
id=
"Capture Analysis"
order=
"4"
/>
<window_info
anchor=
"right"
id=
"Capture Analysis"
order=
"4"
/>
<window_info
anchor=
"right"
id=
"Commander"
internal_type=
"SLIDING"
order=
"0"
type=
"SLIDING"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"9"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"9"
side_tool=
"true"
/>
<window_info
anchor=
"right"
content_ui=
"combo"
id=
"Hierarchy"
order=
"2"
weight=
"0.25"
/>
<window_info
anchor=
"right"
content_ui=
"combo"
id=
"Hierarchy"
order=
"2"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Database Changes"
order=
"10"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Database Changes"
order=
"10"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"11"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"11"
/>
<window_info
anchor=
"right"
id=
"Maven Projects"
order=
"5"
/>
<window_info
anchor=
"right"
id=
"Maven Projects"
order=
"5"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.24958494"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
weight=
"0.329718"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.25235197"
/>
<window_info
anchor=
"right"
id=
"SciView"
order=
"9"
/>
<window_info
anchor=
"right"
id=
"SciView"
order=
"9"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"6"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"6"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
...
@@ -277,7 +286,6 @@
...
@@ -277,7 +286,6 @@
<window_info
anchor=
"right"
id=
"Theme Preview"
order=
"8"
/>
<window_info
anchor=
"right"
id=
"Theme Preview"
order=
"8"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
weight=
"0.329718"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.4"
/>
</layout-to-restore>
</layout-to-restore>
</component>
</component>
...
@@ -302,20 +310,6 @@
...
@@ -302,20 +310,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/gen.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"150"
>
<caret
line=
"12"
column=
"17"
lean-forward=
"true"
selection-start-line=
"12"
selection-start-column=
"17"
selection-end-line=
"12"
selection-end-column=
"17"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Facade.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"15"
>
<caret
line=
"1"
selection-start-line=
"1"
selection-end-line=
"1"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"315"
>
<state
relative-caret-position=
"315"
>
...
@@ -463,24 +457,7 @@
...
@@ -463,24 +457,7 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}FacadeImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state>
<caret
column=
"8"
selection-start-column=
"8"
selection-end-column=
"8"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}BizImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/heml.py"
/>
<entry
file=
"file://$PROJECT_DIR$/heml.py"
/>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Mapper.xml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"60"
>
<caret
line=
"4"
column=
"9"
lean-forward=
"true"
selection-start-line=
"4"
selection-start-column=
"9"
selection-end-line=
"4"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogMapper.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogMapper.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogFacade.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogFacade.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogBiz.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogBiz.java"
/>
...
@@ -489,23 +466,6 @@
...
@@ -489,23 +466,6 @@
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogMapper.xml"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogMapper.xml"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogRespDto.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/SystemlogRespDto.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/DemoBiz.java"
/>
<entry
file=
"file://$PROJECT_DIR$/tmp/DemoBiz.java"
/>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}ReqDto.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"120"
>
<caret
line=
"8"
column=
"9"
lean-forward=
"true"
selection-start-line=
"8"
selection-start-column=
"9"
selection-end-line=
"8"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Facade.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"15"
>
<caret
line=
"1"
selection-start-line=
"1"
selection-end-line=
"1"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Mapper.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ydl-login-intf/src/main/java/com/ydl/login/intf/po/DoctorModify.java"
>
<entry
file=
"file://$PROJECT_DIR$/ydl-login-intf/src/main/java/com/ydl/login/intf/po/DoctorModify.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</entry>
...
@@ -541,34 +501,90 @@
...
@@ -541,34 +501,90 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file:///usr/lib/python2.7/re.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"197"
>
<caret
line=
"137"
column=
"4"
selection-start-line=
"137"
selection-start-column=
"4"
selection-end-line=
"137"
selection-end-column=
"4"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"435"
>
<caret
line=
"29"
lean-forward=
"true"
selection-start-line=
"29"
selection-end-line=
"29"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state>
<caret
column=
"47"
selection-start-column=
"47"
selection-end-column=
"47"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Biz.java"
>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Biz.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"45"
>
<caret
line=
"3"
column=
"45"
selection-start-line=
"3"
selection-start-column=
"45"
selection-end-line=
"3"
selection-end-column=
"45"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}BizImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state>
<state>
<caret
column=
"
21"
selection-start-column=
"21"
selection-end-column=
"21
"
/>
<caret
column=
"
46"
selection-start-column=
"46"
selection-end-column=
"46
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://
/usr/lib/python2.7/re.py
"
>
<entry
file=
"file://
$PROJECT_DIR$/template/${PLACE}Facade.java
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
197
"
>
<state
relative-caret-position=
"
75
"
>
<caret
line=
"
137"
column=
"4"
selection-start-line=
"137"
selection-start-column=
"4"
selection-end-line=
"137"
selection-end-column=
"4
"
/>
<caret
line=
"
5"
column=
"80"
lean-forward=
"true"
selection-start-line=
"5"
selection-start-column=
"80"
selection-end-line=
"5"
selection-end-column=
"80
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
gen.py
"
>
<entry
file=
"file://$PROJECT_DIR$/
template/${PLACE}FacadeImpl.java
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"461"
>
<state
relative-caret-position=
"135"
>
<caret
line=
"329"
column=
"36"
selection-start-line=
"329"
selection-start-column=
"36"
selection-end-line=
"329"
selection-end-column=
"36"
/>
<caret
line=
"9"
column=
"33"
lean-forward=
"true"
selection-start-line=
"9"
selection-start-column=
"33"
selection-end-line=
"9"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"e#42#51#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
README.md
"
>
<entry
file=
"file://$PROJECT_DIR$/
template/${PLACE}Mapper.java
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"435"
>
<state
relative-caret-position=
"75"
>
<caret
line=
"29"
lean-forward=
"true"
selection-start-line=
"29"
selection-end-line=
"29"
/>
<caret
line=
"5"
column=
"62"
lean-forward=
"true"
selection-start-line=
"5"
selection-start-column=
"62"
selection-end-line=
"5"
selection-end-column=
"62"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}Mapper.xml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"60"
>
<caret
line=
"4"
column=
"9"
lean-forward=
"true"
selection-start-line=
"4"
selection-start-column=
"9"
selection-end-line=
"4"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}ReqDto.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"105"
>
<caret
line=
"7"
lean-forward=
"true"
selection-start-line=
"7"
selection-end-line=
"7"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/template/${PLACE}RespDto.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state>
<caret
column=
"46"
selection-start-column=
"46"
selection-end-column=
"46"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/gen.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"270"
>
<caret
line=
"284"
column=
"11"
selection-start-line=
"284"
selection-start-column=
"11"
selection-end-line=
"284"
selection-end-column=
"11"
/>
<folding>
<element
signature=
"e#42#51#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
...
gen.py
View file @
5c4cb6c1
...
@@ -5,6 +5,7 @@ import os
...
@@ -5,6 +5,7 @@ import os
import
shutil
import
shutil
import
argparse
import
argparse
import
xml.etree.ElementTree
as
ET
import
xml.etree.ElementTree
as
ET
import
re
DIR
=
"./template"
DIR
=
"./template"
TMP
=
"./tmp"
TMP
=
"./tmp"
...
@@ -189,7 +190,7 @@ def gen_po(res_name, project_target_path):
...
@@ -189,7 +190,7 @@ def gen_po(res_name, project_target_path):
print
(
"Mybatis 路径有误"
)
print
(
"Mybatis 路径有误"
)
exit
(
-
1
)
exit
(
-
1
)
tables_name
=
res_name
tables_name
=
get_table_name
(
res_name
)
local_mybatis_config
=
config_mybatis
(
res_name
,
tables_name
,
mybatis_config_path
)
local_mybatis_config
=
config_mybatis
(
res_name
,
tables_name
,
mybatis_config_path
)
...
@@ -279,6 +280,25 @@ def clean_tmp():
...
@@ -279,6 +280,25 @@ def clean_tmp():
print
(
"清空目录 {}"
.
format
(
TMP
))
print
(
"清空目录 {}"
.
format
(
TMP
))
def
get_res_name
(
res_name
):
# TODO
# 转化为驼峰
pass
def
get_table_name
(
res_name
):
table_name
=
""
res_name
=
res_name
[
0
:
1
]
.
lower
()
+
res_name
[
1
:]
for
i
in
range
(
0
,
len
(
res_name
)):
t
=
res_name
[
i
]
if
(
t
.
isupper
()):
t
=
""
.
join
([
"_"
,
t
.
lower
()])
table_name
=
""
.
join
([
table_name
,
t
])
return
table_name
def
gen
(
res_name
,
look_path
):
def
gen
(
res_name
,
look_path
):
"""
"""
核心逻辑
核心逻辑
...
@@ -288,8 +308,7 @@ def gen(res_name, look_path):
...
@@ -288,8 +308,7 @@ def gen(res_name, look_path):
:return:
:return:
"""
"""
clean_tmp
()
clean_tmp
()
res_name
=
get_res_name
(
res_name
)
res_name
=
res_name
[
0
]
.
upper
()
+
res_name
[
1
:]
print
(
"----------------------------------"
)
print
(
"----------------------------------"
)
print
(
"你的资源名称为 {}"
.
format
(
res_name
))
print
(
"你的资源名称为 {}"
.
format
(
res_name
))
print
(
"----------------------------------"
)
print
(
"----------------------------------"
)
...
@@ -308,7 +327,6 @@ def gen(res_name, look_path):
...
@@ -308,7 +327,6 @@ def gen(res_name, look_path):
compile_table
[
'${PLACE}'
]
=
"{}{}"
.
format
(
res_name
[
0
]
.
upper
(),
res_name
[
1
:])
compile_table
[
'${PLACE}'
]
=
"{}{}"
.
format
(
res_name
[
0
]
.
upper
(),
res_name
[
1
:])
compile_table
[
'${PLACE_VAR}'
]
=
"{}{}"
.
format
(
res_name
[
0
]
.
lower
(),
res_name
[
1
:])
compile_table
[
'${PLACE_VAR}'
]
=
"{}{}"
.
format
(
res_name
[
0
]
.
lower
(),
res_name
[
1
:])
import
re
intf
=
PROJECT_TARGET_PATH
[
"intf_po_path"
]
intf
=
PROJECT_TARGET_PATH
[
"intf_po_path"
]
p
=
re
.
compile
(
"[
\
s
\
S]*
\
/(.+)
\
-intf
\
/[
\
s
\
S]*"
)
p
=
re
.
compile
(
"[
\
s
\
S]*
\
/(.+)
\
-intf
\
/[
\
s
\
S]*"
)
...
@@ -344,6 +362,10 @@ def gen(res_name, look_path):
...
@@ -344,6 +362,10 @@ def gen(res_name, look_path):
PROJECT_TARGET_PATH
)
PROJECT_TARGET_PATH
)
safe_cpfile
(
compiled_file
,
PROJECT_TARGET_PATH
,
res_name
)
safe_cpfile
(
compiled_file
,
PROJECT_TARGET_PATH
,
res_name
)
print
(
"---------------------------------------------"
)
print
(
"你已经成功的生成了代码"
)
print
(
"---------------------------------------------"
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
print
(
"-------------------------"
)
print
(
"-------------------------"
)
...
@@ -354,7 +376,6 @@ if __name__ == "__main__":
...
@@ -354,7 +376,6 @@ if __name__ == "__main__":
parser
=
argparse
.
ArgumentParser
(
description
=
"Auto create Resource for ydl java project"
)
parser
=
argparse
.
ArgumentParser
(
description
=
"Auto create Resource for ydl java project"
)
parser
.
add_argument
(
'--verbose'
,
'-v'
,
action
=
'store_true'
,
help
=
'debug mode'
)
parser
.
add_argument
(
'--verbose'
,
'-v'
,
action
=
'store_true'
,
help
=
'debug mode'
)
parser
.
add_argument
(
"resource_name"
)
parser
.
add_argument
(
"resource_name"
)
parser
.
add_argument
(
"package"
)
parser
.
add_argument
(
"project_path"
)
parser
.
add_argument
(
"project_path"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
template/${PLACE}.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
intf
.
po
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL1
}
.
intf
.
po
;
public
class
${
PLACE
}
{
public
class
${
PLACE
}
{
...
...
template/${PLACE}Biz.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
service
.
biz
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
biz
;
import
com.
ydl
.common.service.IService
;
import
com.
$
{
PACKAGE_LEVEL1
}
.
common
.
service
.
IService
;
import
com.
ydl.user
.intf.po.
$
{
PLACE
};
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
po
.
$
{
PLACE
};
public
interface
${
PLACE
}
Biz
extends
IService
<
$
{
PLACE
}>
{
public
interface
${
PLACE
}
Biz
extends
IService
<
$
{
PLACE
}>
{
...
...
template/${PLACE}BizImpl.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
service
.
biz
.
impl
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
biz
.
impl
;
import
com.
ydl.user
.intf.po.
$
{
PLACE
};
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
po
.
$
{
PLACE
};
import
com.
ydl.user
.service.biz.
$
{
PLACE
}
Biz
;
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
biz
.
$
{
PLACE
}
Biz
;
import
com.
ydl.user
.service.dao.
$
{
PLACE
}
Mapper
;
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
dao
.
$
{
PLACE
}
Mapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.ydl.common.service.impl.BaseService
;
import
com.ydl.common.service.impl.BaseService
;
...
...
template/${PLACE}Facade.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
intf
.
facade
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
facade
;
import
com.
ydl
.common.dto.BaseDtoResponse
;
import
com.
$
{
PACKAGE_LEVEL1
}
.
common
.
dto
.
BaseDtoResponse
;
import
com.
ydl.user
.intf.dto.request.
{
PLACE
}
ReqDto
;
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
dto
.
request
.{
PLACE
}
ReqDto
;
import
com.
ydl.user
.intf.dto.response.
{
PLACE
}
RespDto
;
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
dto
.
response
.{
PLACE
}
RespDto
;
public
interface
${
PLACE
}
Facade
{
public
interface
${
PLACE
}
Facade
{
BaseDtoResponse
<
$
{
PLACE
}
RespDto
>
create
$
{
PLACE
}(
$
{
PLACE
}
ReqDto
$
{
PLACE_VAR
}
ReqDto
);
BaseDtoResponse
<
$
{
PLACE
}
RespDto
>
create
$
{
PLACE
}(
$
{
PLACE
}
ReqDto
$
{
PLACE_VAR
}
ReqDto
);
...
...
template/${PLACE}FacadeImpl.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
service
.
facade
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
facade
;
import
com.
ydl
.common.dto.BaseDtoResponse
;
import
com.
$
{
PACKAGE_LEVEL1
}
.
common
.
dto
.
BaseDtoResponse
;
import
com.
ydl
.common.helper.ResponseFormatterHelper
;
import
com.
$
{
PACKAGE_LEVEL1
}
.
common
.
helper
.
ResponseFormatterHelper
;
import
com.
ydl
.common.utils.ModelMapperUtil
;
import
com.
$
{
PACKAGE_LEVEL1
}
.
common
.
utils
.
ModelMapperUtil
;
import
com.
ydl.user
.intf.facade.
$
{
PLACE
}
Facade
;
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
facade
.
$
{
PLACE
}
Facade
;
import
com.
ydl.user
.service.biz.
$
{
PLACE
}
Biz
;
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
biz
.
$
{
PLACE
}
Biz
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
...
template/${PLACE}Mapper.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
service
.
dao
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
service
.
dao
;
import
com.
ydl
.common.service.BaseMapper
;
import
com.
$
{
PACKAGE_LEVEL1
}
.
common
.
service
.
BaseMapper
;
import
com.
ydl.user
.intf.po.
$
{
PLACE
};
import
com.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
po
.
$
{
PLACE
};
public
interface
${
PLACE
}
Mapper
extends
BaseMapper
<
$
{
PLACE
}>
{
public
interface
${
PLACE
}
Mapper
extends
BaseMapper
<
$
{
PLACE
}>
{
}
}
template/${PLACE}ReqDto.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
intf
.
dto
.
request
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
dto
.
request
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
...
template/${PLACE}RespDto.java
View file @
5c4cb6c1
package
com
.
ydl
.
user
.
intf
.
dto
.
response
;
package
com
.
$
{
PACKAGE_LEVEL1
}.
$
{
PACKAGE_LEVEL2
}
.
intf
.
dto
.
response
;
public
class
${
PLACE
}
RespDto
{
public
class
${
PLACE
}
RespDto
{
...
...
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