Commit c45e854f by xxlv

Fix code structure

parent 4d620a71
tmp
.idea
quick_generator.egg-info
build
dist
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
<excludeFolder url="file://$MODULE_DIR$/quick_generator.egg-info" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
......
......@@ -2,8 +2,21 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1abc04e8-e167-42cd-98ea-074bbb2150ed" name="Default" comment="">
<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" />
<change afterPath="$PROJECT_DIR$/quick_generator/__init__.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}Biz.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}BizImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}Facade.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}FacadeImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}Mapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}Mapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}ReqDto.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/quick_generator/template/${PLACE}RespDto.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/setup.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/quick_tpl.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/quick_tpl.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gen.py" beforeDir="false" afterPath="$PROJECT_DIR$/quick_generator/gen.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -31,31 +44,41 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="${PLACE}.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/template/${PLACE}.java">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file leaf-file-name="${PLACE}ReqDto.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/template/${PLACE}ReqDto.java">
<file leaf-file-name="setup.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/setup.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="3" />
<state>
<caret column="17" selection-start-column="17" selection-end-column="17" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="${PLACE}RespDto.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/template/${PLACE}RespDto.java">
<file leaf-file-name="__init__.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/quick_generator/__init__.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file leaf-file-name="gen.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/quick_generator/gen.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="2" />
<state relative-caret-position="101">
<caret line="440" lean-forward="true" selection-start-line="440" selection-end-line="440" />
<folding>
<element signature="e#42#51#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>systemlogZt</find>
......@@ -69,6 +92,7 @@
<find>get_rs</find>
<find>clean_tmp</find>
<find>is_po</find>
<find>os.sy</find>
</findStrings>
<replaceStrings>
<replace>${PLACE}</replace>
......@@ -96,6 +120,8 @@
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/template/${PLACE}ReqDto.java" />
<option value="$PROJECT_DIR$/template/${PLACE}RespDto.java" />
<option value="$PROJECT_DIR$/setup.py" />
<option value="$PROJECT_DIR$/quick_generator/gen.py" />
</list>
</option>
</component>
......@@ -122,28 +148,19 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="quick_tpl" type="b2602c69:ProjectViewProjectNode" />
<item name="quick_tpl" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="quick_tpl" type="b2602c69:ProjectViewProjectNode" />
<item name="quick_tpl" type="462c0819:PsiDirectoryNode" />
<item name="template" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="quick_tpl" type="b2602c69:ProjectViewProjectNode" />
<item name="quick_tpl" type="462c0819:PsiDirectoryNode" />
<item name="tmp" type="462c0819:PsiDirectoryNode" />
<item name="quick_generator" type="b2602c69:ProjectViewProjectNode" />
<item name="quick_generator" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
<option name="show-excluded-files" value="false" />
</pane>
<pane id="Scope" />
<pane id="AndroidView" />
<pane id="PackagesPane" />
</panes>
......@@ -153,6 +170,11 @@
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/quick_generator" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
......@@ -179,7 +201,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/gen.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/gen221.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -253,51 +275,37 @@
<frame x="67" y="25" width="1853" height="1055" extended-state="6" />
<editor active="true" />
<layout>
<window_info anchor="bottom" id="TODO" order="9" />
<window_info anchor="bottom" id="Event Log" order="20" side_tool="true" />
<window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="12" />
<window_info anchor="bottom" id="Python Console" order="14" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Terminal" order="8" visible="true" weight="0.31236443" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25235197" />
<window_info anchor="bottom" id="Docker" order="13" show_stripe_button="false" />
<window_info anchor="right" id="Database" order="11" weight="0.32982844" />
<window_info anchor="right" id="SciView" order="9" weight="0.32982844" />
<window_info id="Structure" order="2" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="9" side_tool="true" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="10" />
<window_info anchor="bottom" id="Event Log" order="17" side_tool="true" />
<window_info anchor="bottom" id="Database Changes" order="18" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="19" />
<window_info anchor="bottom" id="Python Console" order="21" />
<window_info anchor="bottom" id="Run" order="4" />
<window_info anchor="bottom" id="Terminal" order="16" visible="true" weight="0.329718" />
<window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.255119" />
<window_info anchor="bottom" id="Docker" order="22" show_stripe_button="false" />
<window_info anchor="right" id="Database" order="6" />
<window_info anchor="right" id="SciView" order="10" />
<window_info id="Structure" order="3" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="8" side_tool="true" />
<window_info anchor="bottom" id="Debug" order="5" weight="0.4" />
<window_info anchor="bottom" id="FindBugs-IDEA" order="15" />
<window_info id="Designer" order="4" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="bottom" id="Python Console" order="21" />
<window_info anchor="bottom" id="Run" order="4" />
<window_info id="Image Layers" order="5" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="6" weight="0.25" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info id="Capture Tool" order="6" />
<window_info id="UI Designer" order="7" />
<window_info id="Favorites" order="8" side_tool="true" />
<window_info active="true" anchor="bottom" id="Terminal" order="16" visible="true" weight="0.329718" />
<window_info anchor="bottom" id="Docker" order="22" show_stripe_button="false" />
<window_info anchor="right" id="Capture Analysis" order="4" />
<window_info anchor="bottom" id="Event Log" order="17" side_tool="true" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.25235197" />
<window_info anchor="bottom" id="Database Changes" order="18" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="19" />
<window_info anchor="right" id="Maven Projects" order="5" />
<window_info anchor="bottom" id="Find" order="1" weight="0.329718" />
<window_info anchor="bottom" id="Inspection" order="7" weight="0.4" />
<window_info anchor="right" id="SciView" order="10" />
<window_info anchor="right" id="Database" order="6" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="TODO" order="10" />
<window_info anchor="right" id="Palette&#9;" order="7" />
<window_info anchor="right" id="Theme Preview" order="8" />
<window_info id="Structure" order="3" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Debug" order="5" weight="0.4" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -307,56 +315,14 @@
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/gen.py">
<entry file="file://$PROJECT_DIR$/gen221.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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="23" column="65" selection-start-line="23" selection-start-column="65" selection-end-line="23" selection-end-column="65" />
</state>
</provider>
</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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
</state>
</provider>
</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$/gen.py">
<entry file="file://$PROJECT_DIR$/gen221.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" />
......@@ -370,7 +336,7 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gen.py">
<entry file="file://$PROJECT_DIR$/gen221.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" />
......@@ -384,7 +350,7 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gen.py">
<entry file="file://$PROJECT_DIR$/gen221.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" />
......@@ -405,7 +371,7 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gen.py">
<entry file="file://$PROJECT_DIR$/gen221.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" />
......@@ -464,13 +430,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/tmp/AbnormalOrderFacadeImpl.java" />
<entry file="file://$PROJECT_DIR$/tmp/AbnormalOrderMapper.xml" />
<entry file="file://$PROJECT_DIR$/tmp/generatorConfig.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="447">
<caret line="59" lean-forward="true" selection-start-line="59" selection-end-line="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tmp/generatorConfig.xml" />
<entry file="file://$PROJECT_DIR$/tmp/java/com/ydl/user/intf/po/AbnormalOrder.java" />
<entry file="file://$PROJECT_DIR$/template/${PLACE}Mapper.xml">
<provider selected="true" editor-type-id="text-editor">
......@@ -503,40 +463,64 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gen.py">
<entry file="file://$PROJECT_DIR$/README.md" />
<entry file="file://$PROJECT_DIR$/template/${PLACE}.java">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/template/${PLACE}ReqDto.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4362">
<caret line="446" lean-forward="true" selection-start-line="446" selection-end-line="446" />
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/template/${PLACE}RespDto.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/__init__.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file:///usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-118">
<caret line="479" selection-start-line="479" selection-end-line="479" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gen221.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="696">
<caret line="446" selection-start-line="446" selection-end-line="446" />
<folding>
<element signature="e#42#51#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="446">
<caret line="59" selection-start-line="59" selection-end-line="59" />
</first_editor>
<second_editor />
</state>
</provider>
<entry file="file://$PROJECT_DIR$/quick_generator/template/${PLACE}.java">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/template/${PLACE}.java">
<entry file="file://$PROJECT_DIR$/quick_generator/__init__.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/template/${PLACE}ReqDto.java">
<entry file="file://$PROJECT_DIR$/setup.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="3" />
<state>
<caret column="17" selection-start-column="17" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/template/${PLACE}RespDto.java">
<entry file="file://$PROJECT_DIR$/quick_generator/gen.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="2" />
<state relative-caret-position="101">
<caret line="440" lean-forward="true" selection-start-line="440" selection-end-line="440" />
<folding>
<element signature="e#42#51#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......
......@@ -7,9 +7,9 @@ import argparse
import xml.etree.ElementTree as ET
import re
DIR = "./template"
TMP = "./tmp"
JAR_PATH = "./jar"
DIR = os.path.join(".","template")
TMP = os.path.join(".","tmp")
JAR_PATH = os.path.join(".","jar")
MYBATIS_GEN_JAVA_PATH = "{}/java".format(TMP)
PO = ""
......@@ -211,7 +211,6 @@ def gen_po(res_name, project_target_path):
po_path = "{}/{}".format(MYBATIS_GEN_JAVA_PATH, "/".join(local_mybatis_config["po_path"].split(".")))
print(po_path)
gen_po_cmd = """
java -jar {}/mybatis-generator-core-1.3.6.jar -configfile {} -overwrite
""".format(JAR_PATH, local_mybatis_config_path)
......@@ -408,6 +407,7 @@ def gen(res_name, look_path):
# 编译文件
compiled_file_list = []
print(DIR)
for root, dirs, files in os.walk(DIR, False):
for file in files:
if (file[0] == "$"):
......@@ -445,7 +445,7 @@ def gen(res_name, look_path):
print("---------------------------------------------")
if __name__ == "__main__":
def main():
print("-------------------------")
print("Start Building your Resource")
print("Draw by ghost ")
......@@ -459,3 +459,7 @@ if __name__ == "__main__":
project_path = args.project_path
resource_name = args.resource_name
gen(resource_name, project_path)
if __name__ == "__main__":
main()
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.po;
public class ${PLACE} {
}
\ No newline at end of file
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.biz;
import com.${PACKAGE_LEVEL1}.common.service.IService;
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.po.${PLACE};
public interface ${PLACE}Biz extends IService<${PLACE}> {
/**
* Create ${PLACE} Resource
*
* @param ${PLACE_VAR}
* @return
*/
${PLACE} create${PLACE}(${PLACE} ${PLACE_VAR});
}
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.biz.impl;
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.po.${PLACE};
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.biz.${PLACE}Biz;
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.dao.${PLACE}Mapper;
import org.springframework.stereotype.Service;
import com.ydl.common.service.impl.BaseService;
import javax.annotation.Resource;
@Service
public class ${PLACE}BizImpl extends BaseService<${PLACE}> implements ${PLACE}Biz {
@Resource
private ${PLACE}Mapper ${PLACE_VAR}Mapper;
@Override
public ${PLACE} create${PLACE}(${PLACE} ${PLACE_VAR}) {
return null;
}
}
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.facade;
import com.${PACKAGE_LEVEL1}.common.dto.BaseDtoResponse;
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.dto.request.${PLACE}ReqDto;
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.dto.response.${PLACE}RespDto;
public interface ${PLACE}Facade {
BaseDtoResponse<${PLACE}RespDto> create${PLACE}(${PLACE}ReqDto ${PLACE_VAR}ReqDto);
}
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.facade;
import com.ydl.common.dto.BaseDtoResponse;
import com.ydl.common.helper.ResponseFormatterHelper;
import com.ydl.common.utils.ModelMapperUtil;
import com.ydl.user.intf.dto.request.${PLACE}ReqDto;
import com.ydl.user.intf.dto.response.${PLACE}RespDto;
import com.ydl.user.intf.facade.${PLACE}Facade;
import com.ydl.user.service.biz.${PLACE}Biz;
import com.ydl.user.intf.po.${PLACE};
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class ${PLACE}FacadeImpl implements ${PLACE}Facade {
@Resource
private ${PLACE}Biz ${PLACE_VAR}Biz;
@Override
public BaseDtoResponse<${PLACE}RespDto> create${PLACE}(${PLACE}ReqDto ${PLACE_VAR}ReqDto) {
${PLACE} ${PLACE_VAR}=ModelMapperUtil.strictMap(${PLACE_VAR}ReqDto,${PLACE}.class);
${PLACE} ${PLACE_VAR}Stored=${PLACE_VAR}Biz.create${PLACE}(${PLACE_VAR});
${PLACE}RespDto ${PLACE_VAR}RespDto=ModelMapperUtil.strictMap(${PLACE_VAR}Stored,${PLACE}RespDto.class);
return ResponseFormatterHelper.success(${PLACE_VAR}RespDto);
}
}
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.dao;
import com.${PACKAGE_LEVEL1}.common.service.BaseMapper;
import com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.po.${PLACE};
public interface ${PLACE}Mapper extends BaseMapper<${PLACE}> {
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.service.dao.${PLACE}Mapper" >
</mapper>
\ No newline at end of file
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.dto.request;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
public class ${PLACE}ReqDto implements Serializable {
${PO}
}
package com.${PACKAGE_LEVEL1}.${PACKAGE_LEVEL2}.intf.dto.response;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
public class ${PLACE}RespDto implements Serializable{
${PO}
}
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="quick_generator",
version="0.0.1",
author="ghost",
author_email="lvxiang119@gmail.com",
description="Quickly code generator",
long_description=long_description,
packages=setuptools.find_packages(),
entry_points={
'console_scripts': ['gen=quick_generator.gen:main'],
}
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment