From 83f5b8dc441038d32d07ca463e4395c18b8e3911 Mon Sep 17 00:00:00 2001 From: wangbing <1919101440@qq.com> Date: Sun, 22 Dec 2019 23:35:07 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 5c0f8496476d380f2d34c07be191e37f66f9cfa4 --- .../manger/callable/SpringBootCallable.java | 21 +- .../java/action/GlobalController.java | 2 +- .../java/action/ajax/system/AuthAjax.java | 134 ------- .../java/action/ajax/system/UserAjax.java | 128 +++++- .../java/action/api/system/AuthApi.java | 23 -- .../java/action/api/system/UserApi.java | 90 ++++- .../mpr/{mapper.ftl => MySQL_mapper.xml} | 0 .../{mapper_nosys.ftl => Nosys_mapper.xml} | 0 .../java/module/mpr/Oracle_mapper.xml | 364 ++++++++++++++++++ .../java/module/mpr/SQLite_mapper.xml | 364 ++++++++++++++++++ .../mpr/{mapperJava.ftl => mapper.java} | 0 .../java/module/rsp/createResponseClass.ftl | 2 +- .../java/module/system/ent/Dict.java | 2 +- .../java/module/system/ent/DictItem.java | 2 +- .../java/module/system/ent/File.java | 2 +- .../java/module/system/ent/Resource.java | 2 +- .../java/module/system/ent/Role.java | 2 +- .../java/module/system/ent/RoleResource.java | 2 +- .../java/module/system/ent/Tokens.java | 2 +- .../java/module/system/ent/User.java | 2 +- .../java/module/system/ent/UserRole.java | 2 +- .../module/system/mgr/ResourceManager.java | 2 +- .../system/mgr/ResourceManagerImpl.java | 2 +- .../java/module/system/mgr/RoleManager.java | 2 +- .../module/system/mgr/RoleManagerImpl.java | 2 +- .../system/mgr/RoleResourceManager.java | 2 +- .../system/mgr/RoleResourceManagerImpl.java | 2 +- .../java/module/system/mgr/TokensManager.java | 2 +- .../module/system/mgr/TokensManagerImpl.java | 4 +- .../java/module/system/mgr/UserManager.java | 2 +- .../module/system/mgr/UserManagerImpl.java | 2 +- .../module/system/mgr/UserRoleManager.java | 2 +- .../system/mgr/UserRoleManagerImpl.java | 2 +- .../module/system/mpr/DictItemMapper.java | 2 +- .../java/module/system/mpr/DictMapper.java | 2 +- ...per_MySQL.xml => MySQL_DictItemMapper.xml} | 0 ...tMapper_MySQL.xml => MySQL_DictMapper.xml} | 0 ...eMapper_MySQL.xml => MySQL_FileMapper.xml} | 0 ...per_MySQL.xml => MySQL_ResourceMapper.xml} | 16 +- ...eMapper_MySQL.xml => MySQL_RoleMapper.xml} | 0 ...MySQL.xml => MySQL_RoleResourceMapper.xml} | 0 ...apper_MySQL.xml => MySQL_TokensMapper.xml} | 0 ...rMapper_MySQL.xml => MySQL_UserMapper.xml} | 0 ...per_MySQL.xml => MySQL_UserRoleMapper.xml} | 0 ...r_Oracle.xml => Oracle_DictItemMapper.xml} | 0 ...apper_Oracle.xml => Oracle_DictMapper.xml} | 0 ...apper_Oracle.xml => Oracle_FileMapper.xml} | 0 ...r_SQLite.xml => SQLite_DictItemMapper.xml} | 0 ...apper_SQLite.xml => SQLite_DictMapper.xml} | 0 ...apper_SQLite.xml => SQLite_FileMapper.xml} | 0 .../module/system/req/DeptCreateRequest.java | 102 +++++ .../module/system/req/DeptDeleteRequest.java | 28 ++ .../module/system/req/DeptFindRequest.java | 91 +++++ .../module/system/req/DeptGetRequest.java | 28 ++ .../module/system/req/DeptUpdateRequest.java | 116 ++++++ .../module/system/req/DictCreateRequest.java | 2 +- .../module/system/req/DictDeleteRequest.java | 2 +- .../module/system/req/DictFindRequest.java | 2 +- .../module/system/req/DictGetRequest.java | 2 +- .../system/req/DictItemCreateRequest.java | 2 +- .../system/req/DictItemDeleteRequest.java | 2 +- .../system/req/DictItemFindRequest.java | 2 +- .../module/system/req/DictItemGetRequest.java | 2 +- .../system/req/DictItemUpdateRequest.java | 2 +- .../module/system/req/DictLoadRequest.java | 2 +- .../module/system/req/DictUpdateRequest.java | 2 +- .../system/req/ResourceCreateRequest.java | 36 +- .../system/req/ResourceDeleteRequest.java | 2 +- .../system/req/ResourceFindRequest.java | 2 +- .../module/system/req/ResourceGetRequest.java | 2 +- .../system/req/ResourceUpdateRequest.java | 36 +- .../system/req/RoleResourceCreateRequest.java | 44 +++ .../system/req/RoleResourceDeleteRequest.java | 28 ++ .../system/req/RoleResourceFindRequest.java | 39 ++ .../system/req/RoleResourceGetRequest.java | 28 ++ .../system/req/RoleResourceUpdateRequest.java | 58 +++ .../module/system/req/TokensBuildRequest.java | 2 +- .../system/req/TokensCreateRequest.java | 2 +- .../system/req/TokensDeleteRequest.java | 2 +- .../module/system/req/TokensFindRequest.java | 2 +- .../module/system/req/TokensGetRequest.java | 2 +- .../system/req/TokensUpdateRequest.java | 2 +- .../module/system/req/UserCreateRequest.java | 132 +++++++ .../module/system/req/UserDeleteRequest.java | 28 ++ .../module/system/req/UserFindRequest.java | 106 +++++ .../module/system/req/UserGetRequest.java | 28 ++ .../module/system/req/UserLoginRequest.java | 4 +- .../system/req/UserRoleCreateRequest.java | 44 +++ .../system/req/UserRoleDeleteRequest.java | 28 ++ .../system/req/UserRoleFindRequest.java | 39 ++ .../module/system/req/UserRoleGetRequest.java | 28 ++ .../system/req/UserRoleUpdateRequest.java | 58 +++ .../module/system/req/UserUpdateRequest.java | 146 +++++++ .../module/system/rsp/DeptCreateResponse.java | 26 ++ .../module/system/rsp/DeptDeleteResponse.java | 26 ++ .../module/system/rsp/DeptFindResponse.java | 14 + .../module/system/rsp/DeptGetResponse.java | 27 ++ .../module/system/rsp/DeptUpdateResponse.java | 26 ++ .../module/system/rsp/DictCreateResponse.java | 2 +- .../module/system/rsp/DictDeleteResponse.java | 2 +- .../module/system/rsp/DictFindResponse.java | 2 +- .../module/system/rsp/DictGetResponse.java | 2 +- .../system/rsp/DictItemCreateResponse.java | 2 +- .../system/rsp/DictItemDeleteResponse.java | 2 +- .../system/rsp/DictItemFindResponse.java | 2 +- .../system/rsp/DictItemGetResponse.java | 2 +- .../system/rsp/DictItemUpdateResponse.java | 2 +- .../module/system/rsp/DictLoadResponse.java | 2 +- .../module/system/rsp/DictUpdateResponse.java | 2 +- .../system/rsp/ResourceCreateResponse.java | 2 +- .../system/rsp/ResourceDeleteResponse.java | 2 +- .../system/rsp/ResourceFindResponse.java | 2 +- .../system/rsp/ResourceGetResponse.java | 2 +- .../system/rsp/ResourceUpdateResponse.java | 2 +- .../rsp/RoleResourceCreateResponse.java | 26 ++ .../rsp/RoleResourceDeleteResponse.java | 26 ++ .../system/rsp/RoleResourceFindResponse.java | 14 + .../system/rsp/RoleResourceGetResponse.java | 27 ++ .../rsp/RoleResourceUpdateResponse.java | 26 ++ .../system/rsp/TokensBuildResponse.java | 2 +- .../system/rsp/TokensCreateResponse.java | 2 +- .../system/rsp/TokensDeleteResponse.java | 2 +- .../module/system/rsp/TokensFindResponse.java | 2 +- .../module/system/rsp/TokensGetResponse.java | 2 +- .../system/rsp/TokensUpdateResponse.java | 2 +- .../module/system/rsp/UserCreateResponse.java | 26 ++ .../module/system/rsp/UserDeleteResponse.java | 26 ++ .../module/system/rsp/UserFindResponse.java | 14 + .../module/system/rsp/UserGetResponse.java | 27 ++ .../module/system/rsp/UserLoginResponse.java | 2 +- .../system/rsp/UserRoleCreateResponse.java | 26 ++ .../system/rsp/UserRoleDeleteResponse.java | 26 ++ .../system/rsp/UserRoleFindResponse.java | 14 + .../system/rsp/UserRoleGetResponse.java | 27 ++ .../system/rsp/UserRoleUpdateResponse.java | 26 ++ .../module/system/rsp/UserUpdateResponse.java | 26 ++ ...LL_TABLE_MySQL.sql => MySQL_ALL_TABLE.sql} | 0 .../system/{DICT_MySQL.sql => MySQL_DICT.sql} | 0 ...ICT_ITEM_MySQL.sql => MySQL_DICT_ITEM.sql} | 0 .../system/{FILE_MySQL.sql => MySQL_FILE.sql} | 0 ...{RESOURCE_MySQL.sql => MySQL_RESOURCE.sql} | 6 +- .../{TOKENS_MySQL.sql => MySQL_TOKENS.sql} | 0 ..._TABLE_Oracle.sql => Oracle_ALL_TABLE.sql} | 0 .../{DICT_Oracle.sql => Oracle_DICT.sql} | 0 ...T_ITEM_Oracle.sql => Oracle_DICT_ITEM.sql} | 0 .../{FILE_Oracle.sql => Oracle_FILE.sql} | 0 ..._TABLE_SQLite.sql => SQLite_ALL_TABLE.sql} | 0 .../{DICT_SQLite.sql => SQLite_DICT.sql} | 0 ...T_ITEM_SQLite.sql => SQLite_DICT_ITEM.sql} | 0 .../{FILE_SQLite.sql => SQLite_FILE.sql} | 0 .../SpringBoot/resources/dbtool/wadmin.xml | 108 +++--- .../resources/templates/control/nav.ftl | 20 +- .../resources/templates/screen/module/mgr.ftl | 1 + .../templates/screen/module/system/dept.ftl | 8 +- .../templates/screen/module/system/dict.ftl | 1 + .../screen/module/system/dictItem.ftl | 1 + .../templates/screen/module/system/file.ftl | 1 + .../screen/module/system/resource.ftl | 57 ++- .../templates/screen/module/system/role.ftl | 1 + .../templates/screen/module/system/tokens.ftl | 1 + .../templates/screen/module/system/user.ftl | 1 + .../SpringBoot/test/system/DictItemTest.java | 12 +- .../SpringBoot/test/system/DictTest.java | 2 +- .../SpringBoot/test/system/FileTest.java | 2 +- .../SpringBoot/test/system/ResourceTest.java | 12 +- .../SpringBoot/test/system/TokensTest.java | 12 +- .../modules/SpringBoot/test/test.ftl | 12 +- 167 files changed, 2902 insertions(+), 385 deletions(-) delete mode 100644 src/main/resources/modules/SpringBoot/java/action/ajax/system/AuthAjax.java delete mode 100644 src/main/resources/modules/SpringBoot/java/action/api/system/AuthApi.java rename src/main/resources/modules/SpringBoot/java/module/mpr/{mapper.ftl => MySQL_mapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/mpr/{mapper_nosys.ftl => Nosys_mapper.xml} (100%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/mpr/Oracle_mapper.xml create mode 100644 src/main/resources/modules/SpringBoot/java/module/mpr/SQLite_mapper.xml rename src/main/resources/modules/SpringBoot/java/module/mpr/{mapperJava.ftl => mapper.java} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{DictItemMapper_MySQL.xml => MySQL_DictItemMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{DictMapper_MySQL.xml => MySQL_DictMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{FileMapper_MySQL.xml => MySQL_FileMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{ResourceMapper_MySQL.xml => MySQL_ResourceMapper.xml} (84%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{RoleMapper_MySQL.xml => MySQL_RoleMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{RoleResourceMapper_MySQL.xml => MySQL_RoleResourceMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{TokensMapper_MySQL.xml => MySQL_TokensMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{UserMapper_MySQL.xml => MySQL_UserMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{UserRoleMapper_MySQL.xml => MySQL_UserRoleMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{DictItemMapper_Oracle.xml => Oracle_DictItemMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{DictMapper_Oracle.xml => Oracle_DictMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{FileMapper_Oracle.xml => Oracle_FileMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{DictItemMapper_SQLite.xml => SQLite_DictItemMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{DictMapper_SQLite.xml => SQLite_DictMapper.xml} (100%) rename src/main/resources/modules/SpringBoot/java/module/system/mpr/{FileMapper_SQLite.xml => SQLite_FileMapper.xml} (100%) create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/DeptCreateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/DeptDeleteRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/DeptFindRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/DeptGetRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/DeptUpdateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceCreateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceDeleteRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceFindRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceGetRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceUpdateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserCreateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserDeleteRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserFindRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserGetRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleCreateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleDeleteRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleFindRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleGetRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleUpdateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptCreateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptDeleteResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptFindResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptGetResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptUpdateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceCreateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceDeleteResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceFindResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceGetResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceUpdateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserCreateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserDeleteResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserFindResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserGetResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleCreateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleDeleteResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleFindResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleGetResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleUpdateResponse.java create mode 100644 src/main/resources/modules/SpringBoot/java/module/system/rsp/UserUpdateResponse.java rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{ALL_TABLE_MySQL.sql => MySQL_ALL_TABLE.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{DICT_MySQL.sql => MySQL_DICT.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{DICT_ITEM_MySQL.sql => MySQL_DICT_ITEM.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{FILE_MySQL.sql => MySQL_FILE.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{RESOURCE_MySQL.sql => MySQL_RESOURCE.sql} (85%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{TOKENS_MySQL.sql => MySQL_TOKENS.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{ALL_TABLE_Oracle.sql => Oracle_ALL_TABLE.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{DICT_Oracle.sql => Oracle_DICT.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{DICT_ITEM_Oracle.sql => Oracle_DICT_ITEM.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{FILE_Oracle.sql => Oracle_FILE.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{ALL_TABLE_SQLite.sql => SQLite_ALL_TABLE.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{DICT_SQLite.sql => SQLite_DICT.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{DICT_ITEM_SQLite.sql => SQLite_DICT_ITEM.sql} (100%) rename src/main/resources/modules/SpringBoot/resources/dbtool/system/{FILE_SQLite.sql => SQLite_FILE.sql} (100%) diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java index a0dc33e5..a827d25e 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java @@ -312,12 +312,13 @@ public class SpringBootCallable implements Callable { for (Table table : md.getTables()) { ctx.put("table", table); - freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".java"), option + "/java/module/mpr/mapperJava.ftl", ctx); + freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".java"), option + "/java/module/mpr/mapper.java", ctx); if (table.getSys()) { - freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), option + "/java/module/mpr/mapper.ftl", ctx); +// freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), dataBase.name() + "_" + Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), option + "/java/module/mpr/" + dataBase.name() + "_mapper.xml", ctx); + freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), option + "/java/module/mpr/" + dataBase.name() + "_mapper.xml", ctx); } else { - freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), option + "/java/module/mpr/mapper_nosys.ftl", ctx); + freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), option + "/java/module/mpr/Nosys_mapper.ftl", ctx); } } } @@ -477,8 +478,10 @@ public class SpringBootCallable implements Callable { for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/java/module/system/mpr/")) { if (name.endsWith(".java")) { freeMarkerManager.outputTemp(Tool.createFile(mpr.getAbsolutePath(), name), option + "/java/module/system/mpr/" + name, ctx); - } else if (name.contains(dataBase.toString())) { - freeMarkerManager.outputTemp(Tool.createFile(mpr.getAbsolutePath(), name.replaceAll("_" + dataBase.toString(), "")), option + "/java/module/system/mpr/" + name, ctx); + } else if (name.contains(dataBase.name())) { + //todo dateBase调试 +// freeMarkerManager.outputTemp(Tool.createFile(mpr.getAbsolutePath(), name), option + "/java/module/system/mpr/" + name, ctx); + freeMarkerManager.outputTemp(Tool.createFile(mpr.getAbsolutePath(), name.replaceAll(dataBase.name() + "_", "")), option + "/java/module/system/mpr/" + name, ctx); } } @@ -610,16 +613,18 @@ public class SpringBootCallable implements Callable { File tableDir = Tool.createPath(dbtool.getAbsolutePath(), module.getModuleName() + "_table"); for (Table table : module.getTables()) { ctx.put("table", table); - freeMarkerManager.outputTemp(Tool.createFile(tableDir.getAbsolutePath(), table.getTableName() + ".sql"), option + "/resources/dbtool/table.ftl", ctx); + freeMarkerManager.outputTemp(Tool.createFile(tableDir.getAbsolutePath(), dataBase.name() + "_" + table.getTableName() + ".sql"), option + "/resources/dbtool/table.ftl", ctx); } - freeMarkerManager.outputTemp(Tool.createFile(tableDir.getAbsolutePath(), "ALL_TABLE.sql"), option + "/resources/dbtool/tableAll.ftl", ctx); + freeMarkerManager.outputTemp(Tool.createFile(tableDir.getAbsolutePath(), dataBase.name() + "_ALL_TABLE" + ".sql"), option + "/resources/dbtool/tableAll.ftl", ctx); } if (project.getSysMD()) {//生成系统模块 File system = Tool.createPath(dbtool.getAbsolutePath(), "system_table"); for (String name : ResourceUtil.getResourceFiles("/modules/SpringBoot/resources/dbtool/system/")) { - freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), name), option + "/resources/dbtool/system/" + name, ctx); + if (name.contains(dataBase.name())) { + freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), name), option + "/resources/dbtool/system/" + name, ctx); + } } } diff --git a/src/main/resources/modules/SpringBoot/java/action/GlobalController.java b/src/main/resources/modules/SpringBoot/java/action/GlobalController.java index 8453d3fe..bd988f06 100644 --- a/src/main/resources/modules/SpringBoot/java/action/GlobalController.java +++ b/src/main/resources/modules/SpringBoot/java/action/GlobalController.java @@ -47,7 +47,7 @@ import java.util.regex.Pattern; * * @author author * @version 0.0.1 - * @since 2019-06-16 + * @since 2017-01-01 */ @Controller @ControllerAdvice diff --git a/src/main/resources/modules/SpringBoot/java/action/ajax/system/AuthAjax.java b/src/main/resources/modules/SpringBoot/java/action/ajax/system/AuthAjax.java deleted file mode 100644 index e618b024..00000000 --- a/src/main/resources/modules/SpringBoot/java/action/ajax/system/AuthAjax.java +++ /dev/null @@ -1,134 +0,0 @@ -package ${basePackage}.action.ajax.system; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import ${basePackage}.frame.auth.LocalData; -import ${basePackage}.frame.base.ErrorType; -import ${basePackage}.frame.utils.CookieUtil; -import ${basePackage}.frame.utils.MD5Util; -import ${basePackage}.frame.utils.RequestUtil; -import ${basePackage}.frame.utils.ValidationUtil; -import ${basePackage}.module.system.ent.User; -import ${basePackage}.module.system.mgr.TokensManager; -import ${basePackage}.module.system.mgr.UserManager; -import ${basePackage}.module.system.req.AuthLoginRequest; -import ${basePackage}.module.system.req.TokensCreateRequest; -import ${basePackage}.module.system.req.UserFindRequest; -import ${basePackage}.module.system.rsp.AuthLoginResponse; -import ${basePackage}.module.system.rsp.TokensCreateResponse; -import ${basePackage}.module.system.rsp.UserFindResponse; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Calendar; -import java.util.Date; -import java.util.UUID; - -public class AuthAjax { - @Value("${r'${web.url.auth.admin}'}") - private String admin; - @Value("${r'${web.url.auth.pwd}'}") - private String pwd; - @Autowired - private TokensManager tokensManager; - @Autowired - private UserManager userManager; - - public AuthLoginResponse login(AuthLoginRequest request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { - AuthLoginResponse response = new AuthLoginResponse(); - - ValidationUtil.validate(request, response); - if (response.hasError()) { - return response; - } - - if (request.getUsername().equals(admin)) {//超级管理员登录 - String generatePwd = MD5Util.generatePwd(request.getPassword()); - if (!generatePwd.equals(pwd)) { - response.addError(ErrorType.BUSINESS_ERROR, "登录密码错误"); - } else { - Date current = new Date(); - Calendar instance = Calendar.getInstance(); - instance.setTime(current); - instance.add(Calendar.HOUR_OF_DAY, 1);//默认一个小时内有效 - - TokensCreateRequest tokensCreateRequest = new TokensCreateRequest(); - tokensCreateRequest.setToken(UUID.randomUUID().toString()); - tokensCreateRequest.setUserId(0L); - tokensCreateRequest.setUserName("超级管理员"); - tokensCreateRequest.setLoginTime(current); - tokensCreateRequest.setValidTime(instance.getTime()); - tokensCreateRequest.setValid(true); - tokensCreateRequest.setDeptId(null); - tokensCreateRequest.setDeptCode(null); - tokensCreateRequest.setDeptName(null); - tokensCreateRequest.setTerminalType("WEB"); - tokensCreateRequest.setTerminalIp(RequestUtil.getIp(httpServletRequest)); - tokensCreateRequest.setTerminalInfo(RequestUtil.getUserAgent(httpServletRequest)); - TokensCreateResponse tokensCreateResponse = tokensManager.create(tokensCreateRequest, LocalData.getSysToken()); - - if (tokensCreateResponse.hasError()) { - response.addErrors(tokensCreateResponse.getErrors()); - return response; - } - Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken()); - cookie.setPath("/"); - httpServletResponse.addCookie(cookie); - } - } else {//管理员登录 - UserFindRequest userFindRequest = new UserFindRequest(); - userFindRequest.setUserName(request.getUsername()); - UserFindResponse userFindResponse = userManager.find(userFindRequest, LocalData.getSysToken()); - - if (userFindResponse.hasError()) { - response.addErrors(userFindResponse.getErrors()); - return response; - } else if (userFindResponse.getResult().size() == 0) { - response.addError(ErrorType.BUSINESS_ERROR, "用户名或密码错误!"); - return response; - } else if (userFindResponse.getResult().size() > 1) { - response.addError(ErrorType.BUSINESS_ERROR, "用户信息异常!"); - return response; - } - - User user = userFindResponse.getResult().get(0); - - String generatePwd = MD5Util.generatePwd(request.getPassword()); - if (!generatePwd.equals(user.getUserPwd())) { - response.addError(ErrorType.BUSINESS_ERROR, "用户名或密码错误!"); - return response; - } - - Date current = new Date(); - Calendar instance = Calendar.getInstance(); - instance.setTime(current); - instance.add(Calendar.HOUR_OF_DAY, 1);//默认一个小时内有效 - - TokensCreateRequest tokensCreateRequest = new TokensCreateRequest(); - tokensCreateRequest.setToken(UUID.randomUUID().toString()); - tokensCreateRequest.setUserId(user.getId()); - tokensCreateRequest.setUserName(user.getUserName()); - tokensCreateRequest.setLoginTime(current); - tokensCreateRequest.setValidTime(instance.getTime()); - tokensCreateRequest.setValid(true); - tokensCreateRequest.setDeptId(user.getDeptId()); - tokensCreateRequest.setDeptCode(user.getDeptCode()); - tokensCreateRequest.setDeptName(user.getDeptName()); - tokensCreateRequest.setTerminalType("WEB"); - tokensCreateRequest.setTerminalIp(RequestUtil.getIp(httpServletRequest)); - tokensCreateRequest.setTerminalInfo(RequestUtil.getUserAgent(httpServletRequest)); - TokensCreateResponse tokensCreateResponse = tokensManager.create(tokensCreateRequest, LocalData.getSysToken()); - - if (tokensCreateResponse.hasError()) { - response.addErrors(tokensCreateResponse.getErrors()); - return response; - } - Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken()); - cookie.setPath("/"); - httpServletResponse.addCookie(cookie); - } - - return response; - } -} diff --git a/src/main/resources/modules/SpringBoot/java/action/ajax/system/UserAjax.java b/src/main/resources/modules/SpringBoot/java/action/ajax/system/UserAjax.java index 62ee84ef..6ef49692 100644 --- a/src/main/resources/modules/SpringBoot/java/action/ajax/system/UserAjax.java +++ b/src/main/resources/modules/SpringBoot/java/action/ajax/system/UserAjax.java @@ -2,35 +2,56 @@ package ${basePackage}.action.ajax.system; import com.fasterxml.jackson.core.TreeNode; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.multipart.MultipartFile; -import ${basePackage}.frame.excel.WSheet; -import ${basePackage}.frame.utils.LogUtil; import ${basePackage}.frame.auth.LocalData; +import ${basePackage}.frame.base.BaseResponse; import ${basePackage}.frame.base.ErrorType; +import ${basePackage}.frame.excel.WSheet; +import ${basePackage}.frame.excel.exception.ReadErrorException; +import ${basePackage}.frame.excel.exception.TemplateNotMatchException; +import ${basePackage}.frame.utils.CookieUtil; +import ${basePackage}.frame.utils.LogUtil; +import ${basePackage}.frame.utils.MD5Util; import ${basePackage}.frame.utils.MapperUtil; -import ${basePackage}.frame.base.BaseResponse; +import ${basePackage}.frame.utils.RequestUtil; import ${basePackage}.frame.utils.ResponseUtil; import ${basePackage}.frame.utils.ValidationUtil; -import ${basePackage}.frame.excel.exception.ReadErrorException; -import ${basePackage}.frame.excel.exception.TemplateNotMatchException; import ${basePackage}.module.system.ent.User; +import ${basePackage}.module.system.mgr.TokensManager; import ${basePackage}.module.system.mgr.UserManager; +import ${basePackage}.module.system.req.TokensCreateRequest; import ${basePackage}.module.system.req.UserCreateRequest; import ${basePackage}.module.system.req.UserDeleteRequest; import ${basePackage}.module.system.req.UserFindRequest; import ${basePackage}.module.system.req.UserGetRequest; +import ${basePackage}.module.system.req.UserLoginRequest; import ${basePackage}.module.system.req.UserUpdateRequest; +import ${basePackage}.module.system.rsp.TokensCreateResponse; import ${basePackage}.module.system.rsp.UserCreateResponse; import ${basePackage}.module.system.rsp.UserDeleteResponse; import ${basePackage}.module.system.rsp.UserFindResponse; import ${basePackage}.module.system.rsp.UserGetResponse; +import ${basePackage}.module.system.rsp.UserLoginResponse; import ${basePackage}.module.system.rsp.UserUpdateResponse; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.Calendar; +import java.util.Date; import java.util.List; +import java.util.UUID; public class UserAjax{ + @Value("${r'${web.url.auth.admin}'}") + private String admin; + @Value("${r'${web.url.auth.pwd}'}") + private String pwd; + @Autowired + private TokensManager tokensManager; @Autowired private UserManager userManager; @@ -54,6 +75,103 @@ public class UserAjax{ return userManager.get(request, LocalData.getToken()); } + public UserLoginResponse login(UserLoginRequest request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { + UserLoginResponse response = new UserLoginResponse(); + + ValidationUtil.validate(request, response); + if (response.hasError()) { + return response; + } + + if (request.getUsername().equals(admin)) {//超级管理员登录 + String generatePwd = MD5Util.generatePwd(request.getPassword()); + if (!generatePwd.equals(pwd)) { + response.addError(ErrorType.BUSINESS_ERROR, "登录密码错误"); + } else { + Date current = new Date(); + Calendar instance = Calendar.getInstance(); + instance.setTime(current); + instance.add(Calendar.HOUR_OF_DAY, 1);//默认一个小时内有效 + + TokensCreateRequest tokensCreateRequest = new TokensCreateRequest(); + tokensCreateRequest.setToken(UUID.randomUUID().toString()); + tokensCreateRequest.setUserId(0L); + tokensCreateRequest.setUserName("超级管理员"); + tokensCreateRequest.setLoginTime(current); + tokensCreateRequest.setValidTime(instance.getTime()); + tokensCreateRequest.setValid(true); + tokensCreateRequest.setDeptId(null); + tokensCreateRequest.setDeptCode(null); + tokensCreateRequest.setDeptName(null); + tokensCreateRequest.setTerminalType("WEB"); + tokensCreateRequest.setTerminalIp(RequestUtil.getIp(httpServletRequest)); + tokensCreateRequest.setTerminalInfo(RequestUtil.getUserAgent(httpServletRequest)); + TokensCreateResponse tokensCreateResponse = tokensManager.create(tokensCreateRequest, LocalData.getSysToken()); + + if (tokensCreateResponse.hasError()) { + response.addErrors(tokensCreateResponse.getErrors()); + return response; + } + Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken()); + cookie.setPath("/"); + httpServletResponse.addCookie(cookie); + } + } else {//管理员登录 + UserFindRequest userFindRequest = new UserFindRequest(); + userFindRequest.setUserName(request.getUsername()); + UserFindResponse userFindResponse = userManager.find(userFindRequest, LocalData.getSysToken()); + + if (userFindResponse.hasError()) { + response.addErrors(userFindResponse.getErrors()); + return response; + } else if (userFindResponse.getResult().size() == 0) { + response.addError(ErrorType.BUSINESS_ERROR, "用户名或密码错误!"); + return response; + } else if (userFindResponse.getResult().size() > 1) { + response.addError(ErrorType.BUSINESS_ERROR, "用户信息异常!"); + return response; + } + + User user = userFindResponse.getResult().get(0); + + String generatePwd = MD5Util.generatePwd(request.getPassword()); + if (!generatePwd.equals(user.getUserPwd())) { + response.addError(ErrorType.BUSINESS_ERROR, "用户名或密码错误!"); + return response; + } + + Date current = new Date(); + Calendar instance = Calendar.getInstance(); + instance.setTime(current); + instance.add(Calendar.HOUR_OF_DAY, 1);//默认一个小时内有效 + + TokensCreateRequest tokensCreateRequest = new TokensCreateRequest(); + tokensCreateRequest.setToken(UUID.randomUUID().toString()); + tokensCreateRequest.setUserId(user.getId()); + tokensCreateRequest.setUserName(user.getUserName()); + tokensCreateRequest.setLoginTime(current); + tokensCreateRequest.setValidTime(instance.getTime()); + tokensCreateRequest.setValid(true); + tokensCreateRequest.setDeptId(user.getDeptId()); + tokensCreateRequest.setDeptCode(user.getDeptCode()); + tokensCreateRequest.setDeptName(user.getDeptName()); + tokensCreateRequest.setTerminalType("WEB"); + tokensCreateRequest.setTerminalIp(RequestUtil.getIp(httpServletRequest)); + tokensCreateRequest.setTerminalInfo(RequestUtil.getUserAgent(httpServletRequest)); + TokensCreateResponse tokensCreateResponse = tokensManager.create(tokensCreateRequest, LocalData.getSysToken()); + + if (tokensCreateResponse.hasError()) { + response.addErrors(tokensCreateResponse.getErrors()); + return response; + } + Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken()); + cookie.setPath("/"); + httpServletResponse.addCookie(cookie); + } + + return response; + } + public Object template(){ return ResponseUtil.apply(new WSheet<>(User.class)); } diff --git a/src/main/resources/modules/SpringBoot/java/action/api/system/AuthApi.java b/src/main/resources/modules/SpringBoot/java/action/api/system/AuthApi.java deleted file mode 100644 index 5bcb8804..00000000 --- a/src/main/resources/modules/SpringBoot/java/action/api/system/AuthApi.java +++ /dev/null @@ -1,23 +0,0 @@ -package ${basePackage}.action.api.system; - -import ${basePackage}.module.system.req.AuthLoginRequest; -import ${basePackage}.module.system.rsp.AuthLoginResponse; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class AuthApi { - - public AuthLoginResponse login(AuthLoginRequest request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { - AuthLoginResponse response = new AuthLoginResponse(); - - // todo 设置cookie - Cookie token = new Cookie("token", ""); - token.setDomain(httpServletRequest.getServerName()); - token.setPath("/"); - httpServletResponse.addCookie(token); - - return response; - } -} diff --git a/src/main/resources/modules/SpringBoot/java/action/api/system/UserApi.java b/src/main/resources/modules/SpringBoot/java/action/api/system/UserApi.java index 85bfaee0..c5242286 100644 --- a/src/main/resources/modules/SpringBoot/java/action/api/system/UserApi.java +++ b/src/main/resources/modules/SpringBoot/java/action/api/system/UserApi.java @@ -1,13 +1,38 @@ package ${basePackage}.action.api.system; +import org.springframework.beans.factory.annotation.Autowired; import ${basePackage}.frame.auth.LocalData; +import ${basePackage}.frame.base.ErrorType; +import ${basePackage}.frame.utils.MD5Util; +import ${basePackage}.frame.utils.RequestUtil; +import ${basePackage}.frame.utils.ValidationUtil; +import ${basePackage}.module.system.ent.User; +import ${basePackage}.module.system.mgr.TokensManager; import ${basePackage}.module.system.mgr.UserManager; -import ${basePackage}.module.system.req.*; -import ${basePackage}.module.system.rsp.*; -import org.springframework.beans.factory.annotation.Autowired; +import ${basePackage}.module.system.req.TokensCreateRequest; +import ${basePackage}.module.system.req.UserCreateRequest; +import ${basePackage}.module.system.req.UserDeleteRequest; +import ${basePackage}.module.system.req.UserFindRequest; +import ${basePackage}.module.system.req.UserGetRequest; +import ${basePackage}.module.system.req.UserLoginRequest; +import ${basePackage}.module.system.req.UserUpdateRequest; +import ${basePackage}.module.system.rsp.TokensCreateResponse; +import ${basePackage}.module.system.rsp.UserCreateResponse; +import ${basePackage}.module.system.rsp.UserDeleteResponse; +import ${basePackage}.module.system.rsp.UserFindResponse; +import ${basePackage}.module.system.rsp.UserGetResponse; +import ${basePackage}.module.system.rsp.UserLoginResponse; +import ${basePackage}.module.system.rsp.UserUpdateResponse; + +import javax.servlet.http.HttpServletRequest; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; public class UserApi{ + @Autowired + private TokensManager tokensManager; @Autowired private UserManager userManager; @@ -30,4 +55,63 @@ public class UserApi{ public UserGetResponse get(UserGetRequest request) { return userManager.get(request, LocalData.getToken()); } + + public UserLoginResponse login(UserLoginRequest request, HttpServletRequest httpServletRequest) { + UserLoginResponse response = new UserLoginResponse(); + + ValidationUtil.validate(request, response); + if (response.hasError()) { + return response; + } + + UserFindRequest userFindRequest = new UserFindRequest(); + userFindRequest.setUserName(request.getUsername()); + UserFindResponse userFindResponse = userManager.find(userFindRequest, LocalData.getSysToken()); + + if (userFindResponse.hasError()) { + response.addErrors(userFindResponse.getErrors()); + return response; + } else if (userFindResponse.getResult().size() == 0) { + response.addError(ErrorType.BUSINESS_ERROR, "用户名或密码错误!"); + return response; + } else if (userFindResponse.getResult().size() > 1) { + response.addError(ErrorType.BUSINESS_ERROR, "用户信息异常!"); + return response; + } + + User user = userFindResponse.getResult().get(0); + + String generatePwd = MD5Util.generatePwd(request.getPassword()); + if (!generatePwd.equals(user.getUserPwd())) { + response.addError(ErrorType.BUSINESS_ERROR, "用户名或密码错误!"); + return response; + } + + Date current = new Date(); + Calendar instance = Calendar.getInstance(); + instance.setTime(current); + instance.add(Calendar.HOUR_OF_DAY, 1);//默认一个小时内有效 + + TokensCreateRequest tokensCreateRequest = new TokensCreateRequest(); + tokensCreateRequest.setToken(UUID.randomUUID().toString()); + tokensCreateRequest.setUserId(user.getId()); + tokensCreateRequest.setUserName(user.getUserName()); + tokensCreateRequest.setLoginTime(current); + tokensCreateRequest.setValidTime(instance.getTime()); + tokensCreateRequest.setValid(true); + tokensCreateRequest.setDeptId(user.getDeptId()); + tokensCreateRequest.setDeptCode(user.getDeptCode()); + tokensCreateRequest.setDeptName(user.getDeptName()); + tokensCreateRequest.setTerminalType("WEB"); + tokensCreateRequest.setTerminalIp(RequestUtil.getIp(httpServletRequest)); + tokensCreateRequest.setTerminalInfo(RequestUtil.getUserAgent(httpServletRequest)); + TokensCreateResponse tokensCreateResponse = tokensManager.create(tokensCreateRequest, LocalData.getSysToken()); + + if (tokensCreateResponse.hasError()) { + response.addErrors(tokensCreateResponse.getErrors()); + return response; + } + + return response; + } } diff --git a/src/main/resources/modules/SpringBoot/java/module/mpr/mapper.ftl b/src/main/resources/modules/SpringBoot/java/module/mpr/MySQL_mapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/mpr/mapper.ftl rename to src/main/resources/modules/SpringBoot/java/module/mpr/MySQL_mapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/mpr/mapper_nosys.ftl b/src/main/resources/modules/SpringBoot/java/module/mpr/Nosys_mapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/mpr/mapper_nosys.ftl rename to src/main/resources/modules/SpringBoot/java/module/mpr/Nosys_mapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/mpr/Oracle_mapper.xml b/src/main/resources/modules/SpringBoot/java/module/mpr/Oracle_mapper.xml new file mode 100644 index 00000000..26c10db0 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/mpr/Oracle_mapper.xml @@ -0,0 +1,364 @@ + + + + +<#if dataBase == 'Oracle'> + "${module.modulePrefix?default("")}${table.tableName}" +<#elseif dataBase='MySQL'> + `${module.modulePrefix?default("")}${table.tableName}` +<#elseif dataBase='SQLite'> + "${module.modulePrefix?default("")}${table.tableName}" + + + + <#if dataBase == 'Oracle'> + <#list table.fields as f>"${f.fieldName}"<#if f_has_next>, + <#elseif dataBase='MySQL'> + <#list table.fields as f>`${f.fieldName}`<#if f_has_next>, + <#elseif dataBase='SQLite'> + <#list table.fields as f>"${f.fieldName}"<#if f_has_next>, + + + + + <#list table.fields as f> + + + + + + + + + + INSERT INTO + + ( + + ) + VALUES + ( + ${r"#{"}request.id}, + <#list table.fields as f> + <#if !f.isSystem> + ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + 0, + 0, + ${r"#{"}token.userId,jdbcType=NUMERIC}, + <#if dataBase == 'Oracle'>sysdate<#elseif dataBase == 'MySQL'>sysdate()<#elseif dataBase == 'SQLite'>datetime('now','localtime'), + NULL, + NULL + ) + + + + INSERT INTO + + ( + + ) + VALUES + + ( + ${r"#{"}item.id}, + <#list table.fields as f> + <#if !f.isSystem> + ${r"#{"}item.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + 0, + 0, + ${r"#{"}token.userId,jdbcType=NUMERIC}, + <#if dataBase == 'Oracle'>sysdate<#elseif dataBase == 'MySQL'>sysdate()<#elseif dataBase == 'SQLite'>datetime('now','localtime'), + NULL, + NULL + ) + + + + + UPDATE + + <#if dataBase == 'Oracle'> + SET "IS_DELETED" = 1 + WHERE "IS_DELETED" = 0 + AND "ID" = ${r"#{"}request.id} + <#elseif dataBase='MySQL'> + SET `IS_DELETED` = 1 + WHERE `IS_DELETED` = 0 + AND `ID` = ${r"#{"}request.id} + + + + + UPDATE + + SET + <#if dataBase == 'Oracle'> + <#list table.fields as f> + <#if !f.isPrimaryKey> + <#if !f.isSystem || f.fieldName == 'ID'> + "${f.fieldName}" = ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + + "ROW_VERSION" = "ROW_VERSION" + 1, + "LAST_UPDATE_BY" = ${r"#{"}token.userId}, + "LAST_UPDATE_TIME" = sysdate + <#elseif dataBase='MySQL'> + <#list table.fields as f> + <#if !f.isPrimaryKey> + <#if !f.isSystem || f.fieldName == 'ID'> + `${f.fieldName}` = ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + + `ROW_VERSION` = `ROW_VERSION` + 1, + `LAST_UPDATE_BY` = ${r"#{"}token.userId}, + `LAST_UPDATE_TIME` = sysdate() + <#elseif dataBase='SQLite'> + <#list table.fields as f> + <#if !f.isPrimaryKey> + <#if !f.isSystem || f.fieldName == 'ID'> + ${f.fieldName} = ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + + ROW_VERSION = ROW_VERSION + 1, + LAST_UPDATE_BY = ${r"#{"}token.userId}, + LAST_UPDATE_TIME = datetime('now','localtime') + + WHERE + <#if dataBase == 'Oracle'> + "IS_DELETED" = 0 + AND "ID" = ${r"#{"}request.id} + AND "ROW_VERSION" = ${r"#{"}request.rowVersion} + <#elseif dataBase='MySQL'> + `IS_DELETED` = 0 + AND `ID` = ${r"#{"}request.id} + AND `ROW_VERSION` = ${r"#{"}request.rowVersion} + <#elseif dataBase='SQLite'> + IS_DELETED = 0 + AND ID = ${r"#{"}request.id} + AND ROW_VERSION = ${r"#{"}request.rowVersion} + + + + + \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/mpr/SQLite_mapper.xml b/src/main/resources/modules/SpringBoot/java/module/mpr/SQLite_mapper.xml new file mode 100644 index 00000000..26c10db0 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/mpr/SQLite_mapper.xml @@ -0,0 +1,364 @@ + + + + +<#if dataBase == 'Oracle'> + "${module.modulePrefix?default("")}${table.tableName}" +<#elseif dataBase='MySQL'> + `${module.modulePrefix?default("")}${table.tableName}` +<#elseif dataBase='SQLite'> + "${module.modulePrefix?default("")}${table.tableName}" + + + + <#if dataBase == 'Oracle'> + <#list table.fields as f>"${f.fieldName}"<#if f_has_next>, + <#elseif dataBase='MySQL'> + <#list table.fields as f>`${f.fieldName}`<#if f_has_next>, + <#elseif dataBase='SQLite'> + <#list table.fields as f>"${f.fieldName}"<#if f_has_next>, + + + + + <#list table.fields as f> + + + + + + + + + + INSERT INTO + + ( + + ) + VALUES + ( + ${r"#{"}request.id}, + <#list table.fields as f> + <#if !f.isSystem> + ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + 0, + 0, + ${r"#{"}token.userId,jdbcType=NUMERIC}, + <#if dataBase == 'Oracle'>sysdate<#elseif dataBase == 'MySQL'>sysdate()<#elseif dataBase == 'SQLite'>datetime('now','localtime'), + NULL, + NULL + ) + + + + INSERT INTO + + ( + + ) + VALUES + + ( + ${r"#{"}item.id}, + <#list table.fields as f> + <#if !f.isSystem> + ${r"#{"}item.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + 0, + 0, + ${r"#{"}token.userId,jdbcType=NUMERIC}, + <#if dataBase == 'Oracle'>sysdate<#elseif dataBase == 'MySQL'>sysdate()<#elseif dataBase == 'SQLite'>datetime('now','localtime'), + NULL, + NULL + ) + + + + + UPDATE + + <#if dataBase == 'Oracle'> + SET "IS_DELETED" = 1 + WHERE "IS_DELETED" = 0 + AND "ID" = ${r"#{"}request.id} + <#elseif dataBase='MySQL'> + SET `IS_DELETED` = 1 + WHERE `IS_DELETED` = 0 + AND `ID` = ${r"#{"}request.id} + + + + + UPDATE + + SET + <#if dataBase == 'Oracle'> + <#list table.fields as f> + <#if !f.isPrimaryKey> + <#if !f.isSystem || f.fieldName == 'ID'> + "${f.fieldName}" = ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + + "ROW_VERSION" = "ROW_VERSION" + 1, + "LAST_UPDATE_BY" = ${r"#{"}token.userId}, + "LAST_UPDATE_TIME" = sysdate + <#elseif dataBase='MySQL'> + <#list table.fields as f> + <#if !f.isPrimaryKey> + <#if !f.isSystem || f.fieldName == 'ID'> + `${f.fieldName}` = ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + + `ROW_VERSION` = `ROW_VERSION` + 1, + `LAST_UPDATE_BY` = ${r"#{"}token.userId}, + `LAST_UPDATE_TIME` = sysdate() + <#elseif dataBase='SQLite'> + <#list table.fields as f> + <#if !f.isPrimaryKey> + <#if !f.isSystem || f.fieldName == 'ID'> + ${f.fieldName} = ${r"#{"}request.${f.getFName()},jdbcType=${f.fieldType.jdbcType()}}, + + + + ROW_VERSION = ROW_VERSION + 1, + LAST_UPDATE_BY = ${r"#{"}token.userId}, + LAST_UPDATE_TIME = datetime('now','localtime') + + WHERE + <#if dataBase == 'Oracle'> + "IS_DELETED" = 0 + AND "ID" = ${r"#{"}request.id} + AND "ROW_VERSION" = ${r"#{"}request.rowVersion} + <#elseif dataBase='MySQL'> + `IS_DELETED` = 0 + AND `ID` = ${r"#{"}request.id} + AND `ROW_VERSION` = ${r"#{"}request.rowVersion} + <#elseif dataBase='SQLite'> + IS_DELETED = 0 + AND ID = ${r"#{"}request.id} + AND ROW_VERSION = ${r"#{"}request.rowVersion} + + + + + \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/mpr/mapperJava.ftl b/src/main/resources/modules/SpringBoot/java/module/mpr/mapper.java similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/mpr/mapperJava.ftl rename to src/main/resources/modules/SpringBoot/java/module/mpr/mapper.java diff --git a/src/main/resources/modules/SpringBoot/java/module/rsp/createResponseClass.ftl b/src/main/resources/modules/SpringBoot/java/module/rsp/createResponseClass.ftl index 7672e667..ca007b03 100644 --- a/src/main/resources/modules/SpringBoot/java/module/rsp/createResponseClass.ftl +++ b/src/main/resources/modules/SpringBoot/java/module/rsp/createResponseClass.ftl @@ -13,7 +13,7 @@ public class ${table.getCName()}CreateResponse extends BaseResponse { <#if module.isHasSysFields()> /** - * ID + * 主键 */ private Long id; diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/Dict.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/Dict.java index d3668f44..cb187ac7 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/Dict.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/Dict.java @@ -10,7 +10,7 @@ import ${basePackage}.frame.excel.annotation.SheetName; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ @SheetName("字典") public class Dict extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/DictItem.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/DictItem.java index ef4693b4..705e6056 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/DictItem.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/DictItem.java @@ -10,7 +10,7 @@ import ${basePackage}.frame.excel.annotation.SheetName; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ @SheetName("字典项") public class DictItem extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/File.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/File.java index f93ad898..09ebb059 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/File.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/File.java @@ -10,7 +10,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author author * @version 0.0.1 - * @since 2019-11-29 + * @since 2017-01-01 */ @SheetName("文件") public class File extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java index 1cd56dd3..e5c85ba9 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java @@ -10,7 +10,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ @SheetName("资源") public class Resource extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/Role.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/Role.java index 0da5675d..a4bbf176 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/Role.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/Role.java @@ -10,7 +10,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @SheetName("角色") public class Role extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/RoleResource.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/RoleResource.java index 6c53bd0c..62b4b9bb 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/RoleResource.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/RoleResource.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public class RoleResource extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/Tokens.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/Tokens.java index c5b63538..dfb65481 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/Tokens.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/Tokens.java @@ -11,7 +11,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @SheetName("通行证") public class Tokens extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java index bead020e..2df2bd16 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java @@ -10,7 +10,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @SheetName("用户") public class User extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/UserRole.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/UserRole.java index ba8db64e..00501d4d 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/UserRole.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/UserRole.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseEntity; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public class UserRole extends BaseEntity { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManager.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManager.java index 453bac22..9adf3712 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManager.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.base.Token; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public interface ResourceManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManagerImpl.java index 9fedf654..c0fe1ca3 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResourceManagerImpl.java @@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ @Transactional @Service diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManager.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManager.java index bca5be8f..83c8ecfb 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManager.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.base.Token; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public interface RoleManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java index 1558b3e9..415613e4 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java @@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @Transactional @Service diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManager.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManager.java index c5f4ac65..d9389ff8 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManager.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.base.Token; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public interface RoleResourceManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManagerImpl.java index 64784ca6..7656bce2 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResourceManagerImpl.java @@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @Transactional @Service diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManager.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManager.java index 3f80f533..05cb109b 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManager.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.base.Token; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public interface TokensManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java index 76e7c3bd..9f4120c0 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java @@ -33,12 +33,14 @@ import ${basePackage}.module.system.rsp.TokensUpdateResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ @Transactional @Service public class TokensManagerImpl implements TokensManager { + @Value("${r'${web.url.auth.admin}'}") + private String admin; @Autowired private TokensMapper tokensMapper; diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManager.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManager.java index dd5fdcd0..e0b3d1e9 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManager.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.base.Token; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public interface UserManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java index a0f18fa7..81bf35f4 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java @@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @Transactional @Service diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManager.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManager.java index 6723967c..5751eb19 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManager.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManager.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.base.Token; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public interface UserRoleManager { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java index d38cc8a8..18b20b53 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java @@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ @Transactional @Service diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper.java b/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper.java index 658fd7af..68e65238 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper.java @@ -15,7 +15,7 @@ import java.util.List; * DICT_ITEM - 字典项 * * @author wangbing - * @since 2019-07-20 + * @since 2017-01-01 */ @Mapper public interface DictItemMapper { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper.java b/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper.java index d64c438e..97a230e3 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper.java @@ -11,7 +11,7 @@ import java.util.List; * DICT - 字典 * * @author wangbing - * @since 2019-07-20 + * @since 2017-01-01 */ @Mapper public interface DictMapper { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_DictItemMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_DictItemMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_DictMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_DictMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/FileMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_FileMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/FileMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_FileMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/ResourceMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml similarity index 84% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/ResourceMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml index a2bea16f..80324c2c 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mpr/ResourceMapper_MySQL.xml +++ b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml @@ -7,7 +7,7 @@ `SYS_RESOURCE` - `ID`,`VALUE`,`COMMENT`,`RESOURCE_TYPE`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME` + `ID`,`VALUE`,`COMMENT`,`RESOURCE_TYPE`,`NODE`,`SUP_ID`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME` @@ -15,6 +15,8 @@ + + @@ -40,6 +42,12 @@ AND `RESOURCE_TYPE` = ${r"#"}{request.resourceType} + + AND `NODE` = ${r"#"}{request.node} + + + AND `SUP_ID` = ${r"#"}{request.supId} + AND `VALID` = ${r"#"}{request.valid} @@ -69,6 +77,8 @@ ${r"#"}{request.value,jdbcType=VARCHAR}, ${r"#"}{request.comment,jdbcType=VARCHAR}, ${r"#"}{request.resourceType,jdbcType=VARCHAR}, + ${r"#"}{request.node,jdbcType=BIT}, + ${r"#"}{request.supId,jdbcType=BIGINT}, ${r"#"}{request.valid,jdbcType=BIT}, 0, 0, @@ -92,6 +102,8 @@ ${r"#"}{item.value,jdbcType=VARCHAR}, ${r"#"}{item.comment,jdbcType=VARCHAR}, ${r"#"}{item.resourceType,jdbcType=VARCHAR}, + ${r"#"}{item.node,jdbcType=BIT}, + ${r"#"}{item.supId,jdbcType=BIGINT}, ${r"#"}{item.valid,jdbcType=BIT}, 0, 0, @@ -118,6 +130,8 @@ `VALUE` = ${r"#"}{request.value,jdbcType=VARCHAR}, `COMMENT` = ${r"#"}{request.comment,jdbcType=VARCHAR}, `RESOURCE_TYPE` = ${r"#"}{request.resourceType,jdbcType=VARCHAR}, + `NODE` = ${r"#"}{request.node,jdbcType=BIT}, + `SUP_ID` = ${r"#"}{request.supId,jdbcType=BIGINT}, `VALID` = ${r"#"}{request.valid,jdbcType=BIT}, `ROW_VERSION` = `ROW_VERSION` + 1, `LAST_UPDATE_BY` = ${r"#"}{token.userId}, diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/RoleMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_RoleMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/RoleMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_RoleMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/RoleResourceMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_RoleResourceMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/RoleResourceMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_RoleResourceMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/TokensMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_TokensMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/TokensMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_TokensMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/UserMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/UserMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/UserRoleMapper_MySQL.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserRoleMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/UserRoleMapper_MySQL.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserRoleMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper_Oracle.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/Oracle_DictItemMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper_Oracle.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/Oracle_DictItemMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper_Oracle.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/Oracle_DictMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper_Oracle.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/Oracle_DictMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/FileMapper_Oracle.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/Oracle_FileMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/FileMapper_Oracle.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/Oracle_FileMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper_SQLite.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/SQLite_DictItemMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/DictItemMapper_SQLite.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/SQLite_DictItemMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper_SQLite.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/SQLite_DictMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/DictMapper_SQLite.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/SQLite_DictMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/FileMapper_SQLite.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/SQLite_FileMapper.xml similarity index 100% rename from src/main/resources/modules/SpringBoot/java/module/system/mpr/FileMapper_SQLite.xml rename to src/main/resources/modules/SpringBoot/java/module/system/mpr/SQLite_FileMapper.xml diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DeptCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptCreateRequest.java new file mode 100644 index 00000000..d70cf3bd --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptCreateRequest.java @@ -0,0 +1,102 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.NotEmpty; +import org.hibernate.validator.constraints.Length; + +/** + * DeptCreateRequest - 部门新增 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptCreateRequest extends BaseRequest { + + /** + * 部门代码 + */ + @NotEmpty(message = "[deptCode]部门代码不能为空") + @Length(min = 0, max = 50, message = "[deptCode]部门代码长度不合法(0-50)") + private String deptCode; + + /** + * 部门名称 + */ + @NotEmpty(message = "[deptName]部门名称不能为空") + @Length(min = 0, max = 100, message = "[deptName]部门名称长度不合法(0-100)") + private String deptName; + + /** + * 部门别名 + */ + @Length(min = 0, max = 50, message = "[deptAlias]部门别名长度不合法(0-50)") + private String deptAlias; + + /** + * 父部门代码 + */ + @Length(min = 0, max = 50, message = "[supCode]父部门代码长度不合法(0-50)") + private String supCode; + + /** + * 父部门名称 + */ + @Length(min = 0, max = 100, message = "[supName]父部门名称长度不合法(0-100)") + private String supName; + + /** + * 是否有效 + */ + @NotNull(message = "[valid]是否有效不能为NULL") + private Boolean valid; + + public String getDeptCode() { + return this.deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + public String getDeptName() { + return this.deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getDeptAlias() { + return this.deptAlias; + } + + public void setDeptAlias(String deptAlias) { + this.deptAlias = deptAlias; + } + + public String getSupCode() { + return this.supCode; + } + + public void setSupCode(String supCode) { + this.supCode = supCode; + } + + public String getSupName() { + return this.supName; + } + + public void setSupName(String supName) { + this.supName = supName; + } + + public Boolean getValid() { + return this.valid; + } + + public void setValid(Boolean valid) { + this.valid = valid; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DeptDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptDeleteRequest.java new file mode 100644 index 00000000..6fbe9cb6 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptDeleteRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; + +/** + * DeptDeleteRequest - 部门删除 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptDeleteRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DeptFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptFindRequest.java new file mode 100644 index 00000000..211d7105 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptFindRequest.java @@ -0,0 +1,91 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseFindRequest; + +/** + * DeptRequest - 部门查询 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptFindRequest extends BaseFindRequest { + + /** + * 部门代码 + */ + private String deptCode; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 部门别名 + */ + private String deptAlias; + + /** + * 父部门代码 + */ + private String supCode; + + /** + * 父部门名称 + */ + private String supName; + + /** + * 是否有效 + */ + private Boolean valid; + + public String getDeptCode() { + return this.deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + public String getDeptName() { + return this.deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getDeptAlias() { + return this.deptAlias; + } + + public void setDeptAlias(String deptAlias) { + this.deptAlias = deptAlias; + } + + public String getSupCode() { + return this.supCode; + } + + public void setSupCode(String supCode) { + this.supCode = supCode; + } + + public String getSupName() { + return this.supName; + } + + public void setSupName(String supName) { + this.supName = supName; + } + + public Boolean getValid() { + return this.valid; + } + + public void setValid(Boolean valid) { + this.valid = valid; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DeptGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptGetRequest.java new file mode 100644 index 00000000..ab00fcf9 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptGetRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; + +/** + * DeptGetRequest - 部门获取 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptGetRequest extends BaseRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DeptUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptUpdateRequest.java new file mode 100644 index 00000000..e984518d --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DeptUpdateRequest.java @@ -0,0 +1,116 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.NotEmpty; + +/** + * DeptUpdateRequest - 部门更新 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptUpdateRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为NULL") + private Long id; + + /** + * 部门代码 + */ + @NotEmpty(message = "[deptCode]部门代码不能为空") + @Length(min = 0, max = 50, message = "[deptCode]部门代码长度不合法(0-50)") + private String deptCode; + + /** + * 部门名称 + */ + @NotEmpty(message = "[deptName]部门名称不能为空") + @Length(min = 0, max = 100, message = "[deptName]部门名称长度不合法(0-100)") + private String deptName; + + /** + * 部门别名 + */ + @Length(min = 0, max = 50, message = "[deptAlias]部门别名长度不合法(0-50)") + private String deptAlias; + + /** + * 父部门代码 + */ + @Length(min = 0, max = 50, message = "[supCode]父部门代码长度不合法(0-50)") + private String supCode; + + /** + * 父部门名称 + */ + @Length(min = 0, max = 100, message = "[supName]父部门名称长度不合法(0-100)") + private String supName; + + /** + * 是否有效 + */ + @NotNull(message = "[valid]是否有效不能为NULL") + private Boolean valid; + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getDeptCode() { + return this.deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + public String getDeptName() { + return this.deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getDeptAlias() { + return this.deptAlias; + } + + public void setDeptAlias(String deptAlias) { + this.deptAlias = deptAlias; + } + + public String getSupCode() { + return this.supCode; + } + + public void setSupCode(String supCode) { + this.supCode = supCode; + } + + public String getSupName() { + return this.supName; + } + + public void setSupName(String supName) { + this.supName = supName; + } + + public Boolean getValid() { + return this.valid; + } + + public void setValid(Boolean valid) { + this.valid = valid; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictCreateRequest.java index 2f20ae12..98050ea0 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictCreateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictCreateRequest.java @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictCreateRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictDeleteRequest.java index 55df6771..eba92585 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictDeleteRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictDeleteRequest.java @@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictDeleteRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictFindRequest.java index bf68a24a..f27c9370 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictFindRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictFindRequest.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseFindRequest; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictFindRequest extends BaseFindRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictGetRequest.java index a01be571..703b728b 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictGetRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictGetRequest.java @@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictGetRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemCreateRequest.java index bbac7a0c..3a51b733 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemCreateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemCreateRequest.java @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemCreateRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemDeleteRequest.java index d7bec3ea..db45726d 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemDeleteRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemDeleteRequest.java @@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemDeleteRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemFindRequest.java index 35773cb7..033f5a9a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemFindRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemFindRequest.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseFindRequest; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemFindRequest extends BaseFindRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemGetRequest.java index 223abf71..3ac56c49 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemGetRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemGetRequest.java @@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemGetRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemUpdateRequest.java index 2e4ac96c..4d1f64ef 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemUpdateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictItemUpdateRequest.java @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemUpdateRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictLoadRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictLoadRequest.java index 15514e0d..8d0f675a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictLoadRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictLoadRequest.java @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictLoadRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/DictUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/DictUpdateRequest.java index 5e12598b..56d450c4 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/DictUpdateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/DictUpdateRequest.java @@ -11,7 +11,7 @@ import javax.validation.constraints.NotNull; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictUpdateRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java index 15c07a69..b34ef738 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java @@ -2,23 +2,23 @@ package ${basePackage}.module.system.req; import ${basePackage}.frame.base.BaseRequest; import javax.validation.constraints.NotNull; -import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; import org.hibernate.validator.constraints.Length; import ${basePackage}.frame.validation.Dict; /** * ResourceCreateRequest - 资源新增 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2019-12-19 + * @since 2019-12-22 */ public class ResourceCreateRequest extends BaseRequest { /** * 资源内容 */ - @NotBlank(message = "[value]资源内容不能为空") + @NotEmpty(message = "[value]资源内容不能为空") @Length(min = 0, max = 100, message = "[value]资源内容长度不合法(0-100)") private String value; @@ -35,12 +35,6 @@ public class ResourceCreateRequest extends BaseRequest { @Dict(name = "RESOURCE_TYPE") private String resourceType; - /** - * 是否有效 - */ - @NotNull(message = "[valid]是否有效不能为NULL") - private Boolean valid; - /** * 是否节点 */ @@ -52,6 +46,12 @@ public class ResourceCreateRequest extends BaseRequest { */ private Long supId; + /** + * 是否有效 + */ + @NotNull(message = "[valid]是否有效不能为NULL") + private Boolean valid; + public String getValue() { return this.value; } @@ -76,14 +76,6 @@ public class ResourceCreateRequest extends BaseRequest { this.resourceType = resourceType; } - public Boolean getValid() { - return this.valid; - } - - public void setValid(Boolean valid) { - this.valid = valid; - } - public Boolean getNode() { return this.node; } @@ -99,4 +91,12 @@ public class ResourceCreateRequest extends BaseRequest { public void setSupId(Long supId) { this.supId = supId; } + + public Boolean getValid() { + return this.valid; + } + + public void setValid(Boolean valid) { + this.valid = valid; + } } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java index c37e6cc4..7659e6d0 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceDeleteRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java index 67ba6ba4..c8c2635b 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java @@ -8,7 +8,7 @@ import ${basePackage}.frame.validation.Dict; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceFindRequest extends BaseFindRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java index c6cbbe57..6fcbb8e3 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceGetRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java index e4704d2c..9d30ecc3 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java @@ -3,15 +3,15 @@ package ${basePackage}.module.system.req; import ${basePackage}.frame.base.BaseUpdateRequest; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; -import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; import ${basePackage}.frame.validation.Dict; /** * ResourceUpdateRequest - 资源更新 * - * @author author + * @author wangbing * @version 0.0.1 - * @since 2019-12-19 + * @since 2019-12-22 */ public class ResourceUpdateRequest extends BaseUpdateRequest { @@ -24,7 +24,7 @@ public class ResourceUpdateRequest extends BaseUpdateRequest { /** * 资源内容 */ - @NotBlank(message = "[value]资源内容不能为空") + @NotEmpty(message = "[value]资源内容不能为空") @Length(min = 0, max = 100, message = "[value]资源内容长度不合法(0-100)") private String value; @@ -41,12 +41,6 @@ public class ResourceUpdateRequest extends BaseUpdateRequest { @Dict(name = "RESOURCE_TYPE") private String resourceType; - /** - * 是否有效 - */ - @NotNull(message = "[valid]是否有效不能为NULL") - private Boolean valid; - /** * 是否节点 */ @@ -58,6 +52,12 @@ public class ResourceUpdateRequest extends BaseUpdateRequest { */ private Long supId; + /** + * 是否有效 + */ + @NotNull(message = "[valid]是否有效不能为NULL") + private Boolean valid; + public Long getId() { return this.id; } @@ -90,14 +90,6 @@ public class ResourceUpdateRequest extends BaseUpdateRequest { this.resourceType = resourceType; } - public Boolean getValid() { - return this.valid; - } - - public void setValid(Boolean valid) { - this.valid = valid; - } - public Boolean getNode() { return this.node; } @@ -113,4 +105,12 @@ public class ResourceUpdateRequest extends BaseUpdateRequest { public void setSupId(Long supId) { this.supId = supId; } + + public Boolean getValid() { + return this.valid; + } + + public void setValid(Boolean valid) { + this.valid = valid; + } } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceCreateRequest.java new file mode 100644 index 00000000..fa1a8c83 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceCreateRequest.java @@ -0,0 +1,44 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.NotEmpty; +import org.hibernate.validator.constraints.Length; + +/** + * RoleResourceCreateRequest - 角色资源关系新增 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceCreateRequest extends BaseRequest { + + /** + * 角色主键 + */ + @NotNull(message = "[roleId]角色主键不能为NULL") + private Long roleId; + + /** + * 资源主键 + */ + @NotNull(message = "[resourceId]资源主键不能为NULL") + private Long resourceId; + + public Long getRoleId() { + return this.roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Long getResourceId() { + return this.resourceId; + } + + public void setResourceId(Long resourceId) { + this.resourceId = resourceId; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceDeleteRequest.java new file mode 100644 index 00000000..ea0c5813 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceDeleteRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; + +/** + * RoleResourceDeleteRequest - 角色资源关系删除 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceDeleteRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceFindRequest.java new file mode 100644 index 00000000..881836bd --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceFindRequest.java @@ -0,0 +1,39 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseFindRequest; + +/** + * RoleResourceRequest - 角色资源关系查询 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceFindRequest extends BaseFindRequest { + + /** + * 角色主键 + */ + private Long roleId; + + /** + * 资源主键 + */ + private Long resourceId; + + public Long getRoleId() { + return this.roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Long getResourceId() { + return this.resourceId; + } + + public void setResourceId(Long resourceId) { + this.resourceId = resourceId; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceGetRequest.java new file mode 100644 index 00000000..e73adb4c --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceGetRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; + +/** + * RoleResourceGetRequest - 角色资源关系获取 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceGetRequest extends BaseRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceUpdateRequest.java new file mode 100644 index 00000000..b400049b --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/RoleResourceUpdateRequest.java @@ -0,0 +1,58 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.NotEmpty; + +/** + * RoleResourceUpdateRequest - 角色资源关系更新 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceUpdateRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为NULL") + private Long id; + + /** + * 角色主键 + */ + @NotNull(message = "[roleId]角色主键不能为NULL") + private Long roleId; + + /** + * 资源主键 + */ + @NotNull(message = "[resourceId]资源主键不能为NULL") + private Long resourceId; + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRoleId() { + return this.roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Long getResourceId() { + return this.resourceId; + } + + public void setResourceId(Long resourceId) { + this.resourceId = resourceId; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensBuildRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensBuildRequest.java index febe9c5f..6e1e3afb 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensBuildRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensBuildRequest.java @@ -10,7 +10,7 @@ import java.util.Date; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public class TokensBuildRequest extends BaseFindRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensCreateRequest.java index 4bd6e5a7..f138b2e6 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensCreateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensCreateRequest.java @@ -12,7 +12,7 @@ import ${basePackage}.frame.validation.Dict; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public class TokensCreateRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensDeleteRequest.java index a4de8b08..10d2386e 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensDeleteRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensDeleteRequest.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensDeleteRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensFindRequest.java index 8d1302ac..19260f8a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensFindRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensFindRequest.java @@ -9,7 +9,7 @@ import ${basePackage}.frame.validation.Dict; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public class TokensFindRequest extends BaseFindRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensGetRequest.java index 0b816cb7..56b7a801 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensGetRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensGetRequest.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensGetRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensUpdateRequest.java index e7ea1431..f04cabcc 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/TokensUpdateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/TokensUpdateRequest.java @@ -12,7 +12,7 @@ import ${basePackage}.frame.validation.Dict; * * @author wangbing * @version 0.0.1 - * @since 2019-12-20 + * @since 2017-01-01 */ public class TokensUpdateRequest extends BaseUpdateRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserCreateRequest.java new file mode 100644 index 00000000..f28c2bcb --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserCreateRequest.java @@ -0,0 +1,132 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.NotEmpty; +import org.hibernate.validator.constraints.Length; +import ${basePackage}.frame.validation.Dict; + +/** + * UserCreateRequest - 用户新增 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserCreateRequest extends BaseRequest { + + /** + * 用户账户 + */ + @NotEmpty(message = "[userName]用户账户不能为空") + @Length(min = 0, max = 100, message = "[userName]用户账户长度不合法(0-100)") + private String userName; + + /** + * 用户代码 + */ + @NotEmpty(message = "[userCode]用户代码不能为空") + @Length(min = 0, max = 50, message = "[userCode]用户代码长度不合法(0-50)") + private String userCode; + + /** + * 用户别名 + */ + @Length(min = 0, max = 50, message = "[userAlias]用户别名长度不合法(0-50)") + private String userAlias; + + /** + * 用户密码 + */ + @NotEmpty(message = "[userPwd]用户密码不能为空") + @Length(min = 0, max = 50, message = "[userPwd]用户密码长度不合法(0-50)") + private String userPwd; + + /** + * 用户状态 + */ + @NotNull(message = "[userStatus]用户状态不能为NULL") + @Dict(name = "USER_STATUS") + private String userStatus; + + /** + * 部门主键 + */ + private Long deptId; + + /** + * 部门代码 + */ + @Length(min = 0, max = 50, message = "[deptCode]部门代码长度不合法(0-50)") + private String deptCode; + + /** + * 部门名称 + */ + @Length(min = 0, max = 100, message = "[deptName]部门名称长度不合法(0-100)") + private String deptName; + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserCode() { + return this.userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public String getUserAlias() { + return this.userAlias; + } + + public void setUserAlias(String userAlias) { + this.userAlias = userAlias; + } + + public String getUserPwd() { + return this.userPwd; + } + + public void setUserPwd(String userPwd) { + this.userPwd = userPwd; + } + + public String getUserStatus() { + return this.userStatus; + } + + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } + + public Long getDeptId() { + return this.deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptCode() { + return this.deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + public String getDeptName() { + return this.deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserDeleteRequest.java new file mode 100644 index 00000000..f069bf95 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserDeleteRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; + +/** + * UserDeleteRequest - 用户删除 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserDeleteRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserFindRequest.java new file mode 100644 index 00000000..f31bae7c --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserFindRequest.java @@ -0,0 +1,106 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseFindRequest; +import ${basePackage}.frame.validation.Dict; + +/** + * UserRequest - 用户查询 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserFindRequest extends BaseFindRequest { + + /** + * 用户账户 + */ + private String userName; + + /** + * 用户代码 + */ + private String userCode; + + /** + * 用户别名 + */ + private String userAlias; + + /** + * 用户状态 + */ + @Dict(name = "USER_STATUS") + private String userStatus; + + /** + * 部门主键 + */ + private Long deptId; + + /** + * 部门代码 + */ + private String deptCode; + + /** + * 部门名称 + */ + private String deptName; + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserCode() { + return this.userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public String getUserAlias() { + return this.userAlias; + } + + public void setUserAlias(String userAlias) { + this.userAlias = userAlias; + } + + public String getUserStatus() { + return this.userStatus; + } + + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } + + public Long getDeptId() { + return this.deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptCode() { + return this.deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + public String getDeptName() { + return this.deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserGetRequest.java new file mode 100644 index 00000000..be36f263 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserGetRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; + +/** + * UserGetRequest - 用户获取 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserGetRequest extends BaseRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserLoginRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserLoginRequest.java index 35e994b0..a042fb08 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/UserLoginRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserLoginRequest.java @@ -5,11 +5,11 @@ import ${basePackage}.frame.base.BaseRequest; import javax.validation.constraints.NotBlank; /** - * AuthLoginRequest - 登录 + * UserLoginRequest - 登录 * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class UserLoginRequest extends BaseRequest { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleCreateRequest.java new file mode 100644 index 00000000..6408bb0f --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleCreateRequest.java @@ -0,0 +1,44 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.NotEmpty; +import org.hibernate.validator.constraints.Length; + +/** + * UserRoleCreateRequest - 用户角色授权新增 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleCreateRequest extends BaseRequest { + + /** + * 用户主键 + */ + @NotNull(message = "[userId]用户主键不能为NULL") + private Long userId; + + /** + * 角色主键 + */ + @NotNull(message = "[roleId]角色主键不能为NULL") + private Long roleId; + + public Long getUserId() { + return this.userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getRoleId() { + return this.roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleDeleteRequest.java new file mode 100644 index 00000000..ce468f85 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleDeleteRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; + +/** + * UserRoleDeleteRequest - 用户角色授权删除 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleDeleteRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleFindRequest.java new file mode 100644 index 00000000..2f815f28 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleFindRequest.java @@ -0,0 +1,39 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseFindRequest; + +/** + * UserRoleRequest - 用户角色授权查询 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleFindRequest extends BaseFindRequest { + + /** + * 用户主键 + */ + private Long userId; + + /** + * 角色主键 + */ + private Long roleId; + + public Long getUserId() { + return this.userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getRoleId() { + return this.roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleGetRequest.java new file mode 100644 index 00000000..95695bc1 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleGetRequest.java @@ -0,0 +1,28 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseRequest; +import javax.validation.constraints.NotNull; + +/** + * UserRoleGetRequest - 用户角色授权获取 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleGetRequest extends BaseRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为空") + private long id; + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleUpdateRequest.java new file mode 100644 index 00000000..7c88bfa2 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserRoleUpdateRequest.java @@ -0,0 +1,58 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.NotEmpty; + +/** + * UserRoleUpdateRequest - 用户角色授权更新 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleUpdateRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为NULL") + private Long id; + + /** + * 用户主键 + */ + @NotNull(message = "[userId]用户主键不能为NULL") + private Long userId; + + /** + * 角色主键 + */ + @NotNull(message = "[roleId]角色主键不能为NULL") + private Long roleId; + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return this.userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getRoleId() { + return this.roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java new file mode 100644 index 00000000..6466d21b --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java @@ -0,0 +1,146 @@ +package ${basePackage}.module.system.req; + +import ${basePackage}.frame.base.BaseUpdateRequest; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.NotEmpty; +import ${basePackage}.frame.validation.Dict; + +/** + * UserUpdateRequest - 用户更新 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserUpdateRequest extends BaseUpdateRequest { + + /** + * 主键 + */ + @NotNull(message = "[id]主键不能为NULL") + private Long id; + + /** + * 用户账户 + */ + @NotEmpty(message = "[userName]用户账户不能为空") + @Length(min = 0, max = 100, message = "[userName]用户账户长度不合法(0-100)") + private String userName; + + /** + * 用户代码 + */ + @NotEmpty(message = "[userCode]用户代码不能为空") + @Length(min = 0, max = 50, message = "[userCode]用户代码长度不合法(0-50)") + private String userCode; + + /** + * 用户别名 + */ + @Length(min = 0, max = 50, message = "[userAlias]用户别名长度不合法(0-50)") + private String userAlias; + + /** + * 用户密码 + */ + @NotEmpty(message = "[userPwd]用户密码不能为空") + @Length(min = 0, max = 50, message = "[userPwd]用户密码长度不合法(0-50)") + private String userPwd; + + /** + * 用户状态 + */ + @NotNull(message = "[userStatus]用户状态不能为NULL") + @Dict(name = "USER_STATUS") + private String userStatus; + + /** + * 部门主键 + */ + private Long deptId; + + /** + * 部门代码 + */ + @Length(min = 0, max = 50, message = "[deptCode]部门代码长度不合法(0-50)") + private String deptCode; + + /** + * 部门名称 + */ + @Length(min = 0, max = 100, message = "[deptName]部门名称长度不合法(0-100)") + private String deptName; + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserCode() { + return this.userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public String getUserAlias() { + return this.userAlias; + } + + public void setUserAlias(String userAlias) { + this.userAlias = userAlias; + } + + public String getUserPwd() { + return this.userPwd; + } + + public void setUserPwd(String userPwd) { + this.userPwd = userPwd; + } + + public String getUserStatus() { + return this.userStatus; + } + + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } + + public Long getDeptId() { + return this.deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptCode() { + return this.deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + public String getDeptName() { + return this.deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptCreateResponse.java new file mode 100644 index 00000000..9785ac12 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptCreateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * DeptCreateResponse - 部门 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptCreateResponse extends BaseResponse { + + /** + * ID + */ + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptDeleteResponse.java new file mode 100644 index 00000000..01acacaf --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptDeleteResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * DeptDeleteResponse - 部门 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptDeleteResponse extends BaseResponse { + + /** + * 删除数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptFindResponse.java new file mode 100644 index 00000000..c5086a47 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptFindResponse.java @@ -0,0 +1,14 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseFindResponse; +import ${basePackage}.module.system.ent.Dept; + +/** + * DeptFindResponse - 部门 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptFindResponse extends BaseFindResponse { +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptGetResponse.java new file mode 100644 index 00000000..1fbad713 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptGetResponse.java @@ -0,0 +1,27 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.module.system.ent.Dept; +import ${basePackage}.frame.base.BaseResponse; + +/** + * DeptGetResponse - 部门 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptGetResponse extends BaseResponse { + + /** + * 部门 + */ + private Dept dept; + + public Dept getDept() { + return this.dept; + } + + public void setDept(Dept dept) { + this.dept = dept; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptUpdateResponse.java new file mode 100644 index 00000000..4d8e5f24 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DeptUpdateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * DeptUpdateResponse - 部门 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class DeptUpdateResponse extends BaseResponse { + + /** + * 更新数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictCreateResponse.java index d26e7934..afa7ff28 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictCreateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictCreateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictCreateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictDeleteResponse.java index 8fbd03bf..c85eaebb 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictDeleteResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictDeleteResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictDeleteResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictFindResponse.java index 03a17406..6a2cf71f 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictFindResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictFindResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.module.system.ent.Dict; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictFindResponse extends BaseFindResponse { } \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictGetResponse.java index 1031cf11..e18f2c79 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictGetResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictGetResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.module.system.ent.Dict; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictGetResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemCreateResponse.java index 373d8d3e..874b0ba4 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemCreateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemCreateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemCreateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemDeleteResponse.java index a166cc9a..ef0d142c 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemDeleteResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemDeleteResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemDeleteResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemFindResponse.java index 3cbc56e3..35befeac 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemFindResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemFindResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.module.system.ent.DictItem; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemFindResponse extends BaseFindResponse { } \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemGetResponse.java index b0d66d36..00ad97f2 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemGetResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemGetResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.module.system.ent.DictItem; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemGetResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemUpdateResponse.java index ef70575f..f9efbe0c 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemUpdateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictItemUpdateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictItemUpdateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictLoadResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictLoadResponse.java index 28724cc7..b51e8b05 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictLoadResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictLoadResponse.java @@ -11,7 +11,7 @@ import java.util.List; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictLoadResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictUpdateResponse.java index be81280d..c3dd5331 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictUpdateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/DictUpdateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class DictUpdateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceCreateResponse.java index 5a69cfb3..871e5633 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceCreateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceCreateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceCreateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceDeleteResponse.java index 23aa49db..9afd64e6 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceDeleteResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceDeleteResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceDeleteResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceFindResponse.java index 179f175d..38753b53 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceFindResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceFindResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.module.system.ent.Resource; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceFindResponse extends BaseFindResponse { } \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceGetResponse.java index 8bf19ba2..a80159ca 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceGetResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceGetResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceGetResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceUpdateResponse.java index 7b771246..60b02735 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceUpdateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/ResourceUpdateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class ResourceUpdateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceCreateResponse.java new file mode 100644 index 00000000..0e678c6f --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceCreateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * RoleResourceCreateResponse - 角色资源关系 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceCreateResponse extends BaseResponse { + + /** + * ID + */ + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceDeleteResponse.java new file mode 100644 index 00000000..61b941f7 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceDeleteResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * RoleResourceDeleteResponse - 角色资源关系 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceDeleteResponse extends BaseResponse { + + /** + * 删除数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceFindResponse.java new file mode 100644 index 00000000..f08a4c8f --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceFindResponse.java @@ -0,0 +1,14 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseFindResponse; +import ${basePackage}.module.system.ent.RoleResource; + +/** + * RoleResourceFindResponse - 角色资源关系 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceFindResponse extends BaseFindResponse { +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceGetResponse.java new file mode 100644 index 00000000..f72f1072 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceGetResponse.java @@ -0,0 +1,27 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.module.system.ent.RoleResource; +import ${basePackage}.frame.base.BaseResponse; + +/** + * RoleResourceGetResponse - 角色资源关系 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceGetResponse extends BaseResponse { + + /** + * 角色资源关系 + */ + private RoleResource roleResource; + + public RoleResource getRoleResource() { + return this.roleResource; + } + + public void setRoleResource(RoleResource roleResource) { + this.roleResource = roleResource; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceUpdateResponse.java new file mode 100644 index 00000000..36656b70 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/RoleResourceUpdateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * RoleResourceUpdateResponse - 角色资源关系 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class RoleResourceUpdateResponse extends BaseResponse { + + /** + * 更新数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensBuildResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensBuildResponse.java index 9a8f3584..9198dae4 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensBuildResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensBuildResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.frame.base.Token; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensBuildResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensCreateResponse.java index b230d4a9..23da0de6 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensCreateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensCreateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensCreateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensDeleteResponse.java index 9de28f2d..f47ef74b 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensDeleteResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensDeleteResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensDeleteResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensFindResponse.java index f3de5de2..77b57c81 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensFindResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensFindResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.module.system.ent.Tokens; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensFindResponse extends BaseFindResponse { } \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensGetResponse.java index 9756287f..f165dea1 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensGetResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensGetResponse.java @@ -8,7 +8,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensGetResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensUpdateResponse.java index 2d5bda05..e9bdd086 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensUpdateResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/TokensUpdateResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author author * @version 0.0.1 - * @since 2019-12-19 + * @since 2017-01-01 */ public class TokensUpdateResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserCreateResponse.java new file mode 100644 index 00000000..17b444a7 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserCreateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserCreateResponse - 用户 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserCreateResponse extends BaseResponse { + + /** + * ID + */ + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserDeleteResponse.java new file mode 100644 index 00000000..b60ef8d6 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserDeleteResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserDeleteResponse - 用户 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserDeleteResponse extends BaseResponse { + + /** + * 删除数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserFindResponse.java new file mode 100644 index 00000000..a3b76966 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserFindResponse.java @@ -0,0 +1,14 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseFindResponse; +import ${basePackage}.module.system.ent.User; + +/** + * UserFindResponse - 用户 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserFindResponse extends BaseFindResponse { +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserGetResponse.java new file mode 100644 index 00000000..69d76f9f --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserGetResponse.java @@ -0,0 +1,27 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.module.system.ent.User; +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserGetResponse - 用户 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserGetResponse extends BaseResponse { + + /** + * 用户 + */ + private User user; + + public User getUser() { + return this.user; + } + + public void setUser(User user) { + this.user = user; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserLoginResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserLoginResponse.java index 9c46708d..92754191 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserLoginResponse.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserLoginResponse.java @@ -7,7 +7,7 @@ import ${basePackage}.frame.base.BaseResponse; * * @author wangbing * @version 0.0.1 - * @since 2019-07-20 + * @since 2017-01-01 */ public class UserLoginResponse extends BaseResponse { diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleCreateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleCreateResponse.java new file mode 100644 index 00000000..7dca3eae --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleCreateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserRoleCreateResponse - 用户角色授权 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleCreateResponse extends BaseResponse { + + /** + * ID + */ + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleDeleteResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleDeleteResponse.java new file mode 100644 index 00000000..96a46922 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleDeleteResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserRoleDeleteResponse - 用户角色授权 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleDeleteResponse extends BaseResponse { + + /** + * 删除数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleFindResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleFindResponse.java new file mode 100644 index 00000000..03190bc3 --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleFindResponse.java @@ -0,0 +1,14 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseFindResponse; +import ${basePackage}.module.system.ent.UserRole; + +/** + * UserRoleFindResponse - 用户角色授权 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleFindResponse extends BaseFindResponse { +} \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleGetResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleGetResponse.java new file mode 100644 index 00000000..e103371e --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleGetResponse.java @@ -0,0 +1,27 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.module.system.ent.UserRole; +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserRoleGetResponse - 用户角色授权 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleGetResponse extends BaseResponse { + + /** + * 用户角色授权 + */ + private UserRole userRole; + + public UserRole getUserRole() { + return this.userRole; + } + + public void setUserRole(UserRole userRole) { + this.userRole = userRole; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleUpdateResponse.java new file mode 100644 index 00000000..254b4d6c --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserRoleUpdateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserRoleUpdateResponse - 用户角色授权 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserRoleUpdateResponse extends BaseResponse { + + /** + * 更新数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserUpdateResponse.java b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserUpdateResponse.java new file mode 100644 index 00000000..96c212fb --- /dev/null +++ b/src/main/resources/modules/SpringBoot/java/module/system/rsp/UserUpdateResponse.java @@ -0,0 +1,26 @@ +package ${basePackage}.module.system.rsp; + +import ${basePackage}.frame.base.BaseResponse; + +/** + * UserUpdateResponse - 用户 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ +public class UserUpdateResponse extends BaseResponse { + + /** + * 更新数目 + */ + private Long result; + + public Long getResult() { + return this.result; + } + + public void setResult(Long result) { + this.result = result; + } +} diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/ALL_TABLE_MySQL.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_ALL_TABLE.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/ALL_TABLE_MySQL.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_ALL_TABLE.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_MySQL.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_DICT.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_MySQL.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_DICT.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_ITEM_MySQL.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_DICT_ITEM.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_ITEM_MySQL.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_DICT_ITEM.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/FILE_MySQL.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_FILE.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/FILE_MySQL.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_FILE.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/RESOURCE_MySQL.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql similarity index 85% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/RESOURCE_MySQL.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql index 01921afb..058152e0 100644 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/system/RESOURCE_MySQL.sql +++ b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql @@ -1,14 +1,16 @@ -- ---------------------------- -- Table structure for RESOURCE - 资源 -- Target : MySQL --- Author : author --- Date: : 2019-12-19 +-- Author : wangbing +-- Date: : 2019-12-22 -- ---------------------------- CREATE TABLE `SYS_RESOURCE` ( `ID` BIGINT(20) NOT NULL COMMENT '主键', `VALUE` VARCHAR(100) NOT NULL COMMENT '资源内容', `COMMENT` VARCHAR(250) COMMENT '资源描述', `RESOURCE_TYPE` VARCHAR(20) NOT NULL COMMENT '资源类型', + `NODE` TINYINT(1) NOT NULL COMMENT '是否节点', + `SUP_ID` BIGINT(20) COMMENT '上级主键', `VALID` TINYINT(1) NOT NULL COMMENT '是否有效', `ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本', `IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除', diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/TOKENS_MySQL.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_TOKENS.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/TOKENS_MySQL.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_TOKENS.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/ALL_TABLE_Oracle.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_ALL_TABLE.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/ALL_TABLE_Oracle.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_ALL_TABLE.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_Oracle.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_DICT.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_Oracle.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_DICT.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_ITEM_Oracle.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_DICT_ITEM.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_ITEM_Oracle.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_DICT_ITEM.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/FILE_Oracle.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_FILE.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/FILE_Oracle.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/Oracle_FILE.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/ALL_TABLE_SQLite.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_ALL_TABLE.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/ALL_TABLE_SQLite.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_ALL_TABLE.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_SQLite.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_DICT.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_SQLite.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_DICT.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_ITEM_SQLite.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_DICT_ITEM.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/DICT_ITEM_SQLite.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_DICT_ITEM.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/FILE_SQLite.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_FILE.sql similarity index 100% rename from src/main/resources/modules/SpringBoot/resources/dbtool/system/FILE_SQLite.sql rename to src/main/resources/modules/SpringBoot/resources/dbtool/system/SQLite_FILE.sql diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml index 9d8ac998..6110db90 100644 --- a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml +++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml @@ -1,7 +1,7 @@ wadmin -${basePackage} +xyz.wbsite wangbing false true @@ -12,34 +12,29 @@ system true - +
- - - - - - - - + + + + - +
- +
- - - - - - + + + + + @@ -48,12 +43,15 @@
- +
- - - + + + + + + @@ -62,28 +60,34 @@
- +
- - + + + + + + + + - +
- +
- - - + + + + + - - @@ -92,11 +96,12 @@
- +
- - + + + @@ -128,13 +133,16 @@
- +
- - - - + + + + + + + @@ -143,14 +151,11 @@
- +
- - - - - + + @@ -159,16 +164,11 @@
- +
- - - - - - - + + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl index 588c6e16..61efbc81 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl @@ -2,7 +2,7 @@ jsonService = axios.create({ method: 'post', timeout: 30000, - baseURL: '/ajax/', + baseURL: '', headers: {'Content-Type': 'application/json;charset=UTF-8'}, }); downloadService = axios.create({ @@ -151,55 +151,55 @@ Vue.prototype.$ajax = { login: function (data) { return jsonRequest({ - url: "system/Auth/login", + url: "/ajax/system/User/login", data: JSON.stringify(data), }) }, upload: function (data) { return upRequest({ - url: "ajax/system/File/upload", + url: "/ajax/system/File/upload", data: data, }) }, download: function (data) { return downRequest({ - url: "ajax/system/File/download", + url: "/ajax/system/File/download", data: JSON.stringify(data), }) }, create: function (module, target, data) { return jsonRequest({ - url: module + "/" + target + "/create", + url: '/ajax/' + module + "/" + target + "/create", data: JSON.stringify(data), }) }, update: function (module, target, data) { return jsonRequest({ - url: module + "/" + target + "/update", + url: '/ajax/' + module + "/" + target + "/update", data: JSON.stringify(data), }) }, delete: function (module, target, data) { return jsonRequest({ - url: module + "/" + target + "/delete", + url: '/ajax/' + module + "/" + target + "/delete", data: JSON.stringify(data), }) }, find: function (module, target, data) { return jsonRequest({ - url: module + "/" + target + "/find", + url: '/ajax/' + module + "/" + target + "/find", data: JSON.stringify(data), }) }, get: function (module, target, data) { return jsonRequest({ - url: module + "/" + target + "/get", + url: '/ajax/' + module + "/" + target + "/get", data: JSON.stringify(data), }) }, load: function (module, target, data) { return jsonRequest({ - url: module + "/" + target + "/load", + url: '/ajax/' + module + "/" + target + "/load", data: JSON.stringify(data), }) }, diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl index 7bd409f2..2a31a6bd 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl @@ -1,3 +1,4 @@ +<#-- since ${date?string("yyyy-MM-dd")}-->
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl index 6462686e..a1bb7c04 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl @@ -1,3 +1,4 @@ +<#-- since 2017-01-01-->
@@ -37,7 +38,8 @@ 导出 - + @@ -187,8 +189,8 @@ pageNumber: 1, pageSize: 10, totalCount: 0, - sortKey:'CREATE_TIME', - sortType:'DESC' + sortKey: 'CREATE_TIME', + sortType: 'DESC' }, form: {//待提交表单 title: "", diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl index 336e12b8..0138d9be 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl @@ -1,3 +1,4 @@ +<#-- since 2017-01-01-->
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl index eae38cd4..12777a72 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl @@ -1,3 +1,4 @@ +<#-- since 2017-01-01-->
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl index 35763593..fe39bb85 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl @@ -1,3 +1,4 @@ +<#-- since 2017-01-01-->
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl index ff89924a..697cab99 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl @@ -10,6 +10,15 @@ + + + + + + + + + @@ -41,6 +50,15 @@ + + + + + + + + + @@ -92,15 +110,6 @@ label="主键" width="140"> - - - + + + + + +
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl index 82762e4e..ba02b17b 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl @@ -1,3 +1,4 @@ +<#-- since 2017-01-01-->
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl index 4cf482b8..7741f834 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl @@ -1,3 +1,4 @@ +<#-- since 2017-01-01-->
diff --git a/src/main/resources/modules/SpringBoot/test/system/DictItemTest.java b/src/main/resources/modules/SpringBoot/test/system/DictItemTest.java index 3da768c9..c0798065 100644 --- a/src/main/resources/modules/SpringBoot/test/system/DictItemTest.java +++ b/src/main/resources/modules/SpringBoot/test/system/DictItemTest.java @@ -23,12 +23,12 @@ import static org.junit.Assert.assertTrue; /** -* DictItemTest - - 字典项测试用例 -* -* @author wangbing -* @version 0.0.1 -* @since 2019-07-22 -*/ + * DictItemTest - - 字典项测试用例 + * + * @author wangbing + * @version 0.0.1 + * @since 2017-01-01 + */ @RunWith(SpringRunner.class) @SpringBootTest @Transactional diff --git a/src/main/resources/modules/SpringBoot/test/system/DictTest.java b/src/main/resources/modules/SpringBoot/test/system/DictTest.java index eda98283..730ad6c8 100644 --- a/src/main/resources/modules/SpringBoot/test/system/DictTest.java +++ b/src/main/resources/modules/SpringBoot/test/system/DictTest.java @@ -32,7 +32,7 @@ import static org.junit.Assert.assertTrue; * * @author wangbing * @version 0.0.1 - * @since 2019-07-22 + * @since 2017-01-01 */ @RunWith(SpringRunner.class) @SpringBootTest diff --git a/src/main/resources/modules/SpringBoot/test/system/FileTest.java b/src/main/resources/modules/SpringBoot/test/system/FileTest.java index 059cf371..6a7f2a4e 100644 --- a/src/main/resources/modules/SpringBoot/test/system/FileTest.java +++ b/src/main/resources/modules/SpringBoot/test/system/FileTest.java @@ -25,7 +25,7 @@ import static org.junit.Assert.assertTrue; * * @author wangbing * @version 0.0.1 - * @since 2019-07-22 + * @since 2017-01-01 */ @RunWith(SpringRunner.class) @SpringBootTest diff --git a/src/main/resources/modules/SpringBoot/test/system/ResourceTest.java b/src/main/resources/modules/SpringBoot/test/system/ResourceTest.java index a07103b4..3974f124 100644 --- a/src/main/resources/modules/SpringBoot/test/system/ResourceTest.java +++ b/src/main/resources/modules/SpringBoot/test/system/ResourceTest.java @@ -14,12 +14,12 @@ import ${basePackage}.frame.base.Token; /** -* ResourceTest - - 资源测试用例 -* -* @author author -* @version 0.0.1 -* @since 2019-12-19 -*/ + * ResourceTest - - 资源测试用例 + * + * @author author + * @version 0.0.1 + * @since 2017-01-01 + */ @RunWith(SpringRunner.class) @SpringBootTest @Transactional diff --git a/src/main/resources/modules/SpringBoot/test/system/TokensTest.java b/src/main/resources/modules/SpringBoot/test/system/TokensTest.java index 7b4ac77d..fb18d276 100644 --- a/src/main/resources/modules/SpringBoot/test/system/TokensTest.java +++ b/src/main/resources/modules/SpringBoot/test/system/TokensTest.java @@ -15,12 +15,12 @@ import java.util.Date; /** -* TokensTest - - 通行证测试用例 -* -* @author author -* @version 0.0.1 -* @since 2019-12-19 -*/ + * TokensTest - - 通行证测试用例 + * + * @author author + * @version 0.0.1 + * @since 2017-01-01 + */ @RunWith(SpringRunner.class) @SpringBootTest @Transactional diff --git a/src/main/resources/modules/SpringBoot/test/test.ftl b/src/main/resources/modules/SpringBoot/test/test.ftl index efc0354d..5c9e8564 100644 --- a/src/main/resources/modules/SpringBoot/test/test.ftl +++ b/src/main/resources/modules/SpringBoot/test/test.ftl @@ -14,12 +14,12 @@ import ${basePackage}.frame.base.Token; ${table.getImport()} /** -* ${table.getCName()}Test - - ${table.tableComment}测试用例 -* -* @author ${author?default("")} -* @version 0.0.1 -* @since ${date?string("yyyy-MM-dd")} -*/ + * ${table.getCName()}Test - - ${table.tableComment}测试用例 + * + * @author ${author?default("")} + * @version 0.0.1 + * @since ${date?string("yyyy-MM-dd")} + */ @RunWith(SpringRunner.class) @SpringBootTest @Transactional