summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-04-16 11:20:38 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-05-13 17:50:04 +0900
commit3b55d06b89bf64873e685c3d78fce5affbba3d17 (patch)
tree2adcff0087f4757107d2bf1e50c85ea649f04f94
[Patch Set 2] Add ReadMe.md Change-Id: I6ade52d2490f5ca4ba107c1a27ed6d5b39048725 Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
-rw-r--r--.gitreview6
-rw-r--r--LICENSE204
-rw-r--r--Readme/ReadMe.md650
-rw-r--r--Readme/img/create_war1.PNGbin0 -> 162798 bytes
-rw-r--r--Readme/img/create_war2.PNGbin0 -> 63188 bytes
-rw-r--r--Readme/img/maven_import.PNGbin0 -> 107404 bytes
-rw-r--r--Readme/img/maven_import1.PNGbin0 -> 59194 bytes
-rw-r--r--Readme/img/maven_import2.PNGbin0 -> 92326 bytes
-rw-r--r--Readme/img/maven_model_start.PNGbin0 -> 126382 bytes
-rw-r--r--Readme/img/maven_update.PNGbin0 -> 161963 bytes
-rw-r--r--Readme/img/new_maven_model.PNGbin0 -> 52691 bytes
-rw-r--r--Readme/img/new_maven_model2.PNGbin0 -> 90364 bytes
-rw-r--r--Readme/img/new_maven_model3.PNGbin0 -> 50649 bytes
-rw-r--r--Readme/img/new_maven_project.PNGbin0 -> 51571 bytes
-rw-r--r--Readme/img/new_maven_project2.PNGbin0 -> 55929 bytes
-rw-r--r--Readme/img/new_maven_project_start.PNGbin0 -> 101583 bytes
-rw-r--r--appmarket-core/pom.xml38
-rw-r--r--appmarket-core/src/main/java/app/market/core/app/AppCore.java92
-rw-r--r--appmarket-core/src/main/java/app/market/core/app/impl/AppCoreImpl.java119
-rw-r--r--appmarket-core/src/main/java/app/market/core/authority/AuthorityCore.java32
-rw-r--r--appmarket-core/src/main/java/app/market/core/authority/impl/AuthorityCoreImpl.java54
-rw-r--r--appmarket-core/src/main/java/app/market/core/resource/DictionaryCore.java36
-rw-r--r--appmarket-core/src/main/java/app/market/core/resource/ResourceCore.java26
-rw-r--r--appmarket-core/src/main/java/app/market/core/resource/impl/DictionaryCoreImpl.java69
-rw-r--r--appmarket-core/src/main/java/app/market/core/resource/impl/ResourceCoreImpl.java40
-rw-r--r--appmarket-core/src/main/java/app/market/core/user/UserCore.java106
-rw-r--r--appmarket-core/src/main/java/app/market/core/user/impl/UserCoreImpl.java148
-rw-r--r--appmarket-model/pom.xml37
-rw-r--r--appmarket-model/src/main/java/app/market/model/TokenModel.java48
-rw-r--r--appmarket-model/src/main/java/app/market/model/app/App.java247
-rw-r--r--appmarket-model/src/main/java/app/market/model/app/AppExample.java1049
-rw-r--r--appmarket-model/src/main/java/app/market/model/app/AppVersion.java119
-rw-r--r--appmarket-model/src/main/java/app/market/model/app/AppVersionExample.java903
-rw-r--r--appmarket-model/src/main/java/app/market/model/app/FileInfo.java101
-rw-r--r--appmarket-model/src/main/java/app/market/model/authority/Authority.java48
-rw-r--r--appmarket-model/src/main/java/app/market/model/authority/AuthorityExample.java425
-rw-r--r--appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkExample.java355
-rw-r--r--appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkKey.java38
-rw-r--r--appmarket-model/src/main/java/app/market/model/errors/ResponseErrors.java68
-rw-r--r--appmarket-model/src/main/java/app/market/model/resource/Dictionary.java58
-rw-r--r--appmarket-model/src/main/java/app/market/model/resource/DictionaryExample.java485
-rw-r--r--appmarket-model/src/main/java/app/market/model/resource/Resource.java76
-rw-r--r--appmarket-model/src/main/java/app/market/model/resource/ResourceExample.java502
-rw-r--r--appmarket-model/src/main/java/app/market/model/user/User.java130
-rw-r--r--appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkExample.java362
-rw-r--r--appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkKey.java45
-rw-r--r--appmarket-model/src/main/java/app/market/model/user/UserExample.java698
-rw-r--r--appmarket-persistence/pom.xml55
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/interceptor/PaginationInterceptor.java74
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppMapper.java61
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppVersionMapper.java51
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityMapper.java49
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityResourceLinkMapper.java43
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/DictionaryMapper.java51
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/ResourceMapper.java49
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserAuthorityLinkMapper.java43
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserMapper.java70
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppMapper.xml368
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppVersionMapper.xml298
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityMapper.xml194
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityResourceLinkMapper.xml146
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/resource/DictionaryMapper.xml202
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/resource/ResourceMapper.xml220
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserAuthorityLinkMapper.xml146
-rw-r--r--appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserMapper.xml308
-rw-r--r--appmarket-persistence/src/test/java/app/market/persisitence/AppTest.java53
-rw-r--r--appmarket-utils/pom.xml47
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/Md5Util.java39
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/RuntimeUtil.java66
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/SpringWebUtil.java80
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/Utils.java136
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/constants/Constants.java158
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/constants/ProjectUserRoleEnum.java71
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/datatable/DataTableMap.java99
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/datetime/DateTimeUtils.java78
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/exception/ExceptionEnum.java32
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/json/JsonMapperUtils.java228
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/json/JsonMessage.java49
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/json/JsonResult.java60
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/property/KeysConstants.java110
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/property/MessageUtil.java55
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/property/Option.java78
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/property/PropertyContants.java22
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/property/PropertyUtil.java127
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/rest/RestTemplateUtil.java209
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/token/DeleteModel.java52
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/token/TokenModel.java100
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/webservice/ApiParam.java196
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCode.java50
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCodeEnum.java41
-rw-r--r--appmarket-utils/src/main/java/app/market/utils/webservice/WebServiceURI.java77
-rw-r--r--appmarket-utils/src/main/resources/message.ja.JP.properties98
-rw-r--r--appmarket-utils/src/main/resources/message.ja.en.properties98
-rw-r--r--appmarket-utils/src/test/java/app/market/utils/AppTest.java53
-rw-r--r--database/appmarket.sql248
-rw-r--r--database/appmarket_update_2.0-3.0.sql4
-rw-r--r--pom.xml141
-rw-r--r--warehouse/pom.xml107
-rw-r--r--warehouse/release note.txt18
-rw-r--r--warehouse/src/main/java/app/market/LogUtil.java25
-rw-r--r--warehouse/src/main/java/app/market/PropertyTool.java55
-rw-r--r--warehouse/src/main/java/app/market/WebServiceClient.java81
-rw-r--r--warehouse/src/main/java/app/market/filter/Filter.java37
-rw-r--r--warehouse/src/main/java/app/market/filter/Log4jlistener.java53
-rw-r--r--warehouse/src/main/java/app/market/web/controller/BreadcrumbMapping.java104
-rw-r--r--warehouse/src/main/java/app/market/web/controller/ControllerMapping.java45
-rw-r--r--warehouse/src/main/java/app/market/web/controller/PageMapping.java188
-rw-r--r--warehouse/src/main/java/app/market/web/controller/SpringBaseController.java101
-rw-r--r--warehouse/src/main/java/app/market/web/controller/account/AccountController.java336
-rw-r--r--warehouse/src/main/java/app/market/web/controller/app/AppController.java636
-rw-r--r--warehouse/src/main/java/app/market/web/controller/login/LoginController.java158
-rw-r--r--warehouse/src/main/java/app/market/web/controller/main/MainController.java96
-rw-r--r--warehouse/src/main/java/app/market/web/controllerDev/appDev/AppControllerDev.java367
-rw-r--r--warehouse/src/main/java/app/market/web/controllerDev/login/package-info.java20
-rw-r--r--warehouse/src/main/java/app/market/web/controllerDev/mainDev/MainControllerDev.java86
-rw-r--r--warehouse/src/main/java/app/market/web/form/PaginationForm.java84
-rw-r--r--warehouse/src/main/java/app/market/web/form/TokenForm.java45
-rw-r--r--warehouse/src/main/java/app/market/web/form/account/AccountForm.java139
-rw-r--r--warehouse/src/main/java/app/market/web/form/app/AppForm.java255
-rw-r--r--warehouse/src/main/java/app/market/web/form/breadcrumb/BreadcrumbFrom.java36
-rw-r--r--warehouse/src/main/java/app/market/web/form/breadcrumb/BreadcrumbSubFrom.java52
-rw-r--r--warehouse/src/main/java/app/market/web/form/login/LoginForm.java99
-rw-r--r--warehouse/src/main/java/app/market/web/form/login/SessionForm.java79
-rw-r--r--warehouse/src/main/java/app/market/web/form/user/UserForm.java79
-rw-r--r--warehouse/src/main/java/app/market/web/services/SpringBaseService.java248
-rw-r--r--warehouse/src/main/java/app/market/web/services/account/AccountService.java76
-rw-r--r--warehouse/src/main/java/app/market/web/services/account/impl/AccountServiceImpl.java220
-rw-r--r--warehouse/src/main/java/app/market/web/services/app/AppService.java124
-rw-r--r--warehouse/src/main/java/app/market/web/services/app/impl/AppServiceImpl.java511
-rw-r--r--warehouse/src/main/java/app/market/web/services/login/LoginService.java25
-rw-r--r--warehouse/src/main/java/app/market/web/services/login/impl/LoginServiceImpl.java81
-rw-r--r--warehouse/src/main/java/app/market/web/services/main/MainService.java27
-rw-r--r--warehouse/src/main/java/app/market/web/services/main/impl/MainServiceImpl.java71
-rw-r--r--warehouse/src/main/java/app/market/web/services/user/UserService.java35
-rw-r--r--warehouse/src/main/java/app/market/web/services/user/impl/UserServiceImpl.java141
-rw-r--r--warehouse/src/main/resources/config/log4j.xml77
-rw-r--r--warehouse/src/main/resources/config/properties.properties7
-rw-r--r--warehouse/src/main/resources/config/spring-application.xml18
-rw-r--r--warehouse/src/main/resources/config/spring-servlet.xml59
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/account/detail.jsp80
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/account/list.jsp225
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/account/modify.jsp178
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/app/checkAppInfo.jsp115
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp112
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/app/list.jsp393
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/app/modify.jsp85
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/app/saveAppInfo.jsp348
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/app/type.jsp288
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/appDev/detailDev.jsp87
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/appDev/listDev.jsp85
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/appDev/localListDev.jsp175
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/appDev/searchDev.jsp155
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/deleteDialog.jsp19
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/index.jsp145
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/main.jsp226
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/mainDev.jsp261
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/navigationDialog.jsp22
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/other/404.jsp73
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/other/500.jsp73
-rw-r--r--warehouse/src/main/webapp/WEB-INF/pages/skip.jsp31
-rw-r--r--warehouse/src/main/webapp/WEB-INF/web.xml89
-rw-r--r--warehouse/src/main/webapp/css/bootstrap-datetimepicker/bootstrap-datetimepicker.min.cssbin0 -> 22598 bytes
-rw-r--r--warehouse/src/main/webapp/css/bootstrap.min.css7
-rw-r--r--warehouse/src/main/webapp/css/bootstrap.min.css.map1
-rw-r--r--warehouse/src/main/webapp/css/dataTables-1.10.16/dataTables.bootstrap4.css206
-rw-r--r--warehouse/src/main/webapp/css/font-awesome.min.css5
-rw-r--r--warehouse/src/main/webapp/css/style.css728
-rw-r--r--warehouse/src/main/webapp/fonts/FontAwesome.otfbin0 -> 134808 bytes
-rw-r--r--warehouse/src/main/webapp/fonts/fontawesome-webfont.eotbin0 -> 165742 bytes
-rw-r--r--warehouse/src/main/webapp/fonts/fontawesome-webfont.svg2671
-rw-r--r--warehouse/src/main/webapp/fonts/fontawesome-webfont.ttfbin0 -> 165548 bytes
-rw-r--r--warehouse/src/main/webapp/fonts/fontawesome-webfont.woffbin0 -> 98024 bytes
-rw-r--r--warehouse/src/main/webapp/fonts/fontawesome-webfont.woff2bin0 -> 77160 bytes
-rw-r--r--warehouse/src/main/webapp/image/AGL_HMI_Blue_Background_Car-01.pngbin0 -> 785945 bytes
-rw-r--r--warehouse/src/main/webapp/image/addPic.pngbin0 -> 531 bytes
-rw-r--r--warehouse/src/main/webapp/image/appthum.jpgbin0 -> 102492 bytes
-rw-r--r--warehouse/src/main/webapp/image/defaultAppIcon.pngbin0 -> 115215 bytes
-rw-r--r--warehouse/src/main/webapp/image/insertAppCreate.PNGbin0 -> 2736 bytes
-rw-r--r--warehouse/src/main/webapp/image/insertAppDetails.PNGbin0 -> 2721 bytes
-rw-r--r--warehouse/src/main/webapp/image/insertAppSubmit.PNGbin0 -> 2675 bytes
-rw-r--r--warehouse/src/main/webapp/image/logo.pngbin0 -> 16381 bytes
-rw-r--r--warehouse/src/main/webapp/image/transp_bg.pngbin0 -> 3738 bytes
-rw-r--r--warehouse/src/main/webapp/image/user.pngbin0 -> 6758 bytes
-rw-r--r--warehouse/src/main/webapp/js/AFB-websock.js199
-rw-r--r--warehouse/src/main/webapp/js/AglSocket.js80
-rw-r--r--warehouse/src/main/webapp/js/angular-1.5.8/angular.min.js318
-rw-r--r--warehouse/src/main/webapp/js/bootstrap-4.0.0-beta/bootstrap.min.js7
-rw-r--r--warehouse/src/main/webapp/js/bootstrap-4.0.0-beta/popper/popper.min.js5
-rw-r--r--warehouse/src/main/webapp/js/bootstrap-datetimepicker/bootstrap-datetimepicker.ja.js16
-rw-r--r--warehouse/src/main/webapp/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js1
-rw-r--r--warehouse/src/main/webapp/js/common.js234
-rw-r--r--warehouse/src/main/webapp/js/constant.js16
-rw-r--r--warehouse/src/main/webapp/js/dataTables-1.10.16/dataTables.bootstrap4.min.js8
-rw-r--r--warehouse/src/main/webapp/js/dataTables-1.10.16/i18n/datatables-ja-JP.json23
-rw-r--r--warehouse/src/main/webapp/js/dataTables-1.10.16/jquery.dataTables.min.js164
-rw-r--r--warehouse/src/main/webapp/js/deviceList.js199
-rw-r--r--warehouse/src/main/webapp/js/download.js123
-rw-r--r--warehouse/src/main/webapp/js/jquery.cookie.js117
-rw-r--r--warehouse/src/main/webapp/js/jquery/easing/jquery.easing.compatibility.js59
-rw-r--r--warehouse/src/main/webapp/js/jquery/easing/jquery.easing.min.js1
-rw-r--r--warehouse/src/main/webapp/js/jquery/form/jquery.form.js1277
-rw-r--r--warehouse/src/main/webapp/js/jquery/jqLoading.min.js1
-rw-r--r--warehouse/src/main/webapp/js/jquery/jquery.min.js4
-rw-r--r--warehouse/src/main/webapp/js/main.js74
-rw-r--r--webservice/pom.xml113
-rw-r--r--webservice/release note.txt19
-rw-r--r--webservice/src/main/java/app/market/LogUtil.java25
-rw-r--r--webservice/src/main/java/app/market/PropertyUtil.java82
-rw-r--r--webservice/src/main/java/app/market/WebServiceConstants.java33
-rw-r--r--webservice/src/main/java/app/market/common/comm.java51
-rw-r--r--webservice/src/main/java/app/market/token/dao/RedisGeneratorDao.java48
-rw-r--r--webservice/src/main/java/app/market/token/interceptor/AuthenticationTokenInterceptor.java65
-rw-r--r--webservice/src/main/java/app/market/token/service/RedisTokenManager.java268
-rw-r--r--webservice/src/main/java/app/market/webservice/Filter.java40
-rw-r--r--webservice/src/main/java/app/market/webservice/InitServer.java52
-rw-r--r--webservice/src/main/java/app/market/webservice/Log4jlistener.java53
-rw-r--r--webservice/src/main/java/app/market/webservice/WebServiceClient.java24
-rw-r--r--webservice/src/main/java/app/market/webservice/WebserviceRestBaseController.java35
-rw-r--r--webservice/src/main/java/app/market/webservice/app/AppRestController.java485
-rw-r--r--webservice/src/main/java/app/market/webservice/authority/AuthorityRestController.java66
-rw-r--r--webservice/src/main/java/app/market/webservice/dataManager/AppFileController.java255
-rw-r--r--webservice/src/main/java/app/market/webservice/dataManager/FileUtil.java248
-rw-r--r--webservice/src/main/java/app/market/webservice/dataManager/XmlFactory.java43
-rw-r--r--webservice/src/main/java/app/market/webservice/resource/DictionaryRestController.java124
-rw-r--r--webservice/src/main/java/app/market/webservice/resource/ResourceRestController.java71
-rw-r--r--webservice/src/main/java/app/market/webservice/token/TokenRestController.java37
-rw-r--r--webservice/src/main/java/app/market/webservice/user/UserRestController.java482
-rw-r--r--webservice/src/main/resources/fileManager.properties6
-rw-r--r--webservice/src/main/resources/log4j.xml77
-rw-r--r--webservice/src/main/resources/mybatis-config.xml38
-rw-r--r--webservice/src/main/resources/properties.properties7
-rw-r--r--webservice/src/main/resources/redis-config.xml50
-rw-r--r--webservice/src/main/resources/redis.properties13
-rw-r--r--webservice/src/main/resources/servlet-context.xml56
-rw-r--r--webservice/src/main/resources/spring-mybatis.xml68
-rw-r--r--webservice/src/main/test/app/market/webservice/user/AppRestTest.java175
-rw-r--r--webservice/src/main/test/app/market/webservice/user/UploadTest.java77
-rw-r--r--webservice/src/main/test/app/market/webservice/user/UserRestTest.java75
-rw-r--r--webservice/src/main/webapp/WEB-INF/web.xml94
239 files changed, 31162 insertions, 0 deletions
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..01dfdad
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.automotivelinux.org
+port=29418
+project=src/demo3-warehouse-server
+defaultbranch=master
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b3201ab
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,204 @@
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don`t include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/Readme/ReadMe.md b/Readme/ReadMe.md
new file mode 100644
index 0000000..77834fc
--- /dev/null
+++ b/Readme/ReadMe.md
@@ -0,0 +1,650 @@
+
+
+
+
+# PART 1. agl-app-warehouse Environmental Construction Manual
+
+[TOC]
+
+## 1. Basic Environment
+
+### 1.1 Hardware
+
+* cpu ---------------- 3.30GHz or more
+* Memory---------- 4Gbytes or more
+* HDD--------------- 100Mbytes or more
+
+### 1.2 Software
+
+* Centos7.2
+* JDK 1.8
+* apache-tomcat-8
+* Redis
+* MySQL 5.7.22
+
+*The IP address used in this environment construction is "192.168.200.107"[^1].
+
+[^1]: The IP address in this manual is replaced by "$IP", so please rewrite it to the IP address which used in the actual environment construction.
+
+
+
+## 2. JDK
+
+### 2.1 Installation
+
+```shell
+# yum install java-1.8.0-openjdk
+```
+
+### 2.2 Configuration
+
+#### 2.2.1 Environmental Variables Configuration
+
+```shell
+# echo "export JAVA_HOME=$(readlink -e $(which java)|sed 's:/bin/java::')" > /etc/profile.d/java.sh
+```
+
+```shell
+# echo "PATH=\$PATH:\$JAVA_HOME/bin" >> /etc/profile.d/java.sh
+```
+
+```shell
+# source /etc/profile.d/java.sh
+```
+
+### 2.3 Confirmation
+
+```shell
+# java -version
+ OpenJDK version "1.8.0_171"
+ OpenJDK Runtime Environment (build 1.8.0_171-b10)
+ OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
+```
+
+
+
+## 3. Tomcat
+
+### 3.1 Installation
+
+#### 3.1.1 New User
+
+```shell
+# useradd -s /sbin/nologin tomcat
+```
+
+#### 3.1.2 Download
+
+```shell
+# mkdir -p /usr/local/src/tomcat
+```
+
+```shell
+# cd /usr/local/src/tomcat/
+```
+
+```shell
+# wget http://ftp.riken.jp/net/apache/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.tar.gz
+```
+
+#### 3.1.3 "tar.gz" Deployment
+
+```shell
+# tar zxvf apache-tomcat-8.5.31.tar.gz
+```
+
+```shell
+# mv apache-tomcat-8.5.31 /opt/
+```
+
+```shell
+# chown -R tomcat. /opt/apache-tomcat-8.5.31
+```
+
+```shell
+# ln -s /opt/apache-tomcat-8.5.31 /opt/tomcat
+```
+
+### 3.2 Configuration
+
+#### 3.2.1 Environmental Variables Configuration
+
+```shell
+# echo 'export CATALINA_HOME=/opt/tomcat' > /etc/profile.d/tomcat.sh
+```
+
+```shell
+# source /etc/profile.d/tomcat.sh
+```
+
+#### 3.2.2 Tomcat User Configuration
+
+```shell
+# vi /opt/tomcat/conf/tomcat-users.xml
+```
+
+Add the following contents in "tomcat-users.xml":
+
+```xml
+<role rolename="manager-gui"/>
+<role rolename="admin-gui"/>
+<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
+```
+
+```shell
+# vi /opt/tomcat/webapps/manager/META-INF/context.xml
+```
+
+Remove "< value >... < / value > "
+
+#### 3.2.3 Service Definition File
+
+Create "/etc/systemd/system/tomcat.service" and store it as follows:
+
+Modify the permission of the created definition file to 755.
+
+```shell
+# vi /etc/systemd/system/tomcat.service
+```
+
+```shell
+# chmod 755 /etc/systemd/system/tomcat.service
+```
+
+File contents :
+
+```
+[Unit]
+Description=Apache Tomcat 8
+After=syslog.target network.target
+
+[Service]
+User=tomcat
+Group=tomcat
+Type=oneshot
+PIDFile=/opt/tomcat/tomcat.pid
+RemainAfterExit=yes
+
+ExecStart=/opt/tomcat/bin/startup.sh
+ExecStop=/opt/tomcat/bin/shutdown.sh
+ExecReStart=/opt/tomcat/bin/shutdown.sh;/opt/tomcat/bin/startup.sh
+
+[Install]
+WantedBy=multi-user.target
+```
+
+#### 3.2.4 Auto Start
+
+Auto start when the server starts.
+
+```shell
+# systemctl enable tomcat
+```
+
+#### 3.2.5 Set of Firewalld
+
+Create '/etc/firewalld/services/tomcat.xml ' and write it as follows:
+
+```shell
+# vi /etc/firewalld/services/tomcat.xml
+```
+
+```shell
+# firewall-cmd --add-service=tomcat --permanent
+```
+
+```shell
+# firewall-cmd reload
+```
+
+File contents:
+
+```xml
+<?xml version="1.0" encoding="utf-8"?>
+<service>
+  <short>Apache Tomcat 8</short>
+  <description>Apache Tomcat 8</description>
+ <port protocol="tcp" port="8080"/>
+</service>
+```
+
+### 3.3 Launch
+
+```shell
+# systemctl start tomcat
+```
+
+### 3.4 Confirmation
+
+Access to 'http://$IP:8080/'
+
+
+
+## 4. Redis
+
+### 4.1 Installation
+
+```shell
+# yum -y install epel-release
+```
+
+```shell
+# yum install -y redis
+```
+
+### 4.2 Configuration
+
+#### 4.2.1 "redis.conf" File Modification
+
+```shell
+# vi /etc/redis.conf
+```
+
+Before:
+
+```
+bind 127.0.0.1
+#requirepass foobared
+```
+
+After:
+
+```
+#bind 127.0.0.1
+requirepass appmarket
+```
+
+#### 4.2.2 Auto Start
+
+Auto start when the server starts.
+
+```shell
+# systemctl enable redis.service
+```
+
+#### 4.2.3 Set of Firewalld
+
+```shell
+# firewall-cmd --add-port=6379/tcp --permanent
+```
+
+```shell
+# firewall-cmd reload
+```
+
+### 4.3 Launch
+
+```shell
+# systemctl start redis.service
+```
+
+### 4.4 Confirmation
+
+```shell
+# redis-cli -a appmarket
+ redis 127.0.0.1:6379> ping
+ PONG
+```
+
+
+
+## 5. MySql
+
+### 5.1 Installation
+
+#### 5.1.1 Preparation
+
+```shell
+# yum remove mariadb-libs.x86_64
+```
+
+```shell
+# rm -rf /var/lib/mysql
+```
+
+#### 5.1.2 Installation
+
+```shell
+# yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
+```
+
+```shell
+# yum -y install mysql-community-server
+```
+
+#### 5.1.3 Correct Installation Confirmation
+
+```shell
+# mysqld --version
+ mysqld Ver 5.7.22 for Linux on x86_64 (MySQL Community Server (GPL))
+```
+
+### 5.2 Configuration
+
+#### 5.2.1 MySQL User Configuration
+
+##### 5.2.1.1 User Configuration
+
+Get the password generated from the record file and use it when executing the "mysql_secure_installation "command.
+
+```shell
+# systemctl start mysqld
+# cat /var/log/mysqld.log | grep root
+ xxxx[Note] A temporary password is generated for root@localhost: uhsd!Aid;3Zt
+```
+
+mysql_secure_installation Command is being executed:
+
+```
+NOTE:+E23:K42 RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
+SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
+In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank,so you should just press enter here.
+Enter current password for root (enter for none):uhsd!Aid;3Zt
+OK, successfully used password, moving on…
+Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation.
+Set root password? [Y/n] y
+New password: 123456
+Re-enter new password: 123456
+Password updated successfully!
+Reloading privilege tables..
+… Success!
+By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.
+Remove anonymous users? [Y/n] y
+… Success!
+Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.
+Disallow root login remotely? [Y/n] n
+… Success!
+By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.
+Remove test database and access to it? [Y/n] n
+- Dropping test database…
+… Success!
+- Removing privileges on test database…
+… Success!
+Reloading the privilege tables will ensure that all changes made so far will take effect immediately.
+Reload privilege tables now? [Y/n] y
+… Success!
+Cleaning up…
+All done! If you've completed all of the above steps, your MySQL installation should now be secure.
+Thanks for using MySQL!
+[root@server1 ~]#
+```
+
+##### 5.2.1.2 Add User Permissions
+
+```shell
+# mysql -u root -p
+ Enter password:123456
+```
+
+```shell
+mysql> grant all privileges on *.* to root@'%'identified by '123456';
+```
+
+#### 5.2.2 Modification of "/etc/my.cnf "
+
+```shell
+# vi /etc/my.cnf
+```
+
+Add the following contents in my "my.cnf file":
+
+```
+[mysqld]
+character_set_server = utf8
+```
+
+#### 5.2.3 Auto Start
+
+```shell
+# systemctl enable mysqld.service
+```
+
+#### 5.2.4 Set of Firewalld
+
+```shell
+# firewall-cmd --permanent --zone=public --add-port=3306/tcp
+```
+
+```shell
+# firewall-cmd --permanent --zone=public --add-port=3306/udp
+```
+
+```shell
+# firewall-cmd --reload
+```
+
+### 5.3 Launch
+
+```shell
+# systemctl start mysqld.service
+```
+
+### 5.4 Confirmation
+
+```shell
+# mysql -u root -p
+Enter password:123456
+```
+
+```shell
+mysql> use mysql;
+Database changed
+```
+
+```
+mysql> select host,user from user;
++--------------+------+
+| host         | user |
++--------------+------+
+| localhost    | root |
+| 192.168.1.1 | root |
+| %            | root |
++--------------+------+
+```
+
+
+
+## 6. AglAppWarehouse
+
+Copy the war-file("warehouse.war" and "webservice.war" ) into the "/opt/tomcat/webapps" directory.
+
+### 6.1 Server Construction
+
+#### 6.1.1 Server Configuration
+
+##### 6.1.1.1 Redis Information Settings
+
+```shell
+# vi /opt/tomcat/webapps/webservice/WEB-INF/classes/redis.properties
+```
+
+Modify the file "redis.properties" as follows :
+
+```
+redis.host=192.168.200.107
+redis.port=6379
+redis.password=appmarket
+```
+
+##### 6.1.1.2 App File Saving Path Settings
+
+```shell
+# mkdir -p -m 777 /data/appmarket/log/web
+```
+
+```shell
+# mkdir -p -m 777 /data/appmarket/log/webservice
+```
+
+```shell
+# vi /opt/tomcat/webapps/webservice/WEB-INF/classes/fileManager.properties
+```
+
+Modify the file "fileManager.properties" as follows :
+
+```
+upload_path=/data/appmarket/filesystem/
+upload_path_checked=/data/appmarket/filesystem/
+```
+
+##### 6.1.1.3 Mybatis Info Settings
+
+```shell
+# vi /opt/tomcat/webapps/webservice/WEB-INF/classes/spring-mybatis.xml
+```
+
+Modify the file "spring-mybatis.xml" as follows :
+
+```xml
+<property name="url" value="jdbc:mysql://192.168.200.107:3306/appmarket……/>
+```
+
+##### 6.1.1.4 Log Info Saving Path Settings
+
+```shell
+# vi /opt/tomcat/webapps/webservice/WEB-INF/classes/properties.properties
+```
+
+Modify the webservice file "properties.properties" as follows :
+
+```
+log_ws_common_default=/data/appmarket/log/webservice/common-default.log
+log_ws_console_default=/data/appmarket/log/webservice/console-default.log
+log_ws_common_error=/data/appmarket/log/webservice/common-error.log
+log_ws_logistics_component=/data/appmarket/log/webservice/logistics-component.log
+```
+
+```shell
+# vi /opt/tomcat/webapps/warehouse/WEB-INF/classes/config/properties.properties
+```
+
+Modify the warehouse file "properties.properties" as follows :
+
+```
+log_ws_common_default=/data/appmarket/log/web/common-default.log
+log_ws_console_default=/data/appmarket/log/web/console-default.log
+log_ws_common_error=/data/appmarket/log/web/common-error.log
+log_ws_logistics_component=/data/appmarket/log/web/logistics-component.log
+```
+
+##### 6.1.1.5 Tomcat Server Configuration
+
+```shell
+# vi /opt/tomcat/conf/server.xml
+```
+
+Modify the webservice file "server.xml" as follows :
+
+```xml
+<Context debug="0" docBase="/data/appmarket/filesystem" path="resource" reloadable="false"/>
+```
+
+#### 6.1.2 Database Configuration
+
+```shell
+# mysql -u root -p
+Enter password:123456
+```
+
+```shell
+mysql> source /data/ftp/pub/db_data/appmarket.sql;
+```
+
+### 6.2 Launch
+
+```shell
+# systemctl start tomcat
+```
+
+### 6.3 Set of Port
+
+```shell
+# firewall-cmd --add-masquerade
+```
+
+```shell
+# firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080 --permanent
+```
+
+### 6.4 Confirmation
+
+Access to "http://$IP:8080/warehouse/"
+
+
+
+# PART 2. Code Compilation Manual
+
+## 1. Base Environment
+
+* eclipse :Neon.2 Release (4.6.2)
+* apache-tomcat-8.0
+* JDK 1.8
+
+## 2. New Project
+
+### 2.1 Create a Root Maven Project
+
+![project_start](img/new_maven_project_start.PNG)
+
+![maven_project](img/new_maven_project.PNG)
+
+![maven_project2](img/new_maven_project2.PNG)
+
+### 2.2 Create Maven Modules
+
+There are six maven modules.
+
+1. appmarket-core
+2. appmarket-model
+3. appmarket-persistence
+4. appmarket-utils
+5. warehouse
+6. webservice
+
+![maven_model_start](img/maven_model_start.PNG)
+
+Input the module name by maven modules.
+![avatar](img/new_maven_model.PNG)
+
+Selecting an archetype by maven modules( 1,2,3,4 choose ① , 5,6 choose ②)
+
+![avatar](img/new_maven_model2.PNG)
+
+![avatar](img/new_maven_model3.PNG)
+
+### 2.3 Replace Files
+
+Replace the workspace project files of eclipse with the files in the source code.
+
+
+
+## 3. Code Compilation
+
+### 3.1 Import Maven Projects
+
+![maven_import](img/maven_import.PNG)
+
+![maven_import1](img/maven_import1.PNG)
+
+![maven_import2](img/maven_import2.PNG)
+
+### 3.2 Update Project
+
+![maven_update](img/maven_update.PNG)
+
+## 4. War Export
+
+### 4.1 Export
+
+Export "warehouse.war "and "webservice.war".
+
+Right click on the project name(warehouse)
+
+![create_war1](img/create_war1.PNG)
+
+
+
+Select the save Path of war file
+
+![create_war2](img/create_war2.PNG)
+
diff --git a/Readme/img/create_war1.PNG b/Readme/img/create_war1.PNG
new file mode 100644
index 0000000..67fcfa7
--- /dev/null
+++ b/Readme/img/create_war1.PNG
Binary files differ
diff --git a/Readme/img/create_war2.PNG b/Readme/img/create_war2.PNG
new file mode 100644
index 0000000..425911c
--- /dev/null
+++ b/Readme/img/create_war2.PNG
Binary files differ
diff --git a/Readme/img/maven_import.PNG b/Readme/img/maven_import.PNG
new file mode 100644
index 0000000..1b89d3f
--- /dev/null
+++ b/Readme/img/maven_import.PNG
Binary files differ
diff --git a/Readme/img/maven_import1.PNG b/Readme/img/maven_import1.PNG
new file mode 100644
index 0000000..aeefcb5
--- /dev/null
+++ b/Readme/img/maven_import1.PNG
Binary files differ
diff --git a/Readme/img/maven_import2.PNG b/Readme/img/maven_import2.PNG
new file mode 100644
index 0000000..6177ca2
--- /dev/null
+++ b/Readme/img/maven_import2.PNG
Binary files differ
diff --git a/Readme/img/maven_model_start.PNG b/Readme/img/maven_model_start.PNG
new file mode 100644
index 0000000..8655c63
--- /dev/null
+++ b/Readme/img/maven_model_start.PNG
Binary files differ
diff --git a/Readme/img/maven_update.PNG b/Readme/img/maven_update.PNG
new file mode 100644
index 0000000..63c9662
--- /dev/null
+++ b/Readme/img/maven_update.PNG
Binary files differ
diff --git a/Readme/img/new_maven_model.PNG b/Readme/img/new_maven_model.PNG
new file mode 100644
index 0000000..a2a4e2c
--- /dev/null
+++ b/Readme/img/new_maven_model.PNG
Binary files differ
diff --git a/Readme/img/new_maven_model2.PNG b/Readme/img/new_maven_model2.PNG
new file mode 100644
index 0000000..3af2e4f
--- /dev/null
+++ b/Readme/img/new_maven_model2.PNG
Binary files differ
diff --git a/Readme/img/new_maven_model3.PNG b/Readme/img/new_maven_model3.PNG
new file mode 100644
index 0000000..df4d3d9
--- /dev/null
+++ b/Readme/img/new_maven_model3.PNG
Binary files differ
diff --git a/Readme/img/new_maven_project.PNG b/Readme/img/new_maven_project.PNG
new file mode 100644
index 0000000..abe3420
--- /dev/null
+++ b/Readme/img/new_maven_project.PNG
Binary files differ
diff --git a/Readme/img/new_maven_project2.PNG b/Readme/img/new_maven_project2.PNG
new file mode 100644
index 0000000..d5f5ace
--- /dev/null
+++ b/Readme/img/new_maven_project2.PNG
Binary files differ
diff --git a/Readme/img/new_maven_project_start.PNG b/Readme/img/new_maven_project_start.PNG
new file mode 100644
index 0000000..66d03fa
--- /dev/null
+++ b/Readme/img/new_maven_project_start.PNG
Binary files differ
diff --git a/appmarket-core/pom.xml b/appmarket-core/pom.xml
new file mode 100644
index 0000000..2b74e32
--- /dev/null
+++ b/appmarket-core/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-root</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>appmarket-core</artifactId>
+ <packaging>jar</packaging>
+ <name>appmarket-core</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-persistence</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/appmarket-core/src/main/java/app/market/core/app/AppCore.java b/appmarket-core/src/main/java/app/market/core/app/AppCore.java
new file mode 100644
index 0000000..6db3075
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/app/AppCore.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.app;
+
+import java.util.List;
+
+import app.market.model.app.App;
+import app.market.model.app.AppExample;
+import app.market.model.app.AppVersion;
+import app.market.model.app.AppVersionExample;
+
+
+
+public interface AppCore {
+
+ /**
+ * Get application information
+ *
+ * @param offset
+ * @param limit
+ * @param example
+ * @return
+ */
+ List<App> selectByExample(int offset, int limit, AppExample example);
+
+ /**
+ * Get total count of applications
+ *
+ * @param example
+ * @return
+ */
+ int countByExample(AppExample example);
+
+ /**
+ * Search application by ID
+ *
+ * @param appId
+ * @return
+ */
+ App selectAppByAppId(String appId);
+
+ /**
+ * Search application by IdCustom
+ * @param appIdCustom
+ * @return
+ */
+ App selectAppByAppCustomId(String appIdCustom);
+
+ /**
+ * Save application information
+ *
+ * @param app
+ * @return
+ */
+ int save(App app);
+
+ /**
+ * Delete application
+ *
+ * @param id
+ * @return
+ */
+ int deleteByAppId(String id);
+
+ /**
+ * Save application version
+ * @param appVer
+ * @return
+ */
+ int saveVision(AppVersion appVer);
+
+ /**
+ * Get total count of app versions
+ *
+ * @param example
+ * @return
+ */
+ int countByExample(AppVersionExample example);
+}
diff --git a/appmarket-core/src/main/java/app/market/core/app/impl/AppCoreImpl.java b/appmarket-core/src/main/java/app/market/core/app/impl/AppCoreImpl.java
new file mode 100644
index 0000000..1287484
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/app/impl/AppCoreImpl.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.app.impl;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.session.RowBounds;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import app.market.core.app.AppCore;
+import app.market.core.user.impl.UserCoreImpl;
+import app.market.model.app.App;
+import app.market.model.app.AppExample;
+import app.market.model.app.AppVersion;
+import app.market.model.app.AppVersionExample;
+import app.market.persistence.mapper.app.AppMapper;
+import app.market.persistence.mapper.app.AppVersionMapper;
+import app.market.utils.Utils;
+
+@Service
+@Transactional
+public class AppCoreImpl implements AppCore{
+
+ private static Logger logger = LoggerFactory.getLogger( UserCoreImpl.class );
+
+ @Resource(name = "AppMapper")
+ private AppMapper mapper;
+
+ @Resource(name = "AppVersionMapper")
+ private AppVersionMapper versionMapper;
+
+ @Override
+ public List<App> selectByExample(int offset, int limit, AppExample example) {
+ mapper.selectByExample(example);
+ return mapper.selectByExample( new RowBounds( offset, limit ), example );
+ }
+
+ @Override
+ public int countByExample(AppExample example) {
+ int ret = mapper.countByExample( example );
+ return ret;
+ }
+
+ @Override
+ public App selectAppByAppId(String appId) {
+ App app = mapper.selectByPrimaryKey( appId );
+ return app;
+ }
+
+ @Override
+ public App selectAppByAppCustomId(String appIdCustom) {
+ App app = mapper.selectByCustomId( appIdCustom );
+ return app;
+ }
+
+ @Override
+ public int save(App app) {
+ int ret = 0;
+ if ( StringUtils.isEmpty( app.getAppId() ) ) {
+ app.setAppId( Utils.generatorUUID() );
+ ret = mapper.insert( app );
+ } else {
+ ret = mapper.updateByPrimaryKeySelective(app);
+ }
+
+
+ return ret;
+ }
+
+ @Override
+ public int deleteByAppId(String appId) {
+ int ret = 0;
+ // delete version
+ ret = versionMapper.deleteByAppId(appId);
+
+ // delete application information
+ ret = mapper.deleteByAppId(appId);
+ return ret;
+ }
+
+ @Override
+ public int saveVision(AppVersion appVer) {
+ int ret = 0;
+
+ if ( StringUtils.isEmpty( appVer.getVersionId())) {
+ appVer.setVersionId( Utils.generatorUUID() );
+ ret = versionMapper.insert(appVer);
+ } else {
+ ret = versionMapper.updateByPrimaryKeySelective(appVer);
+ }
+
+ return ret;
+ }
+
+ @Override
+ public int countByExample(AppVersionExample example) {
+ int ret = versionMapper.countByExample( example );
+ return ret;
+ }
+}
diff --git a/appmarket-core/src/main/java/app/market/core/authority/AuthorityCore.java b/appmarket-core/src/main/java/app/market/core/authority/AuthorityCore.java
new file mode 100644
index 0000000..7f64227
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/authority/AuthorityCore.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.authority;
+
+import java.util.List;
+
+import app.market.utils.property.Option;
+
+public interface AuthorityCore {
+
+ /**
+ * Get authority list by role
+ *
+ * @param hasSpace
+ * @return
+ */
+ List<Option> getAuListOption();
+
+}
diff --git a/appmarket-core/src/main/java/app/market/core/authority/impl/AuthorityCoreImpl.java b/appmarket-core/src/main/java/app/market/core/authority/impl/AuthorityCoreImpl.java
new file mode 100644
index 0000000..2b2adc6
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/authority/impl/AuthorityCoreImpl.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.authority.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import app.market.core.authority.AuthorityCore;
+import app.market.model.authority.Authority;
+import app.market.persistence.mapper.authority.AuthorityMapper;
+import app.market.utils.property.Option;
+import app.market.utils.property.PropertyUtil;
+
+@Service
+@Transactional
+public class AuthorityCoreImpl implements AuthorityCore {
+
+ private static Logger logger = LoggerFactory.getLogger( AuthorityCoreImpl.class );
+
+ @Resource(name = "AuthorityMapper")
+ private AuthorityMapper authorityMapper;
+
+ @Override
+ public List<Option> getAuListOption() {
+ logger.info( "Get role list." );
+ List<Option> list = new ArrayList<Option>();
+ for (Authority au : authorityMapper.selectOption()) {
+ Option option = new Option( au.getAuName(), au.getAuId().toString() );
+ list.add( option );
+ }
+ return list;
+ }
+
+}
diff --git a/appmarket-core/src/main/java/app/market/core/resource/DictionaryCore.java b/appmarket-core/src/main/java/app/market/core/resource/DictionaryCore.java
new file mode 100644
index 0000000..74575bf
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/resource/DictionaryCore.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.resource;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import app.market.model.resource.Dictionary;
+import app.market.model.resource.DictionaryExample;
+
+public interface DictionaryCore {
+
+ List<Dictionary> selectItemsByTypeId(String typeId);
+
+ int countDicforItem(String dicTypeId, String valueId);
+
+ int insert(Dictionary record);
+
+ int updateByExample(@Param("record") Dictionary record, @Param("example") DictionaryExample example);
+
+ int countByExample(DictionaryExample example);
+}
diff --git a/appmarket-core/src/main/java/app/market/core/resource/ResourceCore.java b/appmarket-core/src/main/java/app/market/core/resource/ResourceCore.java
new file mode 100644
index 0000000..4b026d1
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/resource/ResourceCore.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.resource;
+
+import java.util.List;
+
+import app.market.model.resource.Resource;
+
+public interface ResourceCore {
+
+ List<Resource> selectResourcesByLoginId(String loginId);
+
+}
diff --git a/appmarket-core/src/main/java/app/market/core/resource/impl/DictionaryCoreImpl.java b/appmarket-core/src/main/java/app/market/core/resource/impl/DictionaryCoreImpl.java
new file mode 100644
index 0000000..b9d925e
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/resource/impl/DictionaryCoreImpl.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.resource.impl;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import app.market.core.resource.DictionaryCore;
+import app.market.model.resource.Dictionary;
+import app.market.model.resource.DictionaryExample;
+import app.market.model.resource.DictionaryExample.Criteria;
+import app.market.persistence.mapper.resource.DictionaryMapper;
+
+@Service
+@Transactional
+public class DictionaryCoreImpl implements DictionaryCore {
+
+ @javax.annotation.Resource(name = "DictionaryMapper")
+ private DictionaryMapper dicMapper;
+
+ @Override
+ public List<Dictionary> selectItemsByTypeId(String typeId) {
+ List<Dictionary> list = dicMapper.selectItemsByTypeId( typeId );
+ return list;
+ }
+
+ @Override
+ public int countDicforItem(String dicTypeId, String valueId){
+ DictionaryExample example = new DictionaryExample();
+ Criteria uc = example.createCriteria();
+ uc.andDicValueEqualTo(valueId);
+ uc.andDicTypeEqualTo(dicTypeId);
+ return dicMapper.countByExample(example);
+ }
+
+ @Override
+ public int insert(Dictionary record) {
+ int i = dicMapper.insert(record);
+ return i;
+ }
+
+ @Override
+ public int updateByExample(Dictionary record, DictionaryExample example) {
+ int i = dicMapper.updateByExample(record, example);
+ return i;
+ }
+
+ @Override
+ public int countByExample(DictionaryExample example) {
+ int ret = dicMapper.countByExample(example);
+ return ret;
+ }
+}
diff --git a/appmarket-core/src/main/java/app/market/core/resource/impl/ResourceCoreImpl.java b/appmarket-core/src/main/java/app/market/core/resource/impl/ResourceCoreImpl.java
new file mode 100644
index 0000000..05ef0c6
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/resource/impl/ResourceCoreImpl.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.resource.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import app.market.core.resource.ResourceCore;
+import app.market.model.resource.Resource;
+import app.market.persistence.mapper.resource.ResourceMapper;
+
+@Service
+@Transactional
+public class ResourceCoreImpl implements ResourceCore {
+
+ @javax.annotation.Resource(name = "ResourceMapper")
+ private ResourceMapper resourceMapper;
+
+ @Override
+ public List<Resource> selectResourcesByLoginId(String userName) {
+ List<Resource> list = resourceMapper.selectResourcesByUserId( userName );
+ return list;
+ }
+
+}
diff --git a/appmarket-core/src/main/java/app/market/core/user/UserCore.java b/appmarket-core/src/main/java/app/market/core/user/UserCore.java
new file mode 100644
index 0000000..1749623
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/user/UserCore.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.user;
+
+import java.util.List;
+
+import app.market.model.user.User;
+import app.market.model.user.UserExample;
+
+public interface UserCore {
+
+ /**
+ * Get user by example
+ *
+ * @param user
+ * @return
+ * @throws Exception
+ */
+ User selectByExample(UserExample user) throws Exception;
+
+ /**
+ * Get user list by example
+ *
+ * @param offset
+ * @param limit
+ * @param example
+ * @return
+ */
+ List<User> selectByExample(int offset, int limit, UserExample example);
+
+ /**
+ * Get user list count by example
+ *
+ * @param example
+ * @return
+ */
+ int countByExample(UserExample example);
+
+ /**
+ * Get user list by id
+ *
+ * @param example
+ * @return
+ */
+ int countById(String userId);
+
+ /**
+ * Get user by id
+ *
+ * @param userId
+ * @return
+ */
+ User selectUserByUserId(String userId);
+
+ /**
+ * Save user information
+ *
+ * @param user
+ * @return
+ */
+ int saveUser(User user);
+
+ /**
+ * Change password
+ *
+ * @param user
+ * @return
+ */
+ int updatePassword(User user);
+
+ /**
+ * Delete user by id
+ *
+ * @param id
+ * @return
+ */
+ int deleteByUserId(String id);
+
+ /**
+ * Delete user by name
+ *
+ * @param name
+ * @return
+ */
+ int deleteByUserName(String Name);
+
+ /**
+ * Get user by user name
+ * @param userName
+ * @return
+ */
+ User selectUserByUserName(String userName);
+}
diff --git a/appmarket-core/src/main/java/app/market/core/user/impl/UserCoreImpl.java b/appmarket-core/src/main/java/app/market/core/user/impl/UserCoreImpl.java
new file mode 100644
index 0000000..5a61a49
--- /dev/null
+++ b/appmarket-core/src/main/java/app/market/core/user/impl/UserCoreImpl.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.core.user.impl;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.exceptions.TooManyResultsException;
+import org.apache.ibatis.session.RowBounds;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import app.market.core.user.UserCore;
+import app.market.model.user.User;
+import app.market.model.user.UserAuthorityLinkExample;
+import app.market.model.user.UserAuthorityLinkKey;
+import app.market.model.user.UserExample;
+import app.market.persistence.mapper.user.UserAuthorityLinkMapper;
+import app.market.persistence.mapper.user.UserMapper;
+import app.market.utils.Utils;
+import app.market.utils.exception.ExceptionEnum;
+
+@Service
+@Transactional
+public class UserCoreImpl implements UserCore {
+
+ private static Logger logger = LoggerFactory.getLogger( UserCoreImpl.class );
+
+ @Resource(name = "UserMapper")
+ private UserMapper userMapper;
+
+ @Resource(name = "UserAuthorityLinkMapper")
+ private UserAuthorityLinkMapper userAuthorityLinkMapper;
+
+ @Override
+ public User selectByExample(UserExample example) throws Exception {
+ try {
+ return userMapper.selectOneByExample( example );
+ } catch ( TooManyResultsException exception ) {
+ logger.debug( "MultiUser count is found." );
+ throw new Exception( ExceptionEnum.MULTIPLE_DATA.toString() );
+ }
+ }
+
+ @Override
+ public List<User> selectByExample(int offset, int limit, UserExample example) {
+ return userMapper.selectByExample( new RowBounds( offset, limit ), example );
+ }
+
+ @Override
+ public int countByExample(UserExample example) {
+ int ret = userMapper.countByExample( example );
+ return ret;
+ }
+
+ @Override
+ public User selectUserByUserId(String userId) {
+ User user = userMapper.selectByPrimaryKey( userId );
+ return user;
+ }
+
+ @Override
+ public User selectUserByUserName(String userName) {
+ User user = userMapper.selectByUserName( userName );
+ return user;
+ }
+
+ @Override
+ public int saveUser(User user) {
+ int ret = 0;
+ if (StringUtils.isEmpty(user.getUserId())) {
+ if (userMapper.countByUserName(user.getUserName()) == 0) {
+ user.setUserId(Utils.generatorUUID());
+ ret = userMapper.insert(user);
+ } else {
+ return -1;
+ }
+ } else {
+ ret = userMapper.updateByPrimaryKeySelective(user);
+ }
+
+ // Delete user authority
+ UserAuthorityLinkExample example = new UserAuthorityLinkExample();
+ app.market.model.user.UserAuthorityLinkExample.Criteria criteria = example.createCriteria();
+ criteria.andUserIdEqualTo(user.getUserId());
+ userAuthorityLinkMapper.deleteByExample(example);
+
+ // Add user authority
+ UserAuthorityLinkKey record = new UserAuthorityLinkKey();
+ record.setUserId(user.getUserId());
+ record.setAuId(user.getAuId());
+ userAuthorityLinkMapper.insert(record);
+ return ret;
+ }
+
+ public int updatePassword(User user) {
+ return userMapper.updatePassword( user );
+ }
+
+ @Override
+ public int deleteByUserId(String id) {
+ // Delete user authority
+ UserAuthorityLinkExample example = new UserAuthorityLinkExample();
+ app.market.model.user.UserAuthorityLinkExample.Criteria criteria = example.createCriteria();
+ criteria.andUserIdEqualTo( id );
+ userAuthorityLinkMapper.deleteByExample( example );
+
+ int ret = userMapper.deleteByPrimaryKey( id );
+
+ return ret;
+ }
+
+ @Override
+ public int deleteByUserName(String name) {
+
+ // Delete user authority
+ UserAuthorityLinkExample example = new UserAuthorityLinkExample();
+ app.market.model.user.UserAuthorityLinkExample.Criteria criteria = example.createCriteria();
+ criteria.andUserIdEqualTo( name );
+ userAuthorityLinkMapper.deleteByExample( example );
+
+ int ret = userMapper.deleteByUserName( name );
+
+ return ret;
+ }
+
+ @Override
+ public int countById(String userId) {
+ return userMapper.countByUserId( userId );
+ }
+}
diff --git a/appmarket-model/pom.xml b/appmarket-model/pom.xml
new file mode 100644
index 0000000..2466a03
--- /dev/null
+++ b/appmarket-model/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-root</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>appmarket-model</artifactId>
+ <packaging>jar</packaging>
+ <name>appmarket-model</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- mybatis -->
+ <dependency>
+ <groupId>org.mybatis</groupId>
+ <artifactId>mybatis</artifactId>
+ <version>3.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/appmarket-model/src/main/java/app/market/model/TokenModel.java b/appmarket-model/src/main/java/app/market/model/TokenModel.java
new file mode 100644
index 0000000..c83be0b
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/TokenModel.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model;
+
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+public class TokenModel implements Serializable {
+
+ private static final long serialVersionUID = 1711424664832625281L;
+
+ @JsonIgnore
+ private String token;
+
+ @JsonIgnore
+ private String servletPath;
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public String getServletPath() {
+ return servletPath;
+ }
+
+ public void setServletPath(String servletPath) {
+ this.servletPath = servletPath;
+ }
+
+}
diff --git a/appmarket-model/src/main/java/app/market/model/app/App.java b/appmarket-model/src/main/java/app/market/model/app/App.java
new file mode 100644
index 0000000..4bc1673
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/app/App.java
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.app;
+
+import java.util.Date;
+
+import app.market.model.TokenModel;
+
+public class App extends TokenModel{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8859096814674858740L;
+
+ private String appId;
+
+ private String appName;
+
+ private String appAbstract;
+
+ private String typeId;
+
+ private String typeName;
+
+ private String appDeviceTypeId;
+
+ private String appDeviceTypeName;
+
+ private String developer;
+
+ private String developerName;
+
+ private String versionName;
+
+ private String appVersionId;
+
+ private String verFilePath;
+
+ private int verFileSize;
+
+ private Date verCreateDate;
+
+ private Date createDate;
+
+ private Date updateDate;
+
+ private String isDel;
+
+ private String hashcode;
+
+ private String appIsPublic;
+
+ private String appIsPublicLable;
+
+ private String appIdCustom;
+
+ private String imagePath;
+
+ public String getImagePath() {
+ return imagePath;
+ }
+
+ public void setImagePath(String imagePath) {
+ this.imagePath = imagePath;
+ }
+
+ public String getAppId() {
+ return appId;
+ }
+
+ public void setAppId(String appId) {
+ this.appId = appId == null ? null : appId.trim();
+ }
+
+ public String getAppName() {
+ return appName;
+ }
+
+ public void setAppName(String appName) {
+ this.appName = appName == null ? null : appName.trim();
+ }
+
+ public String getAppAbstract() {
+ return appAbstract;
+ }
+
+ public void setAppAbstract(String appAbstract) {
+ this.appAbstract = appAbstract == null ? null : appAbstract.trim();
+ }
+
+ public String getTypeId() {
+ return typeId;
+ }
+
+ public void setTypeId(String typeId) {
+ this.typeId = typeId == null ? null : typeId.trim();
+ }
+
+ public String getAppDeviceTypeId() {
+ return appDeviceTypeId;
+ }
+
+ public void setAppDeviceTypeId(String appDeviceTypeId) {
+ this.appDeviceTypeId = appDeviceTypeId == null ? null : appDeviceTypeId.trim();
+ }
+
+ public String getDeveloper() {
+ return developer;
+ }
+
+ public void setDeveloper(String developer) {
+ this.developer = developer == null ? null : developer.trim();
+ }
+
+ public Date getCreateDate() {
+ return createDate;
+ }
+
+ public void setCreateDate(Date createDate) {
+ this.createDate = createDate;
+ }
+
+ public Date getUpdateDate() {
+ return updateDate;
+ }
+
+ public void setUpdateDate(Date updateDate) {
+ this.updateDate = updateDate;
+ }
+
+ public String getIsDel() {
+ return isDel;
+ }
+
+ public void setIsDel(String isDel) {
+ this.isDel = isDel == null ? null : isDel.trim();
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ public String getDeveloperName() {
+ return developerName;
+ }
+
+ public void setDeveloperName(String developerName) {
+ this.developerName = developerName;
+ }
+
+ public String getVerFilePath() {
+ return verFilePath;
+ }
+
+ public void setVerFilePath(String verFilePath) {
+ this.verFilePath = verFilePath;
+ }
+
+ public int getVerFileSize() {
+ return verFileSize;
+ }
+
+ public void setVerFileSize(int verFileSize) {
+ this.verFileSize = verFileSize;
+ }
+
+ public Date getVerCreateDate() {
+ return verCreateDate;
+ }
+
+ public void setVerCreateDate(Date verCreateDate) {
+ this.verCreateDate = verCreateDate;
+ }
+
+ public String getHashcode() {
+ return hashcode;
+ }
+
+ public void setHashcode(String hashcode) {
+ this.hashcode = hashcode;
+ }
+
+ public String getAppIsPublic() {
+ return appIsPublic;
+ }
+
+ public void setAppIsPublic(String appIsPublic) {
+ this.appIsPublic = appIsPublic == null ? null : appIsPublic.trim();
+ }
+
+ public String getAppDeviceTypeName() {
+ return appDeviceTypeName;
+ }
+
+ public void setAppDeviceTypeName(String appDeviceTypeName) {
+ this.appDeviceTypeName = appDeviceTypeName;
+ }
+
+ public String getAppIsPublicLable() {
+ return appIsPublicLable;
+ }
+
+ public void setAppIsPublicLable(String appIsPublicLable) {
+ this.appIsPublicLable = appIsPublicLable;
+ }
+
+ public String getVersionName() {
+ return versionName;
+ }
+
+ public String getAppVersionId() {
+ return appVersionId;
+ }
+
+ public void setAppVersionId(String appVersionId) {
+ this.appVersionId = appVersionId;
+ }
+
+ public String getAppIdCustom() {
+ return appIdCustom;
+ }
+
+ public void setAppIdCustom(String appIdCustom) {
+ this.appIdCustom = appIdCustom == null ? null : appIdCustom.trim();
+ }
+ public void setVersionName(String versionName) {
+ this.versionName = versionName;
+ }
+
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/app/AppExample.java b/appmarket-model/src/main/java/app/market/model/app/AppExample.java
new file mode 100644
index 0000000..5101d8b
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/app/AppExample.java
@@ -0,0 +1,1049 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.app;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import app.market.model.TokenModel;
+
+public class AppExample extends TokenModel{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7069779194904235176L;
+
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public AppExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andAppIdIsNull() {
+ addCriterion("APP_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdIsNotNull() {
+ addCriterion("APP_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdEqualTo(String value) {
+ addCriterion("APP_ID =", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdNotEqualTo(String value) {
+ addCriterion("APP_ID <>", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdGreaterThan(String value) {
+ addCriterion("APP_ID >", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_ID >=", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdLessThan(String value) {
+ addCriterion("APP_ID <", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdLessThanOrEqualTo(String value) {
+ addCriterion("APP_ID <=", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdLike(String value) {
+ addCriterion("APP_ID like", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdNotLike(String value) {
+ addCriterion("APP_ID not like", value, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdIn(List<String> values) {
+ addCriterion("APP_ID in", values, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdNotIn(List<String> values) {
+ addCriterion("APP_ID not in", values, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdBetween(String value1, String value2) {
+ addCriterion("APP_ID between", value1, value2, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdNotBetween(String value1, String value2) {
+ addCriterion("APP_ID not between", value1, value2, "appId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameIsNull() {
+ addCriterion("APP_NAME is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameIsNotNull() {
+ addCriterion("APP_NAME is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameEqualTo(String value) {
+ addCriterion("APP_NAME =", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameNotEqualTo(String value) {
+ addCriterion("APP_NAME <>", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameGreaterThan(String value) {
+ addCriterion("APP_NAME >", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_NAME >=", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameLessThan(String value) {
+ addCriterion("APP_NAME <", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameLessThanOrEqualTo(String value) {
+ addCriterion("APP_NAME <=", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameLike(String value) {
+ addCriterion("APP_NAME like", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameNotLike(String value) {
+ addCriterion("APP_NAME not like", value, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameIn(List<String> values) {
+ addCriterion("APP_NAME in", values, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameNotIn(List<String> values) {
+ addCriterion("APP_NAME not in", values, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameBetween(String value1, String value2) {
+ addCriterion("APP_NAME between", value1, value2, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppNameNotBetween(String value1, String value2) {
+ addCriterion("APP_NAME not between", value1, value2, "appName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractIsNull() {
+ addCriterion("APP_ABSTRACT is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractIsNotNull() {
+ addCriterion("APP_ABSTRACT is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractEqualTo(String value) {
+ addCriterion("APP_ABSTRACT =", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractNotEqualTo(String value) {
+ addCriterion("APP_ABSTRACT <>", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractGreaterThan(String value) {
+ addCriterion("APP_ABSTRACT >", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_ABSTRACT >=", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractLessThan(String value) {
+ addCriterion("APP_ABSTRACT <", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractLessThanOrEqualTo(String value) {
+ addCriterion("APP_ABSTRACT <=", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractLike(String value) {
+ addCriterion("APP_ABSTRACT like", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractNotLike(String value) {
+ addCriterion("APP_ABSTRACT not like", value, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractIn(List<String> values) {
+ addCriterion("APP_ABSTRACT in", values, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractNotIn(List<String> values) {
+ addCriterion("APP_ABSTRACT not in", values, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractBetween(String value1, String value2) {
+ addCriterion("APP_ABSTRACT between", value1, value2, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andAbstractNotBetween(String value1, String value2) {
+ addCriterion("APP_ABSTRACT not between", value1, value2, "abstract");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdIsNull() {
+ addCriterion("APP_TYPE_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdIsNotNull() {
+ addCriterion("APP_TYPE_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdEqualTo(String value) {
+ addCriterion("APP_TYPE_ID =", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdNotEqualTo(String value) {
+ addCriterion("APP_TYPE_ID <>", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdGreaterThan(String value) {
+ addCriterion("APP_TYPE_ID >", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_TYPE_ID >=", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdLessThan(String value) {
+ addCriterion("APP_TYPE_ID <", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdLessThanOrEqualTo(String value) {
+ addCriterion("APP_TYPE_ID <=", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdLike(String value) {
+ addCriterion("APP_TYPE_ID like", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdNotLike(String value) {
+ addCriterion("APP_TYPE_ID not like", value, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdIn(List<String> values) {
+ addCriterion("APP_TYPE_ID in", values, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdNotIn(List<String> values) {
+ addCriterion("APP_TYPE_ID not in", values, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdBetween(String value1, String value2) {
+ addCriterion("APP_TYPE_ID between", value1, value2, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeIdNotBetween(String value1, String value2) {
+ addCriterion("APP_TYPE_ID not between", value1, value2, "typeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdIsNull() {
+ addCriterion("APP_DEVICE_TYPE_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdIsNotNull() {
+ addCriterion("APP_DEVICE_TYPE_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdEqualTo(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID =", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdNotEqualTo(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID <>", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdGreaterThan(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID >", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID >=", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdLessThan(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID <", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdLessThanOrEqualTo(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID <=", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdLike(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID like", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdNotLike(String value) {
+ addCriterion("APP_DEVICE_TYPE_ID not like", value, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdIn(List<String> values) {
+ addCriterion("APP_DEVICE_TYPE_ID in", values, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdNotIn(List<String> values) {
+ addCriterion("APP_DEVICE_TYPE_ID not in", values, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdBetween(String value1, String value2) {
+ addCriterion("APP_DEVICE_TYPE_ID between", value1, value2, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppDeviceTypeIdNotBetween(String value1, String value2) {
+ addCriterion("APP_DEVICE_TYPE_ID not between", value1, value2, "appDeviceTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperIsNull() {
+ addCriterion("DEVELOPER is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperIsNotNull() {
+ addCriterion("DEVELOPER is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperEqualTo(String value) {
+ addCriterion("DEVELOPER =", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperNotEqualTo(String value) {
+ addCriterion("DEVELOPER <>", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperGreaterThan(String value) {
+ addCriterion("DEVELOPER >", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperGreaterThanOrEqualTo(String value) {
+ addCriterion("DEVELOPER >=", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperLessThan(String value) {
+ addCriterion("DEVELOPER <", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperLessThanOrEqualTo(String value) {
+ addCriterion("DEVELOPER <=", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperLike(String value) {
+ addCriterion("DEVELOPER like", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperNameLike(String value) {
+ addCriterion("USER_NAME like", value, "developerName");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperNotLike(String value) {
+ addCriterion("DEVELOPER not like", value, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperIn(List<String> values) {
+ addCriterion("DEVELOPER in", values, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperNotIn(List<String> values) {
+ addCriterion("DEVELOPER not in", values, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperBetween(String value1, String value2) {
+ addCriterion("DEVELOPER between", value1, value2, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andDeveloperNotBetween(String value1, String value2) {
+ addCriterion("DEVELOPER not between", value1, value2, "developer");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateIsNull() {
+ addCriterion("APP_CREATE_DATE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateIsNotNull() {
+ addCriterion("APP_CREATE_DATE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateEqualTo(Date value) {
+ addCriterion("APP_CREATE_DATE =", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateNotEqualTo(Date value) {
+ addCriterion("APP_CREATE_DATE <>", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateGreaterThan(Date value) {
+ addCriterion("APP_CREATE_DATE >", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
+ addCriterion("APP_CREATE_DATE >=", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateLessThan(Date value) {
+ addCriterion("APP_CREATE_DATE <", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateLessThanOrEqualTo(Date value) {
+ addCriterion("APP_CREATE_DATE <=", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateIn(List<Date> values) {
+ addCriterion("APP_CREATE_DATE in", values, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateNotIn(List<Date> values) {
+ addCriterion("APP_CREATE_DATE not in", values, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateBetween(Date value1, Date value2) {
+ addCriterion("APP_CREATE_DATE between", value1, value2, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateNotBetween(Date value1, Date value2) {
+ addCriterion("APP_CREATE_DATE not between", value1, value2, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateIsNull() {
+ addCriterion("APP_UPDATE_DATE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateIsNotNull() {
+ addCriterion("APP_UPDATE_DATE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateEqualTo(Date value) {
+ addCriterion("APP_UPDATE_DATE =", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateNotEqualTo(Date value) {
+ addCriterion("APP_UPDATE_DATE <>", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateGreaterThan(Date value) {
+ addCriterion("APP_UPDATE_DATE >", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) {
+ addCriterion("APP_UPDATE_DATE >=", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateLessThan(Date value) {
+ addCriterion("APP_UPDATE_DATE <", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateLessThanOrEqualTo(Date value) {
+ addCriterion("APP_UPDATE_DATE <=", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateIn(List<Date> values) {
+ addCriterion("APP_UPDATE_DATE in", values, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateNotIn(List<Date> values) {
+ addCriterion("APP_UPDATE_DATE not in", values, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateBetween(Date value1, Date value2) {
+ addCriterion("APP_UPDATE_DATE between", value1, value2, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateNotBetween(Date value1, Date value2) {
+ addCriterion("APP_UPDATE_DATE not between", value1, value2, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIsNull() {
+ addCriterion("APP_IS_DEL is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIsNotNull() {
+ addCriterion("APP_IS_DEL is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelEqualTo(String value) {
+ addCriterion("APP_IS_DEL =", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotEqualTo(String value) {
+ addCriterion("APP_IS_DEL <>", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelGreaterThan(String value) {
+ addCriterion("APP_IS_DEL >", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_IS_DEL >=", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLessThan(String value) {
+ addCriterion("APP_IS_DEL <", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLessThanOrEqualTo(String value) {
+ addCriterion("APP_IS_DEL <=", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLike(String value) {
+ addCriterion("APP_IS_DEL like", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotLike(String value) {
+ addCriterion("APP_IS_DEL not like", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIn(List<String> values) {
+ addCriterion("APP_IS_DEL in", values, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotIn(List<String> values) {
+ addCriterion("APP_IS_DEL not in", values, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelBetween(String value1, String value2) {
+ addCriterion("APP_IS_DEL between", value1, value2, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotBetween(String value1, String value2) {
+ addCriterion("APP_IS_DEL not between", value1, value2, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicIsNull() {
+ addCriterion("APP_IS_PUBLIC is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicIsNotNull() {
+ addCriterion("APP_IS_PUBLIC is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicEqualTo(String value) {
+ addCriterion("APP_IS_PUBLIC =", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicNotEqualTo(String value) {
+ addCriterion("APP_IS_PUBLIC <>", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicGreaterThan(String value) {
+ addCriterion("APP_IS_PUBLIC >", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_IS_PUBLIC >=", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicLessThan(String value) {
+ addCriterion("APP_IS_PUBLIC <", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicLessThanOrEqualTo(String value) {
+ addCriterion("APP_IS_PUBLIC <=", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicLike(String value) {
+ addCriterion("APP_IS_PUBLIC like", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicNotLike(String value) {
+ addCriterion("APP_IS_PUBLIC not like", value, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicIn(List<String> values) {
+ addCriterion("APP_IS_PUBLIC in", values, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicNotIn(List<String> values) {
+ addCriterion("APP_IS_PUBLIC not in", values, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicBetween(String value1, String value2) {
+ addCriterion("APP_IS_PUBLIC between", value1, value2, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIsPublicNotBetween(String value1, String value2) {
+ addCriterion("APP_IS_PUBLIC not between", value1, value2, "appIsPublic");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdIsNull() {
+ addCriterion("APP_VERSION_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdIsNotNull() {
+ addCriterion("APP_VERSION_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdEqualTo(String value) {
+ addCriterion("APP_VERSION_ID =", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdNotEqualTo(String value) {
+ addCriterion("APP_VERSION_ID <>", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdGreaterThan(String value) {
+ addCriterion("APP_VERSION_ID >", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_VERSION_ID >=", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdLessThan(String value) {
+ addCriterion("APP_VERSION_ID <", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdLessThanOrEqualTo(String value) {
+ addCriterion("APP_VERSION_ID <=", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdLike(String value) {
+ addCriterion("APP_VERSION_ID like", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdNotLike(String value) {
+ addCriterion("APP_VERSION_ID not like", value, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdIn(List<String> values) {
+ addCriterion("APP_VERSION_ID in", values, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdNotIn(List<String> values) {
+ addCriterion("APP_VERSION_ID not in", values, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdBetween(String value1, String value2) {
+ addCriterion("APP_VERSION_ID between", value1, value2, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppVersionIdNotBetween(String value1, String value2) {
+ addCriterion("APP_VERSION_ID not between", value1, value2, "appVersionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomIsNull() {
+ addCriterion("APP_ID_CUSTOM is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomIsNotNull() {
+ addCriterion("APP_ID_CUSTOM is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomEqualTo(String value) {
+ addCriterion("APP_ID_CUSTOM =", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomNotEqualTo(String value) {
+ addCriterion("APP_ID_CUSTOM <>", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomGreaterThan(String value) {
+ addCriterion("APP_ID_CUSTOM >", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomGreaterThanOrEqualTo(String value) {
+ addCriterion("APP_ID_CUSTOM >=", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomLessThan(String value) {
+ addCriterion("APP_ID_CUSTOM <", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomLessThanOrEqualTo(String value) {
+ addCriterion("APP_ID_CUSTOM <=", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomLike(String value) {
+ addCriterion("APP_ID_CUSTOM like", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomNotLike(String value) {
+ addCriterion("APP_ID_CUSTOM not like", value, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomIn(List<String> values) {
+ addCriterion("APP_ID_CUSTOM in", values, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomNotIn(List<String> values) {
+ addCriterion("APP_ID_CUSTOM not in", values, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomBetween(String value1, String value2) {
+ addCriterion("APP_ID_CUSTOM between", value1, value2, "appIdCustom");
+ return (Criteria) this;
+ }
+
+ public Criteria andAppIdCustomNotBetween(String value1, String value2) {
+ addCriterion("APP_ID_CUSTOM not between", value1, value2, "appIdCustom");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/app/AppVersion.java b/appmarket-model/src/main/java/app/market/model/app/AppVersion.java
new file mode 100644
index 0000000..67b401c
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/app/AppVersion.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.app;
+
+import java.util.Date;
+
+public class AppVersion {
+ private String versionId;
+
+ private String vAppId;
+
+ private String versionName;
+
+ private Integer size;
+
+ private String comment;
+
+ private String filePath;
+
+ private String md5;
+
+ private Date versionCreateDate;
+
+ private String versionIsDel;
+ private String imagePath;
+
+ public String getVersionId() {
+ return versionId;
+ }
+
+ public void setVersionId(String versionId) {
+ this.versionId = versionId == null ? null : versionId.trim();
+ }
+
+ public String getvAppId() {
+ return vAppId;
+ }
+
+ public void setvAppId(String vAppId) {
+ this.vAppId = vAppId == null ? null : vAppId.trim();
+ }
+
+ public String getVersionName() {
+ return versionName;
+ }
+
+ public void setVersionName(String versionName) {
+ this.versionName = versionName == null ? null : versionName.trim();
+ }
+
+ public Integer getSize() {
+ return size;
+ }
+
+ public void setSize(Integer size) {
+ this.size = size;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment == null ? null : comment.trim();
+ }
+
+ public String getFilePath() {
+ return filePath;
+ }
+
+ public void setFilePath(String filePath) {
+ this.filePath = filePath == null ? null : filePath.trim();
+ }
+
+ public String getMd5() {
+ return md5;
+ }
+
+ public void setMd5(String md5) {
+ this.md5 = md5 == null ? null : md5.trim();
+ }
+
+ public Date getVersionCreateDate() {
+ return versionCreateDate;
+ }
+
+ public void setVersionCreateDate(Date versionCreateDate) {
+ this.versionCreateDate = versionCreateDate;
+ }
+
+ public String getVersionIsDel() {
+ return versionIsDel;
+ }
+
+ public void setVersionIsDel(String versionIsDel) {
+ this.versionIsDel = versionIsDel == null ? null : versionIsDel.trim();
+ }
+
+ public String getImagePath() {
+ return imagePath;
+ }
+
+ public void setImagePath(String imagePath) {
+ this.imagePath = imagePath == null ? null : imagePath.trim();
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/app/AppVersionExample.java b/appmarket-model/src/main/java/app/market/model/app/AppVersionExample.java
new file mode 100644
index 0000000..125a401
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/app/AppVersionExample.java
@@ -0,0 +1,903 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.app;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import app.market.model.TokenModel;
+
+public class AppVersionExample extends TokenModel {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5985453790095559260L;
+
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public AppVersionExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andVersionIdIsNull() {
+ addCriterion("VERSION_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdIsNotNull() {
+ addCriterion("VERSION_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdEqualTo(String value) {
+ addCriterion("VERSION_ID =", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdNotEqualTo(String value) {
+ addCriterion("VERSION_ID <>", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdGreaterThan(String value) {
+ addCriterion("VERSION_ID >", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdGreaterThanOrEqualTo(String value) {
+ addCriterion("VERSION_ID >=", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdLessThan(String value) {
+ addCriterion("VERSION_ID <", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdLessThanOrEqualTo(String value) {
+ addCriterion("VERSION_ID <=", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdLike(String value) {
+ addCriterion("VERSION_ID like", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdNotLike(String value) {
+ addCriterion("VERSION_ID not like", value, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdIn(List<String> values) {
+ addCriterion("VERSION_ID in", values, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdNotIn(List<String> values) {
+ addCriterion("VERSION_ID not in", values, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdBetween(String value1, String value2) {
+ addCriterion("VERSION_ID between", value1, value2, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIdNotBetween(String value1, String value2) {
+ addCriterion("VERSION_ID not between", value1, value2, "versionId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdIsNull() {
+ addCriterion("V_APP_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdIsNotNull() {
+ addCriterion("V_APP_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdEqualTo(String value) {
+ addCriterion("V_APP_ID =", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdNotEqualTo(String value) {
+ addCriterion("V_APP_ID <>", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdGreaterThan(String value) {
+ addCriterion("V_APP_ID >", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdGreaterThanOrEqualTo(String value) {
+ addCriterion("V_APP_ID >=", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdLessThan(String value) {
+ addCriterion("V_APP_ID <", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdLessThanOrEqualTo(String value) {
+ addCriterion("V_APP_ID <=", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdLike(String value) {
+ addCriterion("V_APP_ID like", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdNotLike(String value) {
+ addCriterion("V_APP_ID not like", value, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdIn(List<String> values) {
+ addCriterion("V_APP_ID in", values, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdNotIn(List<String> values) {
+ addCriterion("V_APP_ID not in", values, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdBetween(String value1, String value2) {
+ addCriterion("V_APP_ID between", value1, value2, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVAppIdNotBetween(String value1, String value2) {
+ addCriterion("V_APP_ID not between", value1, value2, "vAppId");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameIsNull() {
+ addCriterion("VERSION_NAME is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameIsNotNull() {
+ addCriterion("VERSION_NAME is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameEqualTo(String value) {
+ addCriterion("VERSION_NAME =", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameNotEqualTo(String value) {
+ addCriterion("VERSION_NAME <>", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameGreaterThan(String value) {
+ addCriterion("VERSION_NAME >", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameGreaterThanOrEqualTo(String value) {
+ addCriterion("VERSION_NAME >=", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameLessThan(String value) {
+ addCriterion("VERSION_NAME <", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameLessThanOrEqualTo(String value) {
+ addCriterion("VERSION_NAME <=", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameLike(String value) {
+ addCriterion("VERSION_NAME like", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameNotLike(String value) {
+ addCriterion("VERSION_NAME not like", value, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameIn(List<String> values) {
+ addCriterion("VERSION_NAME in", values, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameNotIn(List<String> values) {
+ addCriterion("VERSION_NAME not in", values, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameBetween(String value1, String value2) {
+ addCriterion("VERSION_NAME between", value1, value2, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionNameNotBetween(String value1, String value2) {
+ addCriterion("VERSION_NAME not between", value1, value2, "versionName");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeIsNull() {
+ addCriterion("SIZE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeIsNotNull() {
+ addCriterion("SIZE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeEqualTo(Integer value) {
+ addCriterion("SIZE =", value, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeNotEqualTo(Integer value) {
+ addCriterion("SIZE <>", value, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeGreaterThan(Integer value) {
+ addCriterion("SIZE >", value, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeGreaterThanOrEqualTo(Integer value) {
+ addCriterion("SIZE >=", value, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeLessThan(Integer value) {
+ addCriterion("SIZE <", value, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeLessThanOrEqualTo(Integer value) {
+ addCriterion("SIZE <=", value, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeIn(List<Integer> values) {
+ addCriterion("SIZE in", values, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeNotIn(List<Integer> values) {
+ addCriterion("SIZE not in", values, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeBetween(Integer value1, Integer value2) {
+ addCriterion("SIZE between", value1, value2, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andSizeNotBetween(Integer value1, Integer value2) {
+ addCriterion("SIZE not between", value1, value2, "size");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentIsNull() {
+ addCriterion("COMMENT is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentIsNotNull() {
+ addCriterion("COMMENT is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentEqualTo(String value) {
+ addCriterion("COMMENT =", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentNotEqualTo(String value) {
+ addCriterion("COMMENT <>", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentGreaterThan(String value) {
+ addCriterion("COMMENT >", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentGreaterThanOrEqualTo(String value) {
+ addCriterion("COMMENT >=", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentLessThan(String value) {
+ addCriterion("COMMENT <", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentLessThanOrEqualTo(String value) {
+ addCriterion("COMMENT <=", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentLike(String value) {
+ addCriterion("COMMENT like", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentNotLike(String value) {
+ addCriterion("COMMENT not like", value, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentIn(List<String> values) {
+ addCriterion("COMMENT in", values, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentNotIn(List<String> values) {
+ addCriterion("COMMENT not in", values, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentBetween(String value1, String value2) {
+ addCriterion("COMMENT between", value1, value2, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andCommentNotBetween(String value1, String value2) {
+ addCriterion("COMMENT not between", value1, value2, "comment");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathIsNull() {
+ addCriterion("FILE_PATH is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathIsNotNull() {
+ addCriterion("FILE_PATH is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathEqualTo(String value) {
+ addCriterion("FILE_PATH =", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathNotEqualTo(String value) {
+ addCriterion("FILE_PATH <>", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathGreaterThan(String value) {
+ addCriterion("FILE_PATH >", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathGreaterThanOrEqualTo(String value) {
+ addCriterion("FILE_PATH >=", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathLessThan(String value) {
+ addCriterion("FILE_PATH <", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathLessThanOrEqualTo(String value) {
+ addCriterion("FILE_PATH <=", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathLike(String value) {
+ addCriterion("FILE_PATH like", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathNotLike(String value) {
+ addCriterion("FILE_PATH not like", value, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathIn(List<String> values) {
+ addCriterion("FILE_PATH in", values, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathNotIn(List<String> values) {
+ addCriterion("FILE_PATH not in", values, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathBetween(String value1, String value2) {
+ addCriterion("FILE_PATH between", value1, value2, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andFilePathNotBetween(String value1, String value2) {
+ addCriterion("FILE_PATH not between", value1, value2, "filePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5IsNull() {
+ addCriterion("MD5 is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5IsNotNull() {
+ addCriterion("MD5 is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5EqualTo(String value) {
+ addCriterion("MD5 =", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5NotEqualTo(String value) {
+ addCriterion("MD5 <>", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5GreaterThan(String value) {
+ addCriterion("MD5 >", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5GreaterThanOrEqualTo(String value) {
+ addCriterion("MD5 >=", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5LessThan(String value) {
+ addCriterion("MD5 <", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5LessThanOrEqualTo(String value) {
+ addCriterion("MD5 <=", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5Like(String value) {
+ addCriterion("MD5 like", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5NotLike(String value) {
+ addCriterion("MD5 not like", value, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5In(List<String> values) {
+ addCriterion("MD5 in", values, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5NotIn(List<String> values) {
+ addCriterion("MD5 not in", values, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5Between(String value1, String value2) {
+ addCriterion("MD5 between", value1, value2, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andMd5NotBetween(String value1, String value2) {
+ addCriterion("MD5 not between", value1, value2, "md5");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateIsNull() {
+ addCriterion("VERSION_CREATE_DATE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateIsNotNull() {
+ addCriterion("VERSION_CREATE_DATE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateEqualTo(Date value) {
+ addCriterion("VERSION_CREATE_DATE =", value, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateNotEqualTo(Date value) {
+ addCriterion("VERSION_CREATE_DATE <>", value, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateGreaterThan(Date value) {
+ addCriterion("VERSION_CREATE_DATE >", value, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateGreaterThanOrEqualTo(Date value) {
+ addCriterion("VERSION_CREATE_DATE >=", value, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateLessThan(Date value) {
+ addCriterion("VERSION_CREATE_DATE <", value, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateLessThanOrEqualTo(Date value) {
+ addCriterion("VERSION_CREATE_DATE <=", value, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateIn(List<Date> values) {
+ addCriterion("VERSION_CREATE_DATE in", values, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateNotIn(List<Date> values) {
+ addCriterion("VERSION_CREATE_DATE not in", values, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateBetween(Date value1, Date value2) {
+ addCriterion("VERSION_CREATE_DATE between", value1, value2, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionCreateDateNotBetween(Date value1, Date value2) {
+ addCriterion("VERSION_CREATE_DATE not between", value1, value2, "versionCreateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelIsNull() {
+ addCriterion("VERSION_IS_DEL is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelIsNotNull() {
+ addCriterion("VERSION_IS_DEL is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelEqualTo(String value) {
+ addCriterion("VERSION_IS_DEL =", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelNotEqualTo(String value) {
+ addCriterion("VERSION_IS_DEL <>", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelGreaterThan(String value) {
+ addCriterion("VERSION_IS_DEL >", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelGreaterThanOrEqualTo(String value) {
+ addCriterion("VERSION_IS_DEL >=", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelLessThan(String value) {
+ addCriterion("VERSION_IS_DEL <", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelLessThanOrEqualTo(String value) {
+ addCriterion("VERSION_IS_DEL <=", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelLike(String value) {
+ addCriterion("VERSION_IS_DEL like", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelNotLike(String value) {
+ addCriterion("VERSION_IS_DEL not like", value, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelIn(List<String> values) {
+ addCriterion("VERSION_IS_DEL in", values, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelNotIn(List<String> values) {
+ addCriterion("VERSION_IS_DEL not in", values, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelBetween(String value1, String value2) {
+ addCriterion("VERSION_IS_DEL between", value1, value2, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andVersionIsDelNotBetween(String value1, String value2) {
+ addCriterion("VERSION_IS_DEL not between", value1, value2, "versionIsDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathIsNull() {
+ addCriterion("IMAGE_PATH is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathIsNotNull() {
+ addCriterion("IMAGE_PATH is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathEqualTo(String value) {
+ addCriterion("IMAGE_PATH =", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathNotEqualTo(String value) {
+ addCriterion("IMAGE_PATH <>", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathGreaterThan(String value) {
+ addCriterion("IMAGE_PATH >", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathGreaterThanOrEqualTo(String value) {
+ addCriterion("IMAGE_PATH >=", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathLessThan(String value) {
+ addCriterion("IMAGE_PATH <", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathLessThanOrEqualTo(String value) {
+ addCriterion("IMAGE_PATH <=", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathLike(String value) {
+ addCriterion("IMAGE_PATH like", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathNotLike(String value) {
+ addCriterion("IMAGE_PATH not like", value, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathIn(List<String> values) {
+ addCriterion("IMAGE_PATH in", values, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathNotIn(List<String> values) {
+ addCriterion("IMAGE_PATH not in", values, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathBetween(String value1, String value2) {
+ addCriterion("IMAGE_PATH between", value1, value2, "imagePath");
+ return (Criteria) this;
+ }
+
+ public Criteria andImagePathNotBetween(String value1, String value2) {
+ addCriterion("IMAGE_PATH not between", value1, value2, "imagePath");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/app/FileInfo.java b/appmarket-model/src/main/java/app/market/model/app/FileInfo.java
new file mode 100644
index 0000000..32d05fc
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/app/FileInfo.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.app;
+
+import app.market.model.TokenModel;
+
+public class FileInfo extends TokenModel {
+
+ private static final long serialVersionUID = -6324279033213618383L;
+
+ private String fileName= "";
+
+ private long fileSize = 0;
+
+ private String filePath= "";
+
+ private String fileHashCode = "";
+
+ /**
+ * [app id] value in config.xml
+ */
+ private String configAppId= "";
+
+ /**
+ * [version] value in config.xml
+ */
+ private String configVersionName= "";
+
+ /**
+ * [name] value in config.xml
+ */
+ private String configAppName= "";
+
+ /**
+ * [icon] value in config.xml
+ */
+ private String iconPath = "";
+
+ public String getFileHashCode() {
+ return fileHashCode;
+ }
+ public void setFileHashCode(String fileHashCode) {
+ this.fileHashCode = fileHashCode;
+ }
+ public String getFileName() {
+ return fileName;
+ }
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+ public long getFileSize() {
+ return fileSize;
+ }
+ public void setFileSize(long fileSize) {
+ this.fileSize = fileSize;
+ }
+ public String getFilePath() {
+ return filePath;
+ }
+ public void setFilePath(String filePath) {
+ this.filePath = filePath;
+ }
+ public String getConfigVersionName() {
+ return configVersionName;
+ }
+ public void setConfigVersionName(String configVersionName) {
+ this.configVersionName = configVersionName;
+ }
+ public String getConfigAppName() {
+ return configAppName;
+ }
+ public void setConfigAppName(String configAppName) {
+ this.configAppName = configAppName;
+ }
+ public String getIconPath() {
+ return iconPath;
+ }
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+ public String getConfigAppId() {
+ return configAppId;
+ }
+ public void setConfigAppId(String configAppId) {
+ this.configAppId = configAppId;
+ }
+ } \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/authority/Authority.java b/appmarket-model/src/main/java/app/market/model/authority/Authority.java
new file mode 100644
index 0000000..fae2163
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/authority/Authority.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.authority;
+
+public class Authority {
+ private String auId;
+
+ private String auName;
+
+ private String isDel;
+
+ public String getAuId() {
+ return auId;
+ }
+
+ public void setAuId(String auId) {
+ this.auId = auId == null ? null : auId.trim();
+ }
+
+ public String getAuName() {
+ return auName;
+ }
+
+ public void setAuName(String auName) {
+ this.auName = auName == null ? null : auName.trim();
+ }
+
+ public String getIsDel() {
+ return isDel;
+ }
+
+ public void setIsDel(String isDel) {
+ this.isDel = isDel == null ? null : isDel.trim();
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/authority/AuthorityExample.java b/appmarket-model/src/main/java/app/market/model/authority/AuthorityExample.java
new file mode 100644
index 0000000..b5a909f
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/authority/AuthorityExample.java
@@ -0,0 +1,425 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.authority;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AuthorityExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public AuthorityExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andAuIdIsNull() {
+ addCriterion("AU_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIsNotNull() {
+ addCriterion("AU_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdEqualTo(String value) {
+ addCriterion("AU_ID =", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotEqualTo(String value) {
+ addCriterion("AU_ID <>", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdGreaterThan(String value) {
+ addCriterion("AU_ID >", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdGreaterThanOrEqualTo(String value) {
+ addCriterion("AU_ID >=", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLessThan(String value) {
+ addCriterion("AU_ID <", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLessThanOrEqualTo(String value) {
+ addCriterion("AU_ID <=", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLike(String value) {
+ addCriterion("AU_ID like", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotLike(String value) {
+ addCriterion("AU_ID not like", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIn(List<String> values) {
+ addCriterion("AU_ID in", values, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotIn(List<String> values) {
+ addCriterion("AU_ID not in", values, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdBetween(String value1, String value2) {
+ addCriterion("AU_ID between", value1, value2, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotBetween(String value1, String value2) {
+ addCriterion("AU_ID not between", value1, value2, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameIsNull() {
+ addCriterion("AU_NAME is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameIsNotNull() {
+ addCriterion("AU_NAME is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameEqualTo(String value) {
+ addCriterion("AU_NAME =", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameNotEqualTo(String value) {
+ addCriterion("AU_NAME <>", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameGreaterThan(String value) {
+ addCriterion("AU_NAME >", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameGreaterThanOrEqualTo(String value) {
+ addCriterion("AU_NAME >=", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameLessThan(String value) {
+ addCriterion("AU_NAME <", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameLessThanOrEqualTo(String value) {
+ addCriterion("AU_NAME <=", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameLike(String value) {
+ addCriterion("AU_NAME like", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameNotLike(String value) {
+ addCriterion("AU_NAME not like", value, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameIn(List<String> values) {
+ addCriterion("AU_NAME in", values, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameNotIn(List<String> values) {
+ addCriterion("AU_NAME not in", values, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameBetween(String value1, String value2) {
+ addCriterion("AU_NAME between", value1, value2, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuNameNotBetween(String value1, String value2) {
+ addCriterion("AU_NAME not between", value1, value2, "auName");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIsNull() {
+ addCriterion("AU_IS_DEL is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIsNotNull() {
+ addCriterion("AU_IS_DEL is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelEqualTo(String value) {
+ addCriterion("AU_IS_DEL =", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotEqualTo(String value) {
+ addCriterion("AU_IS_DEL <>", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelGreaterThan(String value) {
+ addCriterion("AU_IS_DEL >", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelGreaterThanOrEqualTo(String value) {
+ addCriterion("AU_IS_DEL >=", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLessThan(String value) {
+ addCriterion("AU_IS_DEL <", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLessThanOrEqualTo(String value) {
+ addCriterion("AU_IS_DEL <=", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLike(String value) {
+ addCriterion("AU_IS_DEL like", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotLike(String value) {
+ addCriterion("AU_IS_DEL not like", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIn(List<String> values) {
+ addCriterion("AU_IS_DEL in", values, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotIn(List<String> values) {
+ addCriterion("AU_IS_DEL not in", values, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelBetween(String value1, String value2) {
+ addCriterion("AU_IS_DEL between", value1, value2, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotBetween(String value1, String value2) {
+ addCriterion("AU_IS_DEL not between", value1, value2, "isDel");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkExample.java b/appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkExample.java
new file mode 100644
index 0000000..c139549
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkExample.java
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.authority;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AuthorityResourceLinkExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public AuthorityResourceLinkExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andResIdIsNull() {
+ addCriterion("R_RES_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdIsNotNull() {
+ addCriterion("R_RES_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdEqualTo(String value) {
+ addCriterion("R_RES_ID =", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotEqualTo(String value) {
+ addCriterion("R_RES_ID <>", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdGreaterThan(String value) {
+ addCriterion("R_RES_ID >", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdGreaterThanOrEqualTo(String value) {
+ addCriterion("R_RES_ID >=", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdLessThan(String value) {
+ addCriterion("R_RES_ID <", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdLessThanOrEqualTo(String value) {
+ addCriterion("R_RES_ID <=", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdLike(String value) {
+ addCriterion("R_RES_ID like", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotLike(String value) {
+ addCriterion("R_RES_ID not like", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdIn(List<String> values) {
+ addCriterion("R_RES_ID in", values, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotIn(List<String> values) {
+ addCriterion("R_RES_ID not in", values, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdBetween(String value1, String value2) {
+ addCriterion("R_RES_ID between", value1, value2, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotBetween(String value1, String value2) {
+ addCriterion("R_RES_ID not between", value1, value2, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIsNull() {
+ addCriterion("R_AU_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIsNotNull() {
+ addCriterion("R_AU_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdEqualTo(String value) {
+ addCriterion("R_AU_ID =", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotEqualTo(String value) {
+ addCriterion("R_AU_ID <>", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdGreaterThan(String value) {
+ addCriterion("R_AU_ID >", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdGreaterThanOrEqualTo(String value) {
+ addCriterion("R_AU_ID >=", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLessThan(String value) {
+ addCriterion("R_AU_ID <", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLessThanOrEqualTo(String value) {
+ addCriterion("R_AU_ID <=", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLike(String value) {
+ addCriterion("R_AU_ID like", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotLike(String value) {
+ addCriterion("R_AU_ID not like", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIn(List<String> values) {
+ addCriterion("R_AU_ID in", values, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotIn(List<String> values) {
+ addCriterion("R_AU_ID not in", values, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdBetween(String value1, String value2) {
+ addCriterion("R_AU_ID between", value1, value2, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotBetween(String value1, String value2) {
+ addCriterion("R_AU_ID not between", value1, value2, "auId");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkKey.java b/appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkKey.java
new file mode 100644
index 0000000..d682e10
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/authority/AuthorityResourceLinkKey.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.authority;
+
+public class AuthorityResourceLinkKey {
+ private String resId;
+
+ private String auId;
+
+ public String getResId() {
+ return resId;
+ }
+
+ public void setResId(String resId) {
+ this.resId = resId == null ? null : resId.trim();
+ }
+
+ public String getAuId() {
+ return auId;
+ }
+
+ public void setAuId(String auId) {
+ this.auId = auId == null ? null : auId.trim();
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/errors/ResponseErrors.java b/appmarket-model/src/main/java/app/market/model/errors/ResponseErrors.java
new file mode 100644
index 0000000..637c2a2
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/errors/ResponseErrors.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.errors;
+
+import java.io.Serializable;
+
+/**
+ * ResponseErrors
+ */
+public class ResponseErrors implements Serializable {
+
+ /**
+ * Default ID
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * error code
+ */
+ private String error_code;
+
+ /**
+ * error message
+ */
+ private String message;
+
+ /**
+ * other information
+ */
+ private Object ext;
+
+ public String getcode() {
+ return error_code;
+ }
+
+ public void setcode(String error_code) {
+ this.error_code = error_code;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public Object getExt() {
+ return ext;
+ }
+
+ public void setExt(Object ext) {
+ this.ext = ext;
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/resource/Dictionary.java b/appmarket-model/src/main/java/app/market/model/resource/Dictionary.java
new file mode 100644
index 0000000..cecc280
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/resource/Dictionary.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.resource;
+
+public class Dictionary {
+ private Integer dicId;
+
+ private String dicType;
+
+ private String dicValue;
+
+ private String dicLabel;
+
+ public Integer getDicId() {
+ return dicId;
+ }
+
+ public void setDicId(Integer dicId) {
+ this.dicId = dicId;
+ }
+
+ public String getDicType() {
+ return dicType;
+ }
+
+ public void setDicType(String dicType) {
+ this.dicType = dicType == null ? null : dicType.trim();
+ }
+
+ public String getDicValue() {
+ return dicValue;
+ }
+
+ public void setDicValue(String dicValue) {
+ this.dicValue = dicValue == null ? null : dicValue.trim();
+ }
+
+ public String getDicLabel() {
+ return dicLabel;
+ }
+
+ public void setDicLabel(String dicLabel) {
+ this.dicLabel = dicLabel == null ? null : dicLabel.trim();
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/resource/DictionaryExample.java b/appmarket-model/src/main/java/app/market/model/resource/DictionaryExample.java
new file mode 100644
index 0000000..557567d
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/resource/DictionaryExample.java
@@ -0,0 +1,485 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.resource;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DictionaryExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public DictionaryExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andDicIdIsNull() {
+ addCriterion("DIC_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdIsNotNull() {
+ addCriterion("DIC_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdEqualTo(Integer value) {
+ addCriterion("DIC_ID =", value, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdNotEqualTo(Integer value) {
+ addCriterion("DIC_ID <>", value, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdGreaterThan(Integer value) {
+ addCriterion("DIC_ID >", value, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("DIC_ID >=", value, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdLessThan(Integer value) {
+ addCriterion("DIC_ID <", value, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdLessThanOrEqualTo(Integer value) {
+ addCriterion("DIC_ID <=", value, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdIn(List<Integer> values) {
+ addCriterion("DIC_ID in", values, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdNotIn(List<Integer> values) {
+ addCriterion("DIC_ID not in", values, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdBetween(Integer value1, Integer value2) {
+ addCriterion("DIC_ID between", value1, value2, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("DIC_ID not between", value1, value2, "dicId");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeIsNull() {
+ addCriterion("DIC_TYPE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeIsNotNull() {
+ addCriterion("DIC_TYPE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeEqualTo(String value) {
+ addCriterion("DIC_TYPE =", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeNotEqualTo(String value) {
+ addCriterion("DIC_TYPE <>", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeGreaterThan(String value) {
+ addCriterion("DIC_TYPE >", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeGreaterThanOrEqualTo(String value) {
+ addCriterion("DIC_TYPE >=", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeLessThan(String value) {
+ addCriterion("DIC_TYPE <", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeLessThanOrEqualTo(String value) {
+ addCriterion("DIC_TYPE <=", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeLike(String value) {
+ addCriterion("DIC_TYPE like", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeNotLike(String value) {
+ addCriterion("DIC_TYPE not like", value, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeIn(List<String> values) {
+ addCriterion("DIC_TYPE in", values, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeNotIn(List<String> values) {
+ addCriterion("DIC_TYPE not in", values, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeBetween(String value1, String value2) {
+ addCriterion("DIC_TYPE between", value1, value2, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicTypeNotBetween(String value1, String value2) {
+ addCriterion("DIC_TYPE not between", value1, value2, "dicType");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueIsNull() {
+ addCriterion("DIC_VALUE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueIsNotNull() {
+ addCriterion("DIC_VALUE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueEqualTo(String value) {
+ addCriterion("DIC_VALUE =", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueNotEqualTo(String value) {
+ addCriterion("DIC_VALUE <>", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueGreaterThan(String value) {
+ addCriterion("DIC_VALUE >", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueGreaterThanOrEqualTo(String value) {
+ addCriterion("DIC_VALUE >=", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueLessThan(String value) {
+ addCriterion("DIC_VALUE <", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueLessThanOrEqualTo(String value) {
+ addCriterion("DIC_VALUE <=", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueLike(String value) {
+ addCriterion("DIC_VALUE like", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueNotLike(String value) {
+ addCriterion("DIC_VALUE not like", value, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueIn(List<String> values) {
+ addCriterion("DIC_VALUE in", values, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueNotIn(List<String> values) {
+ addCriterion("DIC_VALUE not in", values, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueBetween(String value1, String value2) {
+ addCriterion("DIC_VALUE between", value1, value2, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicValueNotBetween(String value1, String value2) {
+ addCriterion("DIC_VALUE not between", value1, value2, "dicValue");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelIsNull() {
+ addCriterion("DIC_LABEL is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelIsNotNull() {
+ addCriterion("DIC_LABEL is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelEqualTo(String value) {
+ addCriterion("DIC_LABEL =", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelNotEqualTo(String value) {
+ addCriterion("DIC_LABEL <>", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelGreaterThan(String value) {
+ addCriterion("DIC_LABEL >", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelGreaterThanOrEqualTo(String value) {
+ addCriterion("DIC_LABEL >=", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelLessThan(String value) {
+ addCriterion("DIC_LABEL <", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelLessThanOrEqualTo(String value) {
+ addCriterion("DIC_LABEL <=", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelLike(String value) {
+ addCriterion("DIC_LABEL like", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelNotLike(String value) {
+ addCriterion("DIC_LABEL not like", value, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelIn(List<String> values) {
+ addCriterion("DIC_LABEL in", values, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelNotIn(List<String> values) {
+ addCriterion("DIC_LABEL not in", values, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelBetween(String value1, String value2) {
+ addCriterion("DIC_LABEL between", value1, value2, "dicLabel");
+ return (Criteria) this;
+ }
+
+ public Criteria andDicLabelNotBetween(String value1, String value2) {
+ addCriterion("DIC_LABEL not between", value1, value2, "dicLabel");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/resource/Resource.java b/appmarket-model/src/main/java/app/market/model/resource/Resource.java
new file mode 100644
index 0000000..f76f4b5
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/resource/Resource.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.resource;
+
+import app.market.model.TokenModel;
+
+public class Resource extends TokenModel{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6270897570633592392L;
+
+ private String resId;
+
+ private String resName;
+
+ private String resType;
+
+ private String accessPath;
+
+ private String httpMethod;
+
+ public String getResId() {
+ return resId;
+ }
+
+ public void setResId(String resId) {
+ this.resId = resId == null ? null : resId.trim();
+ }
+
+ public String getResName() {
+ return resName;
+ }
+
+ public void setResName(String resName) {
+ this.resName = resName == null ? null : resName.trim();
+ }
+
+ public String getResType() {
+ return resType;
+ }
+
+ public void setResType(String resType) {
+ this.resType = resType == null ? null : resType.trim();
+ }
+
+ public String getAccessPath() {
+ return accessPath;
+ }
+
+ public void setAccessPath(String accessPath) {
+ this.accessPath = accessPath == null ? null : accessPath.trim();
+ }
+
+ public String getHttpMethod() {
+ return httpMethod;
+ }
+
+ public void setHttpMethod(String httpMethod) {
+ this.httpMethod = httpMethod;
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/resource/ResourceExample.java b/appmarket-model/src/main/java/app/market/model/resource/ResourceExample.java
new file mode 100644
index 0000000..30eb7ab
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/resource/ResourceExample.java
@@ -0,0 +1,502 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.resource;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import app.market.model.TokenModel;
+
+public class ResourceExample extends TokenModel {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -413118689409905570L;
+
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public ResourceExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andResIdIsNull() {
+ addCriterion("RES_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdIsNotNull() {
+ addCriterion("RES_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdEqualTo(String value) {
+ addCriterion("RES_ID =", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotEqualTo(String value) {
+ addCriterion("RES_ID <>", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdGreaterThan(String value) {
+ addCriterion("RES_ID >", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdGreaterThanOrEqualTo(String value) {
+ addCriterion("RES_ID >=", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdLessThan(String value) {
+ addCriterion("RES_ID <", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdLessThanOrEqualTo(String value) {
+ addCriterion("RES_ID <=", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdLike(String value) {
+ addCriterion("RES_ID like", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotLike(String value) {
+ addCriterion("RES_ID not like", value, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdIn(List<String> values) {
+ addCriterion("RES_ID in", values, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotIn(List<String> values) {
+ addCriterion("RES_ID not in", values, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdBetween(String value1, String value2) {
+ addCriterion("RES_ID between", value1, value2, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResIdNotBetween(String value1, String value2) {
+ addCriterion("RES_ID not between", value1, value2, "resId");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameIsNull() {
+ addCriterion("RES_NAME is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameIsNotNull() {
+ addCriterion("RES_NAME is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameEqualTo(String value) {
+ addCriterion("RES_NAME =", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameNotEqualTo(String value) {
+ addCriterion("RES_NAME <>", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameGreaterThan(String value) {
+ addCriterion("RES_NAME >", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameGreaterThanOrEqualTo(String value) {
+ addCriterion("RES_NAME >=", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameLessThan(String value) {
+ addCriterion("RES_NAME <", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameLessThanOrEqualTo(String value) {
+ addCriterion("RES_NAME <=", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameLike(String value) {
+ addCriterion("RES_NAME like", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameNotLike(String value) {
+ addCriterion("RES_NAME not like", value, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameIn(List<String> values) {
+ addCriterion("RES_NAME in", values, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameNotIn(List<String> values) {
+ addCriterion("RES_NAME not in", values, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameBetween(String value1, String value2) {
+ addCriterion("RES_NAME between", value1, value2, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResNameNotBetween(String value1, String value2) {
+ addCriterion("RES_NAME not between", value1, value2, "resName");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeIsNull() {
+ addCriterion("RES_TYPE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeIsNotNull() {
+ addCriterion("RES_TYPE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeEqualTo(String value) {
+ addCriterion("RES_TYPE =", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeNotEqualTo(String value) {
+ addCriterion("RES_TYPE <>", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeGreaterThan(String value) {
+ addCriterion("RES_TYPE >", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeGreaterThanOrEqualTo(String value) {
+ addCriterion("RES_TYPE >=", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeLessThan(String value) {
+ addCriterion("RES_TYPE <", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeLessThanOrEqualTo(String value) {
+ addCriterion("RES_TYPE <=", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeLike(String value) {
+ addCriterion("RES_TYPE like", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeNotLike(String value) {
+ addCriterion("RES_TYPE not like", value, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeIn(List<String> values) {
+ addCriterion("RES_TYPE in", values, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeNotIn(List<String> values) {
+ addCriterion("RES_TYPE not in", values, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeBetween(String value1, String value2) {
+ addCriterion("RES_TYPE between", value1, value2, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andResTypeNotBetween(String value1, String value2) {
+ addCriterion("RES_TYPE not between", value1, value2, "resType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathIsNull() {
+ addCriterion("ACCESS_PATH is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathIsNotNull() {
+ addCriterion("ACCESS_PATH is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathEqualTo(String value) {
+ addCriterion("ACCESS_PATH =", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathNotEqualTo(String value) {
+ addCriterion("ACCESS_PATH <>", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathGreaterThan(String value) {
+ addCriterion("ACCESS_PATH >", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathGreaterThanOrEqualTo(String value) {
+ addCriterion("ACCESS_PATH >=", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathLessThan(String value) {
+ addCriterion("ACCESS_PATH <", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathLessThanOrEqualTo(String value) {
+ addCriterion("ACCESS_PATH <=", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathLike(String value) {
+ addCriterion("ACCESS_PATH like", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathNotLike(String value) {
+ addCriterion("ACCESS_PATH not like", value, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathIn(List<String> values) {
+ addCriterion("ACCESS_PATH in", values, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathNotIn(List<String> values) {
+ addCriterion("ACCESS_PATH not in", values, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathBetween(String value1, String value2) {
+ addCriterion("ACCESS_PATH between", value1, value2, "accessPath");
+ return (Criteria) this;
+ }
+
+ public Criteria andAccessPathNotBetween(String value1, String value2) {
+ addCriterion("ACCESS_PATH not between", value1, value2, "accessPath");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/user/User.java b/appmarket-model/src/main/java/app/market/model/user/User.java
new file mode 100644
index 0000000..697ab67
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/user/User.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.user;
+
+import java.util.Date;
+
+import app.market.model.TokenModel;
+
+public class User extends TokenModel{
+
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3373523200548812007L;
+
+ private String userId;
+
+ private String userPw;
+
+ private String reuserPw;
+
+ private String userName;
+
+ private String mailAddress;
+
+ private Date createDate;
+
+ private Date updateDate;
+
+ private String isDel;
+
+ private String auId;
+
+ private String auName;
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId == null ? null : userId.trim();
+ }
+
+ public String getUserPw() {
+ return userPw;
+ }
+
+ public void setUserPw(String userPw) {
+ this.userPw = userPw == null ? null : userPw.trim();
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName == null ? null : userName.trim();
+ }
+
+ public String getMailAddress() {
+ return mailAddress;
+ }
+
+ public void setMailAddress(String mailAddress) {
+ this.mailAddress = mailAddress == null ? null : mailAddress.trim();
+ }
+
+ public Date getCreateDate() {
+ return createDate;
+ }
+
+ public void setCreateDate(Date createDate) {
+ this.createDate = createDate;
+ }
+
+ public Date getUpdateDate() {
+ return updateDate;
+ }
+
+ public void setUpdateDate(Date updateDate) {
+ this.updateDate = updateDate;
+ }
+
+ public String getIsDel() {
+ return isDel;
+ }
+
+ public void setIsDel(String isDel) {
+ this.isDel = isDel == null ? null : isDel.trim();
+ }
+
+ public String getReuserPw() {
+ return reuserPw;
+ }
+
+ public void setReuserPw(String reuserPw) {
+ this.reuserPw = reuserPw == null ? null : reuserPw.trim();
+ }
+
+ public String getAuId() {
+ return auId;
+ }
+
+ public void setAuId(String auId) {
+ this.auId = auId;
+ }
+
+ public String getAuName() {
+ return auName;
+ }
+
+ public void setAuName(String auName) {
+ this.auName = auName;
+ }
+
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkExample.java b/appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkExample.java
new file mode 100644
index 0000000..06b4f51
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkExample.java
@@ -0,0 +1,362 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.user;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import app.market.model.TokenModel;
+
+public class UserAuthorityLinkExample extends TokenModel{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7593000424181280361L;
+
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public UserAuthorityLinkExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andUserIdIsNull() {
+ addCriterion("A_USER_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIsNotNull() {
+ addCriterion("A_USER_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdEqualTo(String value) {
+ addCriterion("A_USER_ID =", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotEqualTo(String value) {
+ addCriterion("A_USER_ID <>", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThan(String value) {
+ addCriterion("A_USER_ID >", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThanOrEqualTo(String value) {
+ addCriterion("A_USER_ID >=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThan(String value) {
+ addCriterion("A_USER_ID <", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThanOrEqualTo(String value) {
+ addCriterion("A_USER_ID <=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLike(String value) {
+ addCriterion("A_USER_ID like", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotLike(String value) {
+ addCriterion("A_USER_ID not like", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIn(List<String> values) {
+ addCriterion("A_USER_ID in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotIn(List<String> values) {
+ addCriterion("A_USER_ID not in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdBetween(String value1, String value2) {
+ addCriterion("A_USER_ID between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotBetween(String value1, String value2) {
+ addCriterion("A_USER_ID not between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIsNull() {
+ addCriterion("A_AU_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIsNotNull() {
+ addCriterion("A_AU_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdEqualTo(String value) {
+ addCriterion("A_AU_ID =", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotEqualTo(String value) {
+ addCriterion("A_AU_ID <>", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdGreaterThan(String value) {
+ addCriterion("A_AU_ID >", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdGreaterThanOrEqualTo(String value) {
+ addCriterion("A_AU_ID >=", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLessThan(String value) {
+ addCriterion("A_AU_ID <", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLessThanOrEqualTo(String value) {
+ addCriterion("A_AU_ID <=", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdLike(String value) {
+ addCriterion("A_AU_ID like", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotLike(String value) {
+ addCriterion("A_AU_ID not like", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdIn(List<String> values) {
+ addCriterion("A_AU_ID in", values, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotIn(List<String> values) {
+ addCriterion("A_AU_ID not in", values, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdBetween(String value1, String value2) {
+ addCriterion("A_AU_ID between", value1, value2, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdNotBetween(String value1, String value2) {
+ addCriterion("A_AU_ID not between", value1, value2, "auId");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkKey.java b/appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkKey.java
new file mode 100644
index 0000000..67ded7b
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/user/UserAuthorityLinkKey.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.user;
+
+import app.market.model.TokenModel;
+
+public class UserAuthorityLinkKey extends TokenModel {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3544722942468130248L;
+
+ private String userId;
+
+ private String auId;
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId == null ? null : userId.trim();
+ }
+
+ public String getAuId() {
+ return auId;
+ }
+
+ public void setAuId(String auId) {
+ this.auId = auId == null ? null : auId.trim();
+ }
+} \ No newline at end of file
diff --git a/appmarket-model/src/main/java/app/market/model/user/UserExample.java b/appmarket-model/src/main/java/app/market/model/user/UserExample.java
new file mode 100644
index 0000000..079c924
--- /dev/null
+++ b/appmarket-model/src/main/java/app/market/model/user/UserExample.java
@@ -0,0 +1,698 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.model.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import app.market.model.TokenModel;
+
+public class UserExample extends TokenModel {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1366756272924053727L;
+
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List<Criteria> oredCriteria;
+
+ public UserExample() {
+ oredCriteria = new ArrayList<Criteria>();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List<Criteria> getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List<Criterion> criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<Criterion>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List<Criterion> getAllCriteria() {
+ return criteria;
+ }
+
+ public List<Criterion> getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andUserIdIsNull() {
+ addCriterion("USER_ID is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIsNotNull() {
+ addCriterion("USER_ID is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdEqualTo(String value) {
+ addCriterion("USER_ID =", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotEqualTo(String value) {
+ addCriterion("USER_ID <>", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThan(String value) {
+ addCriterion("USER_ID >", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThanOrEqualTo(String value) {
+ addCriterion("USER_ID >=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThan(String value) {
+ addCriterion("USER_ID <", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThanOrEqualTo(String value) {
+ addCriterion("USER_ID <=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLike(String value) {
+ addCriterion("USER_ID like", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotLike(String value) {
+ addCriterion("USER_ID not like", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIn(List<String> values) {
+ addCriterion("USER_ID in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotIn(List<String> values) {
+ addCriterion("USER_ID not in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdBetween(String value1, String value2) {
+ addCriterion("USER_ID between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotBetween(String value1, String value2) {
+ addCriterion("USER_ID not between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwIsNull() {
+ addCriterion("USER_PW is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwIsNotNull() {
+ addCriterion("USER_PW is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwEqualTo(String value) {
+ addCriterion("USER_PW =", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwNotEqualTo(String value) {
+ addCriterion("USER_PW <>", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwGreaterThan(String value) {
+ addCriterion("USER_PW >", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwGreaterThanOrEqualTo(String value) {
+ addCriterion("USER_PW >=", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwLessThan(String value) {
+ addCriterion("USER_PW <", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwLessThanOrEqualTo(String value) {
+ addCriterion("USER_PW <=", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwLike(String value) {
+ addCriterion("USER_PW like", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwNotLike(String value) {
+ addCriterion("USER_PW not like", value, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwIn(List<String> values) {
+ addCriterion("USER_PW in", values, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwNotIn(List<String> values) {
+ addCriterion("USER_PW not in", values, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwBetween(String value1, String value2) {
+ addCriterion("USER_PW between", value1, value2, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserPwNotBetween(String value1, String value2) {
+ addCriterion("USER_PW not between", value1, value2, "userPw");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIsNull() {
+ addCriterion("USER_NAME is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIsNotNull() {
+ addCriterion("USER_NAME is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameEqualTo(String value) {
+ addCriterion("USER_NAME =", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotEqualTo(String value) {
+ addCriterion("USER_NAME <>", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameGreaterThan(String value) {
+ addCriterion("USER_NAME >", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameGreaterThanOrEqualTo(String value) {
+ addCriterion("USER_NAME >=", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLessThan(String value) {
+ addCriterion("USER_NAME <", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLessThanOrEqualTo(String value) {
+ addCriterion("USER_NAME <=", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameLike(String value) {
+ addCriterion("USER_NAME like", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotLike(String value) {
+ addCriterion("USER_NAME not like", value, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameIn(List<String> values) {
+ addCriterion("USER_NAME in", values, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotIn(List<String> values) {
+ addCriterion("USER_NAME not in", values, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameBetween(String value1, String value2) {
+ addCriterion("USER_NAME between", value1, value2, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserNameNotBetween(String value1, String value2) {
+ addCriterion("USER_NAME not between", value1, value2, "userName");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressIsNull() {
+ addCriterion("MAIL_ADDRESS is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressIsNotNull() {
+ addCriterion("MAIL_ADDRESS is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressEqualTo(String value) {
+ addCriterion("MAIL_ADDRESS =", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressNotEqualTo(String value) {
+ addCriterion("MAIL_ADDRESS <>", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressGreaterThan(String value) {
+ addCriterion("MAIL_ADDRESS >", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressGreaterThanOrEqualTo(String value) {
+ addCriterion("MAIL_ADDRESS >=", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressLessThan(String value) {
+ addCriterion("MAIL_ADDRESS <", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressLessThanOrEqualTo(String value) {
+ addCriterion("MAIL_ADDRESS <=", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressLike(String value) {
+ addCriterion("MAIL_ADDRESS like", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressNotLike(String value) {
+ addCriterion("MAIL_ADDRESS not like", value, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressIn(List<String> values) {
+ addCriterion("MAIL_ADDRESS in", values, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressNotIn(List<String> values) {
+ addCriterion("MAIL_ADDRESS not in", values, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressBetween(String value1, String value2) {
+ addCriterion("MAIL_ADDRESS between", value1, value2, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andMailAddressNotBetween(String value1, String value2) {
+ addCriterion("MAIL_ADDRESS not between", value1, value2, "mailAddress");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuIdEqualTo(String value) {
+ addCriterion("ual.A_AU_ID =", value, "auId");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateIsNull() {
+ addCriterion("CREATE_DATE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateIsNotNull() {
+ addCriterion("CREATE_DATE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateEqualTo(Date value) {
+ addCriterion("CREATE_DATE =", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateNotEqualTo(Date value) {
+ addCriterion("CREATE_DATE <>", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateGreaterThan(Date value) {
+ addCriterion("CREATE_DATE >", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
+ addCriterion("CREATE_DATE >=", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateLessThan(Date value) {
+ addCriterion("CREATE_DATE <", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateLessThanOrEqualTo(Date value) {
+ addCriterion("CREATE_DATE <=", value, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateIn(List<Date> values) {
+ addCriterion("CREATE_DATE in", values, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateNotIn(List<Date> values) {
+ addCriterion("CREATE_DATE not in", values, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateBetween(Date value1, Date value2) {
+ addCriterion("CREATE_DATE between", value1, value2, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateDateNotBetween(Date value1, Date value2) {
+ addCriterion("CREATE_DATE not between", value1, value2, "createDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateIsNull() {
+ addCriterion("UPDATE_DATE is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateIsNotNull() {
+ addCriterion("UPDATE_DATE is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateEqualTo(Date value) {
+ addCriterion("UPDATE_DATE =", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateNotEqualTo(Date value) {
+ addCriterion("UPDATE_DATE <>", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateGreaterThan(Date value) {
+ addCriterion("UPDATE_DATE >", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) {
+ addCriterion("UPDATE_DATE >=", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateLessThan(Date value) {
+ addCriterion("UPDATE_DATE <", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateLessThanOrEqualTo(Date value) {
+ addCriterion("UPDATE_DATE <=", value, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateIn(List<Date> values) {
+ addCriterion("UPDATE_DATE in", values, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateNotIn(List<Date> values) {
+ addCriterion("UPDATE_DATE not in", values, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateBetween(Date value1, Date value2) {
+ addCriterion("UPDATE_DATE between", value1, value2, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateDateNotBetween(Date value1, Date value2) {
+ addCriterion("UPDATE_DATE not between", value1, value2, "updateDate");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIsNull() {
+ addCriterion("IS_DEL is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIsNotNull() {
+ addCriterion("IS_DEL is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelEqualTo(String value) {
+ addCriterion("IS_DEL =", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotEqualTo(String value) {
+ addCriterion("IS_DEL <>", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelGreaterThan(String value) {
+ addCriterion("IS_DEL >", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelGreaterThanOrEqualTo(String value) {
+ addCriterion("IS_DEL >=", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLessThan(String value) {
+ addCriterion("IS_DEL <", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLessThanOrEqualTo(String value) {
+ addCriterion("IS_DEL <=", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelLike(String value) {
+ addCriterion("IS_DEL like", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotLike(String value) {
+ addCriterion("IS_DEL not like", value, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelIn(List<String> values) {
+ addCriterion("IS_DEL in", values, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotIn(List<String> values) {
+ addCriterion("IS_DEL not in", values, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelBetween(String value1, String value2) {
+ addCriterion("IS_DEL between", value1, value2, "isDel");
+ return (Criteria) this;
+ }
+
+ public Criteria andIsDelNotBetween(String value1, String value2) {
+ addCriterion("IS_DEL not between", value1, value2, "isDel");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List<?>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/appmarket-persistence/pom.xml b/appmarket-persistence/pom.xml
new file mode 100644
index 0000000..cea0e2e
--- /dev/null
+++ b/appmarket-persistence/pom.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-root</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>appmarket-persistence</artifactId>
+ <packaging>jar</packaging>
+ <name>appmarket-persistence</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <!-- mybatis -->
+ <dependency>
+ <groupId>org.mybatis</groupId>
+ <artifactId>mybatis</artifactId>
+ <version>3.3.0</version>
+ </dependency>
+ <!-- mybatis/spring -->
+ <dependency>
+ <groupId>org.mybatis</groupId>
+ <artifactId>mybatis-spring</artifactId>
+ <version>1.2.2</version>
+ </dependency>
+ <!-- mysql -->
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.29</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/interceptor/PaginationInterceptor.java b/appmarket-persistence/src/main/java/app/market/persistence/interceptor/PaginationInterceptor.java
new file mode 100644
index 0000000..0e84e4d
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/interceptor/PaginationInterceptor.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.interceptor;
+
+import java.sql.Connection;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.ibatis.executor.statement.StatementHandler;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.plugin.Interceptor;
+import org.apache.ibatis.plugin.Intercepts;
+import org.apache.ibatis.plugin.Invocation;
+import org.apache.ibatis.plugin.Plugin;
+import org.apache.ibatis.plugin.Signature;
+import org.apache.ibatis.session.RowBounds;
+
+@Intercepts(@Signature(type = StatementHandler.class, method = "prepare", args = { Connection.class }))
+public class PaginationInterceptor implements Interceptor {
+
+ private final static String SQL_SELECT_REGEX = "(?is)^\\s*SELECT.*$";
+
+ private final static String SQL_COUNT_REGEX = "(?is)^\\s*SELECT\\s+COUNT\\s*\\(\\s*(?:\\*|\\w+)\\s*\\).*$";
+
+ @Override
+ public Object intercept(Invocation inv) throws Throwable {
+ StatementHandler target = (StatementHandler) inv.getTarget();
+ BoundSql boundSql = target.getBoundSql();
+ String sql = boundSql.getSql();
+ if ( StringUtils.isBlank( sql ) ) {
+ return inv.proceed();
+ }
+ if ( sql.matches( SQL_SELECT_REGEX ) && !Pattern.matches( SQL_COUNT_REGEX, sql ) ) {
+ Object obj = FieldUtils.readField( target, "delegate", true );
+ RowBounds rowBounds = (RowBounds) FieldUtils.readField( obj, "rowBounds", true );
+ if ( rowBounds != null && rowBounds != RowBounds.DEFAULT ) {
+ FieldUtils.writeField( boundSql, "sql", newSql( sql, rowBounds ), true );
+ FieldUtils.writeField( rowBounds, "offset", RowBounds.NO_ROW_OFFSET, true );
+ FieldUtils.writeField( rowBounds, "limit", RowBounds.NO_ROW_LIMIT, true );
+ }
+ }
+ return inv.proceed();
+ }
+
+ public String newSql(String oldSql, RowBounds rowBounds) {
+ String end = " limit " + rowBounds.getOffset() + "," + rowBounds.getLimit();
+ return oldSql + end;
+ }
+
+ @Override
+ public Object plugin(Object target) {
+ return Plugin.wrap( target, this );
+ }
+
+ @Override
+ public void setProperties(Properties arg0) {
+ }
+
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppMapper.java
new file mode 100644
index 0000000..ef413a0
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppMapper.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.app;
+
+import java.util.List;
+import app.market.model.app.App;
+import app.market.model.app.AppExample;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.stereotype.Repository;
+
+@Repository(value = "AppMapper")
+public interface AppMapper {
+ int countByExample(AppExample example);
+
+ int deleteByExample(AppExample example);
+
+ int deleteByPrimaryKey(String appId);
+
+ int insert(App record);
+
+ int insertSelective(App record);
+
+ List<App> selectByExample(AppExample example);
+
+ List<App> selectByExample(RowBounds rowBounds, AppExample example);
+
+ App selectByPrimaryKey(String appId);
+
+ App selectByCustomId(String appIdCustom);
+
+ int updateByExampleSelective(@Param("record") App record, @Param("example") AppExample example);
+
+ int updateByExample(@Param("record") App record, @Param("example") AppExample example);
+
+ int updateByPrimaryKeySelective(App record);
+
+ int updateByPrimaryKey(App record);
+
+ int deleteByAppId(String appId);
+
+ int SelectByCount(@Param("keyWord") String keyWord, @Param("appTypeId") String appTypeId,
+ @Param("deviceTypeId") String deviceTypeId, @Param("isPublic") String isPublic);
+
+ List<App> SelectByList(@Param("offset") int offset, @Param("limit") int limit, @Param("keyWord") String keyWord,
+ @Param("order") String order, @Param("sort") String sort,@Param("appTypeId") String appTypeId,
+ @Param("deviceTypeId") String deviceTypeId, @Param("isPublic") String isPublic);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppVersionMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppVersionMapper.java
new file mode 100644
index 0000000..822ca63
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/app/AppVersionMapper.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.app;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import app.market.model.app.AppVersion;
+import app.market.model.app.AppVersionExample;
+
+@Repository(value = "AppVersionMapper")
+public interface AppVersionMapper {
+ int countByExample(AppVersionExample example);
+
+ int deleteByExample(AppVersionExample example);
+
+ int deleteByPrimaryKey(String versionId);
+
+ int insert(AppVersion record);
+
+ int insertSelective(AppVersion record);
+
+ List<AppVersion> selectByExample(AppVersionExample example);
+
+ AppVersion selectByPrimaryKey(String versionId);
+
+ int updateByExampleSelective(@Param("record") AppVersion record, @Param("example") AppVersionExample example);
+
+ int updateByExample(@Param("record") AppVersion record, @Param("example") AppVersionExample example);
+
+ int updateByPrimaryKeySelective(AppVersion record);
+
+ int updateByPrimaryKey(AppVersion record);
+
+ int deleteByAppId(String appId);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityMapper.java
new file mode 100644
index 0000000..a64ed59
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityMapper.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.authority;
+
+import java.util.List;
+import app.market.model.authority.Authority;
+import app.market.model.authority.AuthorityExample;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Repository(value = "AuthorityMapper")
+public interface AuthorityMapper {
+ int countByExample(AuthorityExample example);
+
+ int deleteByExample(AuthorityExample example);
+
+ int deleteByPrimaryKey(String auId);
+
+ int insert(Authority record);
+
+ int insertSelective(Authority record);
+
+ List<Authority> selectByExample(AuthorityExample example);
+
+ Authority selectByPrimaryKey(String auId);
+
+ int updateByExampleSelective(@Param("record") Authority record, @Param("example") AuthorityExample example);
+
+ int updateByExample(@Param("record") Authority record, @Param("example") AuthorityExample example);
+
+ int updateByPrimaryKeySelective(Authority record);
+
+ int updateByPrimaryKey(Authority record);
+
+ List<Authority> selectOption();
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityResourceLinkMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityResourceLinkMapper.java
new file mode 100644
index 0000000..18b4c00
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/authority/AuthorityResourceLinkMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.authority;
+
+import java.util.List;
+import app.market.model.authority.AuthorityResourceLinkExample;
+import app.market.model.authority.AuthorityResourceLinkKey;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Repository(value = "AuthorityResourceLinkMapper")
+public interface AuthorityResourceLinkMapper {
+ int countByExample(AuthorityResourceLinkExample example);
+
+ int deleteByExample(AuthorityResourceLinkExample example);
+
+ int deleteByPrimaryKey(AuthorityResourceLinkKey key);
+
+ int insert(AuthorityResourceLinkKey record);
+
+ int insertSelective(AuthorityResourceLinkKey record);
+
+ List<AuthorityResourceLinkKey> selectByExample(AuthorityResourceLinkExample example);
+
+ int updateByExampleSelective(@Param("record") AuthorityResourceLinkKey record,
+ @Param("example") AuthorityResourceLinkExample example);
+
+ int updateByExample(@Param("record") AuthorityResourceLinkKey record,
+ @Param("example") AuthorityResourceLinkExample example);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/DictionaryMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/DictionaryMapper.java
new file mode 100644
index 0000000..e5e3137
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/DictionaryMapper.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.resource;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import app.market.model.resource.Dictionary;
+import app.market.model.resource.DictionaryExample;
+
+@Repository(value = "DictionaryMapper")
+public interface DictionaryMapper {
+ int countByExample(DictionaryExample example);
+
+ int deleteByExample(DictionaryExample example);
+
+ int deleteByPrimaryKey(Integer dicId);
+
+ int insert(Dictionary record);
+
+ int insertSelective(Dictionary record);
+
+ List<Dictionary> selectByExample(DictionaryExample example);
+
+ Dictionary selectByPrimaryKey(Integer dicId);
+
+ int updateByExampleSelective(@Param("record") Dictionary record, @Param("example") DictionaryExample example);
+
+ int updateByExample(@Param("record") Dictionary record, @Param("example") DictionaryExample example);
+
+ int updateByPrimaryKeySelective(Dictionary record);
+
+ int updateByPrimaryKey(Dictionary record);
+
+ List<Dictionary> selectItemsByTypeId(String typeId);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/ResourceMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/ResourceMapper.java
new file mode 100644
index 0000000..54aed67
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/resource/ResourceMapper.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.resource;
+
+import java.util.List;
+import app.market.model.resource.Resource;
+import app.market.model.resource.ResourceExample;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Repository(value = "ResourceMapper")
+public interface ResourceMapper {
+ int countByExample(ResourceExample example);
+
+ int deleteByExample(ResourceExample example);
+
+ int deleteByPrimaryKey(String resId);
+
+ int insert(Resource record);
+
+ int insertSelective(Resource record);
+
+ List<Resource> selectByExample(ResourceExample example);
+
+ Resource selectByPrimaryKey(String resId);
+
+ int updateByExampleSelective(@Param("record") Resource record, @Param("example") ResourceExample example);
+
+ int updateByExample(@Param("record") Resource record, @Param("example") ResourceExample example);
+
+ int updateByPrimaryKeySelective(Resource record);
+
+ int updateByPrimaryKey(Resource record);
+
+ List<Resource> selectResourcesByUserId(String userName);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserAuthorityLinkMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserAuthorityLinkMapper.java
new file mode 100644
index 0000000..145cde7
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserAuthorityLinkMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.user;
+
+import java.util.List;
+import app.market.model.user.UserAuthorityLinkExample;
+import app.market.model.user.UserAuthorityLinkKey;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Repository(value = "UserAuthorityLinkMapper")
+public interface UserAuthorityLinkMapper {
+ int countByExample(UserAuthorityLinkExample example);
+
+ int deleteByExample(UserAuthorityLinkExample example);
+
+ int deleteByPrimaryKey(UserAuthorityLinkKey key);
+
+ int insert(UserAuthorityLinkKey record);
+
+ int insertSelective(UserAuthorityLinkKey record);
+
+ List<UserAuthorityLinkKey> selectByExample(UserAuthorityLinkExample example);
+
+ int updateByExampleSelective(@Param("record") UserAuthorityLinkKey record,
+ @Param("example") UserAuthorityLinkExample example);
+
+ int updateByExample(@Param("record") UserAuthorityLinkKey record,
+ @Param("example") UserAuthorityLinkExample example);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserMapper.java b/appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserMapper.java
new file mode 100644
index 0000000..e334146
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/mapper/user/UserMapper.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persistence.mapper.user;
+
+import java.util.List;
+import app.market.model.user.User;
+import app.market.model.user.UserExample;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.stereotype.Repository;
+
+@Repository(value = "UserMapper")
+public interface UserMapper {
+ int countByExample(UserExample example);
+
+ int deleteByExample(UserExample example);
+
+ int deleteByPrimaryKey(String userId);
+
+ int insert(User record);
+
+ int insertSelective(User record);
+
+ List<User> selectByExample(UserExample example);
+
+ User selectByPrimaryKey(String userId);
+
+ List<User> selectOptionByExample(UserExample example);
+
+ User selectOneByExample(UserExample example);
+
+ User selectByLoginId(String loginId);
+
+ int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
+
+ int updateByExample(@Param("record") User record, @Param("example") UserExample example);
+
+ int updateByPrimaryKeySelective(User record);
+
+ int updateByPrimaryKey(User record);
+
+ int updatePassword(User record);
+
+ int updateByPrimaryKeyWithBLOBs(User record);
+
+ int insertOrUpdate(User record);
+
+ List<User> selectByExample(RowBounds rowBounds, UserExample example);
+
+ int deleteByUserName(String userName);
+
+ int countByUserName(String userName);
+
+ int countByUserId(String userId);
+
+ User selectByUserName(String userName);
+} \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppMapper.xml
new file mode 100644
index 0000000..d025f54
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppMapper.xml
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.app.AppMapper" >
+ <resultMap id="BaseResultMap" type="App" >
+ <id column="APP_ID" property="appId" jdbcType="CHAR" />
+ <result column="APP_NAME" property="appName" jdbcType="VARCHAR" />
+ <result column="APP_ABSTRACT" property="appAbstract" jdbcType="VARCHAR" />
+ <result column="APP_TYPE_ID" property="typeId" jdbcType="CHAR" />
+ <result column="APP_DEVICE_TYPE_ID" property="appDeviceTypeId" jdbcType="CHAR" />
+ <result column="APP_DEVICE_TYPE_NAME" property="appDeviceTypeName" jdbcType="CHAR" />
+ <result column="TYPE_NAME" property="typeName" jdbcType="VARCHAR" />
+ <result column="DEVELOPER" property="developer" jdbcType="CHAR" />
+ <result column="USER_NAME" property="developerName" jdbcType="VARCHAR" />
+ <result column="VERSION_NAME" property="versionName" jdbcType="VARCHAR" />
+ <result column="FILE_PATH" property="verFilePath" jdbcType="VARCHAR" />
+ <result column="SIZE" property="verFileSize" jdbcType="INTEGER" />
+ <result column="VERSION_CREATE_DATE" property="verCreateDate" jdbcType="TIMESTAMP" />
+ <result column="APP_CREATE_DATE" property="createDate" jdbcType="TIMESTAMP" />
+ <result column="APP_UPDATE_DATE" property="updateDate" jdbcType="TIMESTAMP" />
+ <result column="APP_IS_DEL" property="isDel" jdbcType="CHAR" />
+ <result column="MD5" property="hashcode" jdbcType="CHAR" />
+ <result column="APP_IS_PUBLIC" property="appIsPublic" jdbcType="CHAR" />
+ <result column="PUBLIC_LABLE" property="appIsPublicLable" jdbcType="CHAR" />
+ <result column="APP_VERSION_ID" property="appVersionId" jdbcType="VARCHAR" />
+ <result column="APP_ID_CUSTOM" property="appIdCustom" jdbcType="VARCHAR" />
+ <result column="IMAGE_PATH" property="imagePath" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ APP_ID, APP_NAME, APP_ABSTRACT,
+ APP_TYPE_ID,APP_ID_CUSTOM,IMAGE_PATH,
+ (select category.DIC_LABEL
+ from t_dictionary as category
+ where category.DIC_VALUE = APP_TYPE_ID and category.DIC_TYPE="0100"
+ ) as TYPE_NAME,
+ DEVELOPER,USER_NAME,
+ APP_VERSION_ID, APP_CREATE_DATE, APP_UPDATE_DATE, APP_IS_DEL,
+ FILE_PATH, SIZE, VERSION_CREATE_DATE, MD5, VERSION_NAME,
+ APP_IS_PUBLIC,
+ (select public.DIC_LABEL
+ from t_dictionary as public
+ where public.DIC_VALUE = APP_IS_PUBLIC and public.DIC_TYPE="0102"
+ ) as PUBLIC_LABLE,
+ APP_DEVICE_TYPE_ID,
+ (select device.DIC_LABEL
+ from t_dictionary as device
+ where device.DIC_VALUE = APP_DEVICE_TYPE_ID and device.DIC_TYPE="0101"
+ ) as APP_DEVICE_TYPE_NAME
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="AppExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_app
+ left join t_user on DEVELOPER = USER_ID
+ left join t_app_version on (APP_VERSION_ID = VERSION_ID and APP_ID = V_APP_ID)
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from t_app
+ left join t_user on DEVELOPER = USER_ID
+ left join t_app_version on (APP_VERSION_ID = VERSION_ID and APP_ID = V_APP_ID)
+ where APP_ID = #{appId,jdbcType=CHAR}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+ delete from t_app
+ where APP_ID = #{appId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="AppExample" >
+ delete from t_app
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="App" >
+ insert into t_app (APP_ID, APP_NAME, APP_ABSTRACT,
+ APP_TYPE_ID, APP_DEVICE_TYPE_ID, DEVELOPER, APP_CREATE_DATE,
+ APP_UPDATE_DATE, APP_IS_DEL,APP_VERSION_ID, APP_IS_PUBLIC,
+ APP_ID_CUSTOM)
+ values (#{appId,jdbcType=CHAR}, #{appName,jdbcType=VARCHAR}, #{appAbstract,jdbcType=VARCHAR},
+ #{typeId,jdbcType=CHAR}, #{appDeviceTypeId,jdbcType=CHAR}, #{developer,jdbcType=CHAR}, #{createDate,jdbcType=TIMESTAMP},
+ #{updateDate,jdbcType=TIMESTAMP}, #{isDel,jdbcType=CHAR}, #{appVersionId,jdbcType=VARCHAR}, #{appIsPublic,jdbcType=CHAR},
+ #{appIdCustom,jdbcType=VARCHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="App" >
+ insert into t_app
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="appId != null" >
+ APP_ID,
+ </if>
+ <if test="appName != null" >
+ APP_NAME,
+ </if>
+ <if test="appAbstract != null" >
+ APP_ABSTRACT,
+ </if>
+ <if test="typeId != null" >
+ APP_TYPE_ID,
+ </if>
+ <if test="appDeviceTypeId != null" >
+ APP_DEVICE_TYPE_ID,
+ </if>
+ <if test="developer != null" >
+ DEVELOPER,
+ </if>
+ <if test="createDate != null" >
+ APP_CREATE_DATE,
+ </if>
+ <if test="updateDate != null" >
+ APP_UPDATE_DATE,
+ </if>
+ <if test="isDel != null" >
+ APP_IS_DEL,
+ </if>
+ <if test="appVersionId != null" >
+ APP_VERSION_ID,
+ </if>
+ <if test="appIsPublic != null" >
+ APP_IS_PUBLIC,
+ </if>
+ <if test="appIdCustom != null" >
+ APP_ID_CUSTOM,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="appId != null" >
+ #{appId,jdbcType=CHAR},
+ </if>
+ <if test="appName != null" >
+ #{appName,jdbcType=VARCHAR},
+ </if>
+ <if test="appAbstract != null" >
+ #{appAbstract,jdbcType=VARCHAR},
+ </if>
+ <if test="typeId != null" >
+ #{typeId,jdbcType=CHAR},
+ </if>
+ <if test="appDeviceTypeId != null" >
+ #{appDeviceTypeId,jdbcType=CHAR},
+ </if>
+ <if test="developer != null" >
+ #{developer,jdbcType=CHAR},
+ </if>
+ <if test="createDate != null" >
+ #{createDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="updateDate != null" >
+ #{updateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="isDel != null" >
+ #{isDel,jdbcType=CHAR},
+ </if>
+ <if test="appVersionId != null" >
+ #{appVersionId,jdbcType=VARCHAR},
+ </if>
+ <if test="appIsPublic != null" >
+ #{appIsPublic,jdbcType=CHAR},
+ </if>
+ <if test="appIdCustom != null" >
+ #{appIdCustom,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="AppExample" resultType="java.lang.Integer" >
+ select count(*) from t_app
+ left join t_user on DEVELOPER = USER_ID
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_app
+ <set >
+ <if test="record.appId != null" >
+ APP_ID = #{record.appId,jdbcType=CHAR},
+ </if>
+ <if test="record.appName != null" >
+ APP_NAME = #{record.appName,jdbcType=VARCHAR},
+ </if>
+ <if test="record.appAbstract != null" >
+ APP_ABSTRACT = #{record.appAbstract,jdbcType=VARCHAR},
+ </if>
+ <if test="record.typeId != null" >
+ APP_TYPE_ID = #{record.typeId,jdbcType=CHAR},
+ </if>
+ <if test="record.appDeviceTypeId != null" >
+ APP_DEVICE_TYPE_ID = #{record.appDeviceTypeId,jdbcType=CHAR},
+ </if>
+ <if test="record.developer != null" >
+ DEVELOPER = #{record.developer,jdbcType=CHAR},
+ </if>
+ <if test="record.createDate != null" >
+ APP_CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="record.updateDate != null" >
+ APP_UPDATE_DATE = #{record.updateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="record.isDel != null" >
+ APP_IS_DEL = #{record.isDel,jdbcType=CHAR},
+ </if>
+ <if test="record.appVersionId != null" >
+ APP_VERSION_ID = #{record.appVersionId,jdbcType=VARCHAR},
+ </if>
+ <if test="record.appIsPublic != null" >
+ APP_IS_PUBLIC = #{record.appIsPublic,jdbcType=CHAR},
+ </if>
+ <if test="record.appIdCustom != null" >
+ APP_ID_CUSTOM = #{record.appIdCustom,jdbcType=VARCHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_app
+ set APP_ID = #{record.appId,jdbcType=CHAR},
+ APP_NAME = #{record.appName,jdbcType=VARCHAR},
+ APP_ABSTRACT = #{record.appAbstract,jdbcType=VARCHAR},
+ APP_TYPE_ID = #{record.typeId,jdbcType=CHAR},
+ APP_DEVICE_TYPE_ID = #{record.appDeviceTypeId,jdbcType=CHAR},
+ DEVELOPER = #{record.developer,jdbcType=CHAR},
+ APP_CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
+ APP_UPDATE_DATE = #{record.updateDate,jdbcType=TIMESTAMP},
+ APP_VERSION_ID = #{record.appVersionId,jdbcType=VARCHAR},
+ APP_IS_DEL = #{record.isDel,jdbcType=CHAR},
+ APP_IS_PUBLIC = #{record.appIsPublic,jdbcType=CHAR}
+ APP_ID_CUSTOM = #{record.appIdCustom,jdbcType=VARCHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByPrimaryKeySelective" parameterType="App" >
+ update t_app
+ <set >
+ <if test="appName != null" >
+ APP_NAME = #{appName,jdbcType=VARCHAR},
+ </if>
+ <if test="appAbstract != null" >
+ APP_ABSTRACT = #{appAbstract,jdbcType=VARCHAR},
+ </if>
+ <if test="typeId != null" >
+ APP_TYPE_ID = #{typeId,jdbcType=CHAR},
+ </if>
+ <if test="appDeviceTypeId != null" >
+ APP_DEVICE_TYPE_ID = #{appDeviceTypeId,jdbcType=CHAR},
+ </if>
+ <if test="developer != null" >
+ DEVELOPER = #{developer,jdbcType=CHAR},
+ </if>
+ <if test="createDate != null" >
+ APP_CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="updateDate != null" >
+ APP_UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="appVersionId != null" >
+ APP_VERSION_ID = #{appVersionId,jdbcType=VARCHAR},
+ </if>
+ <if test="isDel != null" >
+ APP_IS_DEL = #{isDel,jdbcType=CHAR},
+ </if>
+ <if test="appIsPublic != null" >
+ APP_IS_PUBLIC = #{appIsPublic,jdbcType=CHAR},
+ </if>
+ <if test="appIdCustom != null" >
+ APP_ID_CUSTOM = #{appIdCustom,jdbcType=VARCHAR},
+ </if>
+ </set>
+ where APP_ID = #{appId,jdbcType=CHAR}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="App" >
+ update t_app
+ set APP_NAME = #{appName,jdbcType=VARCHAR},
+ APP_ABSTRACT = #{appAbstract,jdbcType=VARCHAR},
+ APP_TYPE_ID = #{typeId,jdbcType=CHAR},
+ APP_DEVICE_TYPE_ID = #{appDeviceTypeId,jdbcType=CHAR},
+ DEVELOPER = #{developer,jdbcType=CHAR},
+ APP_CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
+ APP_UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
+ APP_VERSION_ID = #{appVersionId,jdbcType=VARCHAR},
+ APP_IS_DEL = #{isDel,jdbcType=CHAR},
+ APP_IS_PUBLIC = #{appIsPublic,jdbcType=CHAR},
+ APP_ID_CUSTOM = #{appIdCustom,jdbcType=VARCHAR}
+ where APP_ID = #{appId,jdbcType=CHAR}
+ </update>
+ <update id="deleteByAppId" parameterType="java.lang.String" >
+ update t_app
+ set APP_IS_DEL = "1", APP_ID_CUSTOM = concat(APP_ID_CUSTOM,"-",APP_ID)
+ where APP_ID = #{appId,jdbcType=CHAR}
+ </update>
+ <select id="selectByCustomId" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from t_app
+ left join t_user on DEVELOPER = USER_ID
+ left join t_app_version on (APP_VERSION_ID = VERSION_ID and APP_ID = V_APP_ID)
+ where APP_ID_CUSTOM = #{appIdCustom,jdbcType=VARCHAR}
+ </select>
+
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppVersionMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppVersionMapper.xml
new file mode 100644
index 0000000..d8ab1b8
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppVersionMapper.xml
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.app.AppVersionMapper" >
+ <resultMap id="BaseResultMap" type="AppVersion" >
+ <id column="VERSION_ID" property="versionId" jdbcType="CHAR" />
+ <result column="V_APP_ID" property="vAppId" jdbcType="CHAR" />
+ <result column="VERSION_NAME" property="versionName" jdbcType="VARCHAR" />
+ <result column="SIZE" property="size" jdbcType="INTEGER" />
+ <result column="COMMENT" property="comment" jdbcType="VARCHAR" />
+ <result column="FILE_PATH" property="filePath" jdbcType="VARCHAR" />
+ <result column="MD5" property="md5" jdbcType="CHAR" />
+ <result column="VERSION_CREATE_DATE" property="versionCreateDate" jdbcType="TIMESTAMP" />
+ <result column="VERSION_IS_DEL" property="versionIsDel" jdbcType="CHAR" />
+ <result column="IMAGE_PATH" property="imagePath" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ VERSION_ID, V_APP_ID, VERSION_NAME, SIZE, COMMENT, FILE_PATH, MD5, VERSION_CREATE_DATE,
+ VERSION_IS_DEL, IMAGE_PATH
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="AppVersionExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_app_version
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from t_app_version
+ where VERSION_ID = #{versionId,jdbcType=CHAR}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+ delete from t_app_version
+ where VERSION_ID = #{versionId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="AppVersionExample" >
+ delete from t_app_version
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="AppVersion" >
+ insert into t_app_version (VERSION_ID, V_APP_ID, VERSION_NAME,
+ SIZE, COMMENT, FILE_PATH,
+ MD5, VERSION_CREATE_DATE, VERSION_IS_DEL,
+ IMAGE_PATH)
+ values (#{versionId,jdbcType=CHAR}, #{vAppId,jdbcType=CHAR}, #{versionName,jdbcType=VARCHAR},
+ #{size,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR},
+ #{md5,jdbcType=CHAR}, #{versionCreateDate,jdbcType=TIMESTAMP}, #{versionIsDel,jdbcType=CHAR},
+ #{imagePath,jdbcType=VARCHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="AppVersion" >
+ insert into t_app_version
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="versionId != null" >
+ VERSION_ID,
+ </if>
+ <if test="vAppId != null" >
+ V_APP_ID,
+ </if>
+ <if test="versionName != null" >
+ VERSION_NAME,
+ </if>
+ <if test="size != null" >
+ SIZE,
+ </if>
+ <if test="comment != null" >
+ COMMENT,
+ </if>
+ <if test="filePath != null" >
+ FILE_PATH,
+ </if>
+ <if test="md5 != null" >
+ MD5,
+ </if>
+ <if test="versionCreateDate != null" >
+ VERSION_CREATE_DATE,
+ </if>
+ <if test="versionIsDel != null" >
+ VERSION_IS_DEL,
+ </if>
+ <if test="imagePath != null" >
+ IMAGE_PATH,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="versionId != null" >
+ #{versionId,jdbcType=CHAR},
+ </if>
+ <if test="vAppId != null" >
+ #{vAppId,jdbcType=CHAR},
+ </if>
+ <if test="versionName != null" >
+ #{versionName,jdbcType=VARCHAR},
+ </if>
+ <if test="size != null" >
+ #{size,jdbcType=INTEGER},
+ </if>
+ <if test="comment != null" >
+ #{comment,jdbcType=VARCHAR},
+ </if>
+ <if test="filePath != null" >
+ #{filePath,jdbcType=VARCHAR},
+ </if>
+ <if test="md5 != null" >
+ #{md5,jdbcType=CHAR},
+ </if>
+ <if test="versionCreateDate != null" >
+ #{versionCreateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="versionIsDel != null" >
+ #{versionIsDel,jdbcType=CHAR},
+ </if>
+ <if test="imagePath != null" >
+ #{imagePath,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="AppVersionExample" resultType="java.lang.Integer" >
+ select count(*) from t_app_version
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_app_version
+ <set >
+ <if test="record.versionId != null" >
+ VERSION_ID = #{record.versionId,jdbcType=CHAR},
+ </if>
+ <if test="record.vAppId != null" >
+ V_APP_ID = #{record.vAppId,jdbcType=CHAR},
+ </if>
+ <if test="record.versionName != null" >
+ VERSION_NAME = #{record.versionName,jdbcType=VARCHAR},
+ </if>
+ <if test="record.size != null" >
+ SIZE = #{record.size,jdbcType=INTEGER},
+ </if>
+ <if test="record.comment != null" >
+ COMMENT = #{record.comment,jdbcType=VARCHAR},
+ </if>
+ <if test="record.filePath != null" >
+ FILE_PATH = #{record.filePath,jdbcType=VARCHAR},
+ </if>
+ <if test="record.md5 != null" >
+ MD5 = #{record.md5,jdbcType=CHAR},
+ </if>
+ <if test="record.versionCreateDate != null" >
+ VERSION_CREATE_DATE = #{record.versionCreateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="record.versionIsDel != null" >
+ VERSION_IS_DEL = #{record.versionIsDel,jdbcType=CHAR},
+ </if>
+ <if test="record.imagePath != null" >
+ IMAGE_PATH = #{record.imagePath,jdbcType=VARCHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_app_version
+ set VERSION_ID = #{record.versionId,jdbcType=CHAR},
+ V_APP_ID = #{record.vAppId,jdbcType=CHAR},
+ VERSION_NAME = #{record.versionName,jdbcType=VARCHAR},
+ SIZE = #{record.size,jdbcType=INTEGER},
+ COMMENT = #{record.comment,jdbcType=VARCHAR},
+ FILE_PATH = #{record.filePath,jdbcType=VARCHAR},
+ MD5 = #{record.md5,jdbcType=CHAR},
+ VERSION_CREATE_DATE = #{record.versionCreateDate,jdbcType=TIMESTAMP},
+ VERSION_IS_DEL = #{record.versionIsDel,jdbcType=CHAR},
+ IMAGE_PATH = #{record.imagePath,jdbcType=VARCHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByPrimaryKeySelective" parameterType="AppVersion" >
+ update t_app_version
+ <set >
+ <if test="vAppId != null" >
+ V_APP_ID = #{vAppId,jdbcType=CHAR},
+ </if>
+ <if test="versionName != null" >
+ VERSION_NAME = #{versionName,jdbcType=VARCHAR},
+ </if>
+ <if test="size != null" >
+ SIZE = #{size,jdbcType=INTEGER},
+ </if>
+ <if test="comment != null" >
+ COMMENT = #{comment,jdbcType=VARCHAR},
+ </if>
+ <if test="filePath != null" >
+ FILE_PATH = #{filePath,jdbcType=VARCHAR},
+ </if>
+ <if test="md5 != null" >
+ MD5 = #{md5,jdbcType=CHAR},
+ </if>
+ <if test="versionCreateDate != null" >
+ VERSION_CREATE_DATE = #{versionCreateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="versionIsDel != null" >
+ VERSION_IS_DEL = #{versionIsDel,jdbcType=CHAR},
+ </if>
+ <if test="imagePath != null" >
+ IMAGE_PATH = #{imagePath,jdbcType=VARCHAR},
+ </if>
+ </set>
+ where VERSION_ID = #{versionId,jdbcType=CHAR}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="AppVersion" >
+ update t_app_version
+ set V_APP_ID = #{vAppId,jdbcType=CHAR},
+ VERSION_NAME = #{versionName,jdbcType=VARCHAR},
+ SIZE = #{size,jdbcType=INTEGER},
+ COMMENT = #{comment,jdbcType=VARCHAR},
+ FILE_PATH = #{filePath,jdbcType=VARCHAR},
+ MD5 = #{md5,jdbcType=CHAR},
+ VERSION_CREATE_DATE = #{versionCreateDate,jdbcType=TIMESTAMP},
+ VERSION_IS_DEL = #{versionIsDel,jdbcType=CHAR},
+ IMAGE_PATH = #{imagePath,jdbcType=VARCHAR}
+ where VERSION_ID = #{versionId,jdbcType=CHAR}
+ </update>
+ <update id="deleteByAppId" parameterType="java.lang.String" >
+ update t_app_version
+ set VERSION_IS_DEL = "1"
+ where V_APP_ID = #{appId,jdbcType=CHAR}
+ </update>
+
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityMapper.xml
new file mode 100644
index 0000000..7843e0a
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityMapper.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.authority.AuthorityMapper" >
+ <resultMap id="BaseResultMap" type="Authority" >
+ <id column="AU_ID" property="auId" jdbcType="CHAR" />
+ <result column="AU_NAME" property="auName" jdbcType="VARCHAR" />
+ <result column="AU_IS_DEL" property="isDel" jdbcType="CHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ AU_ID, AU_NAME, AU_IS_DEL
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="AuthorityExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_authority
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from t_authority
+ where AU_ID = #{auId,jdbcType=CHAR}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+ delete from t_authority
+ where AU_ID = #{auId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="AuthorityExample" >
+ delete from t_authority
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="Authority" >
+ insert into t_authority (AU_ID, AU_NAME, AU_IS_DEL
+ )
+ values (#{auId,jdbcType=CHAR}, #{auName,jdbcType=VARCHAR}, #{isDel,jdbcType=CHAR}
+ )
+ </insert>
+ <insert id="insertSelective" parameterType="Authority" >
+ insert into t_authority
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="auId != null" >
+ AU_ID,
+ </if>
+ <if test="auName != null" >
+ AU_NAME,
+ </if>
+ <if test="isDel != null" >
+ AU_IS_DEL,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="auId != null" >
+ #{auId,jdbcType=CHAR},
+ </if>
+ <if test="auName != null" >
+ #{auName,jdbcType=VARCHAR},
+ </if>
+ <if test="isDel != null" >
+ #{isDel,jdbcType=CHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="AuthorityExample" resultType="java.lang.Integer" >
+ select count(*) from t_authority
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_authority
+ <set >
+ <if test="record.auId != null" >
+ AU_ID = #{record.auId,jdbcType=CHAR},
+ </if>
+ <if test="record.auName != null" >
+ AU_NAME = #{record.auName,jdbcType=VARCHAR},
+ </if>
+ <if test="record.isDel != null" >
+ AU_IS_DEL = #{record.isDel,jdbcType=CHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_authority
+ set AU_ID = #{record.auId,jdbcType=CHAR},
+ AU_NAME = #{record.auName,jdbcType=VARCHAR},
+ AU_IS_DEL = #{record.isDel,jdbcType=CHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByPrimaryKeySelective" parameterType="Authority" >
+ update t_authority
+ <set >
+ <if test="auName != null" >
+ AU_NAME = #{auName,jdbcType=VARCHAR},
+ </if>
+ <if test="isDel != null" >
+ AU_IS_DEL = #{isDel,jdbcType=CHAR},
+ </if>
+ </set>
+ where AU_ID = #{auId,jdbcType=CHAR}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="Authority" >
+ update t_authority
+ set AU_NAME = #{auName,jdbcType=VARCHAR},
+ AU_IS_DEL = #{isDel,jdbcType=CHAR}
+ where AU_ID = #{auId,jdbcType=CHAR}
+ </update>
+ <select id="selectOption" resultMap="BaseResultMap" parameterType="AuthorityExample" useCache="true">
+ SELECT
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' AS QUERYID, AU_ID, AU_NAME
+ FROM
+ t_authority
+ WHERE
+ AU_IS_DEL = '0'
+ ORDER BY AU_ID
+ </select>
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityResourceLinkMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityResourceLinkMapper.xml
new file mode 100644
index 0000000..bff6c1f
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityResourceLinkMapper.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.authority.AuthorityResourceLinkMapper" >
+ <resultMap id="BaseResultMap" type="AuthorityResourceLinkKey" >
+ <id column="R_RES_ID" property="resId" jdbcType="CHAR" />
+ <id column="R_AU_ID" property="auId" jdbcType="CHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ R_RES_ID, R_AU_ID
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="AuthorityResourceLinkExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_authority_resource_link
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="AuthorityResourceLinkKey" >
+ delete from t_authority_resource_link
+ where R_RES_ID = #{resId,jdbcType=CHAR}
+ and R_AU_ID = #{auId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="AuthorityResourceLinkExample" >
+ delete from t_authority_resource_link
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="AuthorityResourceLinkKey" >
+ insert into t_authority_resource_link (R_RES_ID, R_AU_ID)
+ values (#{resId,jdbcType=CHAR}, #{auId,jdbcType=CHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="AuthorityResourceLinkKey" >
+ insert into t_authority_resource_link
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="resId != null" >
+ R_RES_ID,
+ </if>
+ <if test="auId != null" >
+ R_AU_ID,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="resId != null" >
+ #{resId,jdbcType=CHAR},
+ </if>
+ <if test="auId != null" >
+ #{auId,jdbcType=CHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="AuthorityResourceLinkExample" resultType="java.lang.Integer" >
+ select count(*) from t_authority_resource_link
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_authority_resource_link
+ <set >
+ <if test="record.resId != null" >
+ R_RES_ID = #{record.resId,jdbcType=CHAR},
+ </if>
+ <if test="record.auId != null" >
+ R_AU_ID = #{record.auId,jdbcType=CHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_authority_resource_link
+ set R_RES_ID = #{record.resId,jdbcType=CHAR},
+ R_AU_ID = #{record.auId,jdbcType=CHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/resource/DictionaryMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/resource/DictionaryMapper.xml
new file mode 100644
index 0000000..92bfaf9
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/resource/DictionaryMapper.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.resource.DictionaryMapper" >
+ <resultMap id="BaseResultMap" type="Dictionary" >
+ <id column="DIC_ID" property="dicId" jdbcType="INTEGER" />
+ <result column="DIC_TYPE" property="dicType" jdbcType="VARCHAR" />
+ <result column="DIC_VALUE" property="dicValue" jdbcType="VARCHAR" />
+ <result column="DIC_LABEL" property="dicLabel" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ DIC_ID, DIC_TYPE, DIC_VALUE, DIC_LABEL
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="DictionaryExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_dictionary
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+ select
+ <include refid="Base_Column_List" />
+ from t_dictionary
+ where DIC_ID = #{dicId,jdbcType=INTEGER}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+ delete from t_dictionary
+ where DIC_ID = #{dicId,jdbcType=INTEGER}
+ </delete>
+ <delete id="deleteByExample" parameterType="DictionaryExample" >
+ delete from t_dictionary
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="Dictionary" useGeneratedKeys="true" keyProperty="DIC_ID">
+ insert into t_dictionary (DIC_ID, DIC_TYPE, DIC_VALUE, DIC_LABEL)
+ select #{dicId,jdbcType=INTEGER},
+ #{dicType,jdbcType=VARCHAR},
+ (SELECT max(cast(DIC_VALUE as SIGNED))+1 FROM t_dictionary where DIC_TYPE = #{dicType,jdbcType=VARCHAR}),
+ #{dicLabel,jdbcType=VARCHAR}
+ </insert>
+ <insert id="insertSelective" parameterType="Dictionary" >
+ insert into t_dictionary
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="dicId != null" >
+ DIC_ID,
+ </if>
+ <if test="dicType != null" >
+ DIC_TYPE,
+ </if>
+ <if test="dicValue != null" >
+ DIC_VALUE,
+ </if>
+ <if test="dicLabel != null" >
+ DIC_LABEL,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="dicId != null" >
+ #{dicId,jdbcType=INTEGER},
+ </if>
+ <if test="dicType != null" >
+ #{dicType,jdbcType=VARCHAR},
+ </if>
+ <if test="dicValue != null" >
+ #{dicValue,jdbcType=VARCHAR},
+ </if>
+ <if test="dicLabel != null" >
+ #{dicLabel,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="DictionaryExample" resultType="java.lang.Integer" >
+ select count(*) from t_dictionary
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_dictionary
+ <set >
+ <if test="record.dicId != null" >
+ DIC_ID = #{record.dicId,jdbcType=INTEGER},
+ </if>
+ <if test="record.dicType != null" >
+ DIC_TYPE = #{record.dicType,jdbcType=VARCHAR},
+ </if>
+ <if test="record.dicValue != null" >
+ DIC_VALUE = #{record.dicValue,jdbcType=VARCHAR},
+ </if>
+ <if test="record.dicLabel != null" >
+ DIC_LABEL = #{record.dicLabel,jdbcType=VARCHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_dictionary
+ set DIC_LABEL = #{record.dicLabel,jdbcType=VARCHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByPrimaryKeySelective" parameterType="Dictionary" >
+ update t_dictionary
+ <set >
+ <if test="dicType != null" >
+ DIC_TYPE = #{dicType,jdbcType=VARCHAR},
+ </if>
+ <if test="dicValue != null" >
+ DIC_VALUE = #{dicValue,jdbcType=VARCHAR},
+ </if>
+ <if test="dicLabel != null" >
+ DIC_LABEL = #{dicLabel,jdbcType=VARCHAR},
+ </if>
+ </set>
+ where DIC_ID = #{dicId,jdbcType=INTEGER}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="Dictionary" >
+ update t_dictionary
+ set DIC_TYPE = #{dicType,jdbcType=VARCHAR},
+ DIC_VALUE = #{dicValue,jdbcType=VARCHAR},
+ DIC_LABEL = #{dicLabel,jdbcType=VARCHAR}
+ where DIC_ID = #{dicId,jdbcType=INTEGER}
+ </update>
+ <select id="selectItemsByTypeId" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from t_dictionary
+ where DIC_TYPE = #{dicType,jdbcType=VARCHAR}
+ order by DIC_VALUE
+ </select>
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/resource/ResourceMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/resource/ResourceMapper.xml
new file mode 100644
index 0000000..876607e
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/resource/ResourceMapper.xml
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.resource.ResourceMapper" >
+ <resultMap id="BaseResultMap" type="Resource" >
+ <id column="RES_ID" property="resId" jdbcType="CHAR" />
+ <result column="RES_NAME" property="resName" jdbcType="VARCHAR" />
+ <result column="RES_TYPE" property="resType" jdbcType="VARCHAR" />
+ <result column="ACCESS_PATH" property="accessPath" jdbcType="VARCHAR" />
+ <result column="HTTP_METHOD" property="httpMethod" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ RES_ID, RES_NAME, RES_TYPE, ACCESS_PATH, HTTP_METHOD
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="ResourceExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_resource
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_List" />
+ from t_resource
+ where RES_ID = #{resId,jdbcType=CHAR}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+ delete from t_resource
+ where RES_ID = #{resId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="ResourceExample" >
+ delete from t_resource
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="Resource" >
+ insert into t_resource (RES_ID, RES_NAME, RES_TYPE,
+ ACCESS_PATH,HTTP_METHOD)
+ values (#{resId,jdbcType=CHAR}, #{resName,jdbcType=VARCHAR}, #{resType,jdbcType=VARCHAR},
+ #{accessPath,jdbcType=VARCHAR}, #{httpMethod,jdbcType=VARCHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="Resource" >
+ insert into t_resource
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="resId != null" >
+ RES_ID,
+ </if>
+ <if test="resName != null" >
+ RES_NAME,
+ </if>
+ <if test="resType != null" >
+ RES_TYPE,
+ </if>
+ <if test="accessPath != null" >
+ ACCESS_PATH,
+ </if>
+ <if test="accessPath != null" >
+ HTTP_METHOD,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="resId != null" >
+ #{resId,jdbcType=CHAR},
+ </if>
+ <if test="resName != null" >
+ #{resName,jdbcType=VARCHAR},
+ </if>
+ <if test="resType != null" >
+ #{resType,jdbcType=VARCHAR},
+ </if>
+ <if test="accessPath != null" >
+ #{accessPath,jdbcType=VARCHAR},
+ </if>
+ <if test="accessPath != null" >
+ #{httpMethod,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="ResourceExample" resultType="java.lang.Integer" >
+ select count(*) from t_resource
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_resource
+ <set >
+ <if test="record.resId != null" >
+ RES_ID = #{record.resId,jdbcType=CHAR},
+ </if>
+ <if test="record.resName != null" >
+ RES_NAME = #{record.resName,jdbcType=VARCHAR},
+ </if>
+ <if test="record.resType != null" >
+ RES_TYPE = #{record.resType,jdbcType=VARCHAR},
+ </if>
+ <if test="record.accessPath != null" >
+ ACCESS_PATH = #{record.accessPath,jdbcType=VARCHAR},
+ </if>
+ <if test="record.httpMethod != null" >
+ HTTP_METHOD = #{record.httpMethod,jdbcType=VARCHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_resource
+ set RES_ID = #{record.resId,jdbcType=CHAR},
+ RES_NAME = #{record.resName,jdbcType=VARCHAR},
+ RES_TYPE = #{record.resType,jdbcType=VARCHAR},
+ ACCESS_PATH = #{record.accessPath,jdbcType=VARCHAR},
+ HTTP_METHOD = #{record.httpMethod,jdbcType=VARCHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByPrimaryKeySelective" parameterType="Resource" >
+ update t_resource
+ <set >
+ <if test="resName != null" >
+ RES_NAME = #{resName,jdbcType=VARCHAR},
+ </if>
+ <if test="resType != null" >
+ RES_TYPE = #{resType,jdbcType=VARCHAR},
+ </if>
+ <if test="accessPath != null" >
+ ACCESS_PATH = #{accessPath,jdbcType=VARCHAR},
+ </if>
+ <if test="httpMethod != null" >
+ HTTP_METHOD = #{httpMethod,jdbcType=VARCHAR},
+ </if>
+ </set>
+ where RES_ID = #{resId,jdbcType=CHAR}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="Resource" >
+ update t_resource
+ set RES_NAME = #{resName,jdbcType=VARCHAR},
+ RES_TYPE = #{resType,jdbcType=VARCHAR},
+ ACCESS_PATH = #{accessPath,jdbcType=VARCHAR},
+ HTTP_METHOD = #{httpMethod,jdbcType=VARCHAR}
+ where RES_ID = #{resId,jdbcType=CHAR}
+ </update>
+ <select id="selectResourcesByUserId" resultMap="BaseResultMap" parameterType="java.lang.String">
+ select res.res_id as res_id, res_name, res_type, access_path,HTTP_METHOD
+ from t_resource as res
+ left join t_authority_resource_link as arlink on arlink.r_res_id=res.res_id
+ left join t_user_authority_link as urlink on urlink.a_au_id=arlink.r_au_id
+ left join t_user as user on user.user_id=urlink.a_user_id
+ where <!-- RES_TYPE = 'menu' and --> user.user_name = #{userName,jdbcType=VARCHAR}
+ </select>
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserAuthorityLinkMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserAuthorityLinkMapper.xml
new file mode 100644
index 0000000..367aad2
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserAuthorityLinkMapper.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.user.UserAuthorityLinkMapper" >
+ <resultMap id="BaseResultMap" type="UserAuthorityLinkKey" >
+ <id column="A_USER_ID" property="userId" jdbcType="CHAR" />
+ <id column="A_AU_ID" property="auId" jdbcType="CHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ A_USER_ID, A_AU_ID
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="UserAuthorityLinkExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_List" />
+ from t_user_authority_link
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="UserAuthorityLinkKey" >
+ delete from t_user_authority_link
+ where A_USER_ID = #{userId,jdbcType=CHAR}
+ and A_AU_ID = #{auId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="UserAuthorityLinkExample" >
+ delete from t_user_authority_link
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="UserAuthorityLinkKey" >
+ insert into t_user_authority_link (A_USER_ID, A_AU_ID)
+ values (#{userId,jdbcType=CHAR}, #{auId,jdbcType=CHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="UserAuthorityLinkKey" >
+ insert into t_user_authority_link
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="userId != null" >
+ A_USER_ID,
+ </if>
+ <if test="auId != null" >
+ A_AU_ID,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="userId != null" >
+ #{userId,jdbcType=CHAR},
+ </if>
+ <if test="auId != null" >
+ #{auId,jdbcType=CHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="UserAuthorityLinkExample" resultType="java.lang.Integer" >
+ select count(*) from t_user_authority_link
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_user_authority_link
+ <set >
+ <if test="record.userId != null" >
+ A_USER_ID = #{record.userId,jdbcType=CHAR},
+ </if>
+ <if test="record.auId != null" >
+ A_AU_ID = #{record.auId,jdbcType=CHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_user_authority_link
+ set A_USER_ID = #{record.userId,jdbcType=CHAR},
+ A_AU_ID = #{record.auId,jdbcType=CHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserMapper.xml b/appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserMapper.xml
new file mode 100644
index 0000000..f1c63da
--- /dev/null
+++ b/appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserMapper.xml
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="app.market.persistence.mapper.user.UserMapper" >
+ <resultMap id="BaseResultMap" type="User" >
+ <id column="USER_ID" property="userId" jdbcType="CHAR" />
+ <result column="USER_PW" property="userPw" jdbcType="VARCHAR" />
+ <result column="USER_NAME" property="userName" jdbcType="VARCHAR" />
+ <result column="MAIL_ADDRESS" property="mailAddress" jdbcType="VARCHAR" />
+ <result column="CREATE_DATE" property="createDate" jdbcType="TIMESTAMP" />
+ <result column="UPDATE_DATE" property="updateDate" jdbcType="TIMESTAMP" />
+ <result column="IS_DEL" property="isDel" jdbcType="CHAR" />
+ <result column="A_AU_ID" property="auId" jdbcType="CHAR" />
+ <result column="AU_NAME" property="auName" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Example_Where_Clause" >
+ <where >
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Update_By_Example_Where_Clause" >
+ <where >
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+ <if test="criteria.valid" >
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
+ <foreach collection="criteria.criteria" item="criterion" >
+ <choose >
+ <when test="criterion.noValue" >
+ and ${criterion.condition}
+ </when>
+ <when test="criterion.singleValue" >
+ and ${criterion.condition} #{criterion.value}
+ </when>
+ <when test="criterion.betweenValue" >
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+ </when>
+ <when test="criterion.listValue" >
+ and ${criterion.condition}
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+ #{listItem}
+ </foreach>
+ </when>
+ </choose>
+ </foreach>
+ </trim>
+ </if>
+ </foreach>
+ </where>
+ </sql>
+ <sql id="Base_Column_List" >
+ USER_ID, USER_PW, USER_NAME, MAIL_ADDRESS, CREATE_DATE, UPDATE_DATE, IS_DEL, ual.A_AU_ID, au.AU_NAME
+ </sql>
+ <sql id="Base_Column_Protect_List" >
+ USER_ID, USER_NAME, MAIL_ADDRESS, CREATE_DATE, UPDATE_DATE, IS_DEL, ual.A_AU_ID, au.AU_NAME
+ </sql>
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="UserExample" >
+ select
+ <if test="distinct" >
+ distinct
+ </if>
+ 'true' as QUERYID,
+ <include refid="Base_Column_Protect_List" />
+ from t_user
+ left join t_user_authority_link as ual on USER_ID = ual.A_USER_ID
+ left join t_authority as au on ual.A_AU_ID = au.AU_ID
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ <if test="orderByClause != null" >
+ order by ${orderByClause}
+ </if>
+ </select>
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_Protect_List" />
+ from t_user
+ left join t_user_authority_link as ual on USER_ID = ual.A_USER_ID
+ left join t_authority as au on ual.A_AU_ID = au.AU_ID
+ where USER_ID = #{userId,jdbcType=CHAR}
+ </select>
+ <select id="selectOneByExample" resultMap="BaseResultMap" parameterType="UserExample" useCache="false">
+ select
+ <include refid="Base_Column_Protect_List" />
+ from t_user
+ left join t_user_authority_link as ual on USER_ID = ual.A_USER_ID
+ left join t_authority as au on ual.A_AU_ID = au.AU_ID
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+ delete from t_user
+ where USER_ID = #{userId,jdbcType=CHAR}
+ </delete>
+ <delete id="deleteByExample" parameterType="UserExample" >
+ delete from t_user
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </delete>
+ <insert id="insert" parameterType="User" >
+ insert into t_user (USER_ID, USER_PW, USER_NAME,
+ MAIL_ADDRESS, CREATE_DATE, UPDATE_DATE,
+ IS_DEL)
+ values (#{userId,jdbcType=CHAR}, #{userPw,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR},
+ #{mailAddress,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP},
+ #{isDel,jdbcType=CHAR})
+ </insert>
+ <insert id="insertSelective" parameterType="User" >
+ insert into t_user
+ <trim prefix="(" suffix=")" suffixOverrides="," >
+ <if test="userId != null" >
+ USER_ID,
+ </if>
+ <if test="userPw != null" >
+ USER_PW,
+ </if>
+ <if test="userName != null" >
+ USER_NAME,
+ </if>
+ <if test="mailAddress != null" >
+ MAIL_ADDRESS,
+ </if>
+ <if test="createDate != null" >
+ CREATE_DATE,
+ </if>
+ <if test="updateDate != null" >
+ UPDATE_DATE,
+ </if>
+ <if test="isDel != null" >
+ IS_DEL,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
+ <if test="userId != null" >
+ #{userId,jdbcType=CHAR},
+ </if>
+ <if test="userPw != null" >
+ #{userPw,jdbcType=VARCHAR},
+ </if>
+ <if test="userName != null" >
+ #{userName,jdbcType=VARCHAR},
+ </if>
+ <if test="mailAddress != null" >
+ #{mailAddress,jdbcType=VARCHAR},
+ </if>
+ <if test="createDate != null" >
+ #{createDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="updateDate != null" >
+ #{updateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="isDel != null" >
+ #{isDel,jdbcType=CHAR},
+ </if>
+ </trim>
+ </insert>
+ <select id="countByExample" parameterType="UserExample" resultType="java.lang.Integer" >
+ select count(*) from t_user
+ left join t_user_authority_link as ual on USER_ID = ual.A_USER_ID
+ left join t_authority as au on ual.A_AU_ID = au.AU_ID
+ <if test="_parameter != null" >
+ <include refid="Example_Where_Clause" />
+ </if>
+ </select>
+ <update id="updateByExampleSelective" parameterType="map" >
+ update t_user
+ <set >
+ <if test="record.userId != null" >
+ USER_ID = #{record.userId,jdbcType=CHAR},
+ </if>
+ <if test="record.userPw != null" >
+ USER_PW = #{record.userPw,jdbcType=VARCHAR},
+ </if>
+ <if test="record.userName != null" >
+ USER_NAME = #{record.userName,jdbcType=VARCHAR},
+ </if>
+ <if test="record.mailAddress != null" >
+ MAIL_ADDRESS = #{record.mailAddress,jdbcType=VARCHAR},
+ </if>
+ <if test="record.createDate != null" >
+ CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="record.updateDate != null" >
+ UPDATE_DATE = #{record.updateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="record.isDel != null" >
+ IS_DEL = #{record.isDel,jdbcType=CHAR},
+ </if>
+ </set>
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByExample" parameterType="map" >
+ update t_user
+ set USER_ID = #{record.userId,jdbcType=CHAR},
+ USER_PW = #{record.userPw,jdbcType=VARCHAR},
+ USER_NAME = #{record.userName,jdbcType=VARCHAR},
+ MAIL_ADDRESS = #{record.mailAddress,jdbcType=VARCHAR},
+ CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
+ UPDATE_DATE = #{record.updateDate,jdbcType=TIMESTAMP},
+ IS_DEL = #{record.isDel,jdbcType=CHAR}
+ <if test="_parameter != null" >
+ <include refid="Update_By_Example_Where_Clause" />
+ </if>
+ </update>
+ <update id="updateByPrimaryKeySelective" parameterType="User" >
+ update t_user
+ <set >
+ <if test="userPw != null" >
+ USER_PW = #{userPw,jdbcType=VARCHAR},
+ </if>
+ <if test="userName != null" >
+ USER_NAME = #{userName,jdbcType=VARCHAR},
+ </if>
+ <if test="mailAddress != null" >
+ MAIL_ADDRESS = #{mailAddress,jdbcType=VARCHAR},
+ </if>
+ <if test="createDate != null" >
+ CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="updateDate != null" >
+ UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
+ </if>
+ <if test="isDel != null" >
+ IS_DEL = #{isDel,jdbcType=CHAR},
+ </if>
+ </set>
+ where USER_ID = #{userId,jdbcType=CHAR}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="User" >
+ update t_user
+ set USER_PW = #{userPw,jdbcType=VARCHAR},
+ USER_NAME = #{userName,jdbcType=VARCHAR},
+ MAIL_ADDRESS = #{mailAddress,jdbcType=VARCHAR},
+ CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
+ UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
+ IS_DEL = #{isDel,jdbcType=CHAR}
+ where USER_ID = #{userId,jdbcType=CHAR}
+ </update>
+ <update id="updatePassword" parameterType="User" >
+ update t_user
+ set USER_PW = #{userPw,jdbcType=VARCHAR}
+ where USER_NAME = #{userName,jdbcType=VARCHAR}
+ and USER_PW = #{userPwBak,jdbcType=VARCHAR}
+ </update>
+ <insert id="insertOrUpdate" parameterType="User" >
+ insert into t_user (USER_NAME, USER_PW, MAIL_ADDRESS,
+ CREATE_DATE, UPDATE_DATE, IS_DEL
+ )
+ values (#{userName,jdbcType=VARCHAR}, #{userPw,jdbcType=VARCHAR}, #{mailAddress,jdbcType=VARCHAR},
+ NOW(), NOW(), #{isDel,jdbcType=INTEGER}}
+ )
+ ON DUPLICATE KEY UPDATE
+ t_user.USER_NAME = #{userName,jdbcType=VARCHAR},
+ MAIL_ADDRESS = #{mailAddress,jdbcType=VARCHAR},
+ UPDATE_DATE = NOW(),
+ IS_DEL = #{isDel,jdbcType=INTEGER},
+ <if test="userPw != null" >
+ t_user.USER_PW = #{userPw,jdbcType=VARCHAR}
+ </if>
+ </insert>
+ <delete id="deleteByUserName" parameterType="java.lang.String" >
+ delete from t_user
+ where USER_NAME = #{userName,jdbcType=VARCHAR}
+ </delete>
+ <select id="countByUserName" parameterType="java.lang.String" resultType="java.lang.Integer" >
+ select count(*) from t_user
+ where USER_NAME = #{userName,jdbcType=VARCHAR}
+ </select>
+ <select id="countByUserId" parameterType="java.lang.String" resultType="java.lang.Integer" >
+ select count(*) from t_user
+ where USER_ID = #{userId,jdbcType=CHAR}
+ </select>
+ <select id="selectByUserName" resultMap="BaseResultMap" parameterType="java.lang.String" >
+ select
+ <include refid="Base_Column_Protect_List" />
+ from t_user
+ left join t_user_authority_link as ual on USER_ID = ual.A_USER_ID
+ left join t_authority as au on ual.A_AU_ID = au.AU_ID
+ where USER_NAME = #{userName,jdbcType=VARCHAR}
+ </select>
+
+</mapper> \ No newline at end of file
diff --git a/appmarket-persistence/src/test/java/app/market/persisitence/AppTest.java b/appmarket-persistence/src/test/java/app/market/persisitence/AppTest.java
new file mode 100644
index 0000000..c0af50c
--- /dev/null
+++ b/appmarket-persistence/src/test/java/app/market/persisitence/AppTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.persisitence;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/appmarket-utils/pom.xml b/appmarket-utils/pom.xml
new file mode 100644
index 0000000..af06bc1
--- /dev/null
+++ b/appmarket-utils/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-root</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>appmarket-utils</artifactId>
+ <packaging>jar</packaging>
+ <name>appmarket-utils</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
+ </dependency>
+ <!-- json -->
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-core-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ <version>1.2.28</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/appmarket-utils/src/main/java/app/market/utils/Md5Util.java b/appmarket-utils/src/main/java/app/market/utils/Md5Util.java
new file mode 100644
index 0000000..29edef8
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/Md5Util.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils;
+
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+/**
+ *
+ * @author huangxin
+ *
+ */
+public class Md5Util {
+ /**
+ * @param userPw
+ * @return
+ * @throws NoSuchAlgorithmException
+ */
+ public static String md5(String userPw) throws NoSuchAlgorithmException{
+ MessageDigest md = MessageDigest.getInstance("MD5");
+ md.update(userPw.getBytes());
+ String userPwMd = new BigInteger(1,md.digest()).toString(16);
+ return userPwMd;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/RuntimeUtil.java b/appmarket-utils/src/main/java/app/market/utils/RuntimeUtil.java
new file mode 100644
index 0000000..195b7cc
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/RuntimeUtil.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class RuntimeUtil {
+/**
+ * Execute Command of Linux Shell
+ * @param cmd
+ * @return Execute's result
+ */
+ public static boolean linuxCmdExec(String cmd) {
+ boolean ret = false;
+
+ try {
+ Process process = Runtime.getRuntime().exec(cmd);
+ BufferedReader stdoutReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
+ BufferedReader stderrReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
+ String line;
+
+ while ((line = stdoutReader.readLine()) != null) {
+ System.out.println(line);
+ }
+
+ while ((line = stderrReader.readLine()) != null) {
+ System.out.println(line);
+ }
+
+ int exitVal = process.waitFor();
+
+ System.out.println("Process exit value is " + exitVal);
+ if(exitVal != 0) {
+ return ret;
+ }
+
+ ret = true;
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NullPointerException e) {
+ e.printStackTrace();
+ } catch (IndexOutOfBoundsException e) {
+ e.printStackTrace();
+ }
+ return ret;
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/SpringWebUtil.java b/appmarket-utils/src/main/java/app/market/utils/SpringWebUtil.java
new file mode 100644
index 0000000..02eaf37
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/SpringWebUtil.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+public class SpringWebUtil {
+
+ public static HttpServletRequest getRequest() {
+ ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+ return requestAttributes == null ? null : requestAttributes.getRequest();
+ }
+
+ public static HttpSession getSession() {
+ return getRequest().getSession( false );
+ }
+
+ public static String getRealRootPath() {
+ return getRequest().getServletContext().getRealPath( "/" );
+ }
+
+ public static String getIp() {
+ ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+ if ( servletRequestAttributes != null ) {
+ HttpServletRequest request = servletRequestAttributes.getRequest();
+ return request.getRemoteAddr();
+ }
+ return null;
+ }
+
+ public static Object getSessionAttribute(String name) {
+ HttpServletRequest request = getRequest();
+ return request == null ? null : request.getSession().getAttribute( name );
+ }
+
+ public static void setSessionAttribute(String name, Object value) {
+ HttpServletRequest request = getRequest();
+ if ( request != null ) {
+ request.getSession().setAttribute( name, value );
+ }
+ }
+
+ public static Object getRequestAttribute(String name) {
+ HttpServletRequest request = getRequest();
+ return request == null ? null : request.getAttribute( name );
+ }
+
+ public static void setRequestAttribute(String name, Object value) {
+ HttpServletRequest request = getRequest();
+ if ( request != null ) {
+ request.setAttribute( name, value );
+ }
+ }
+
+ public static String getContextPath() {
+ return getRequest().getContextPath();
+ }
+
+ public static void removeSessionAttribute(String name) {
+ getRequest().getSession().removeAttribute( name );
+ }
+
+} \ No newline at end of file
diff --git a/appmarket-utils/src/main/java/app/market/utils/Utils.java b/appmarket-utils/src/main/java/app/market/utils/Utils.java
new file mode 100644
index 0000000..c0a1474
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/Utils.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.UUID;
+
+import org.apache.commons.lang3.StringUtils;
+
+import app.market.utils.constants.Constants;
+import app.market.utils.datetime.DateTimeUtils;
+
+/**
+ * tools
+ *
+ * @author Toyota
+ * @date 2017/10/10
+ */
+public class Utils {
+
+ /**
+ * Entity converter
+ *
+ * @see set in/out class
+ *
+ * @param org
+ * @param dest
+ * @throws NoSuchFieldException
+ * @throws SecurityException
+ * @throws IllegalArgumentException
+ * @throws IllegalAccessException
+ */
+ public static void reflect(Object org, Object dest) throws Exception {
+ Class<?> orgClass = org.getClass();
+ Class<?> destClass = dest.getClass();
+
+ for (Field orgField : orgClass.getDeclaredFields()) {
+ orgField.setAccessible( true );
+ String orgFieldName = orgField.getName();
+ if ( "serialVersionUID".equals( orgFieldName ) ) {
+ continue;
+ }
+ Field destField;
+ try {
+ destField = destClass.getDeclaredField( orgFieldName );
+ } catch ( NoSuchFieldException e ) {
+ continue;
+ }
+ destField.setAccessible( true );
+ if ( ( orgField.getType().getName().equals( "java.lang.Integer" )
+ || orgField.getType().getName().equals( "int" ) ) && orgField.get( org ) != null ) {
+ if ( destField.getType().getName().equals( "java.lang.String" ) ) {
+ destField.set( dest, String.valueOf( orgField.get( org ) ) );
+ } else {
+ destField.set( dest, orgField.get( org ) );
+ }
+ } else if ( orgField.getType().getName().equals( "java.util.Date" ) && orgField.get( org ) != null ) {
+ // to string
+ if ( destField.getType().getName().equals( "java.lang.String" ) ) {
+ destField.set( dest, DateTimeUtils.getDate( DateTimeUtils.DATE_FORMAT_YYYYMMDDHHMMSS,
+ (Date) orgField.get( org ) ) );
+ } else {
+ destField.set( dest, (Date) orgField.get( org ) );
+ }
+ } else if ( orgField.getType().getName().equals( "java.util.List" ) ) {
+ for (int i = 0; i < ( (ArrayList<?>) orgField.get( org ) ).size(); i++) {
+ Object orgItem = ( (ArrayList<?>) orgField.get( org ) ).get( i );
+ Type destItemType = ( (ParameterizedType) destField.getGenericType() ).getActualTypeArguments()[0];
+ Object destItem = ( Class.forName( destItemType.getTypeName() ) ).newInstance();
+ reflect( orgItem, destItem );
+ ( (ArrayList<Object>) destField.get( dest ) ).add( destItem );
+ }
+ } else {
+ if ( destField.getType().getName().equals( "java.util.Date" ) && orgField.get( org ) != null
+ && StringUtils.isNotEmpty( orgField.get( org ).toString() ) ) {
+ destField.set( dest, DateTimeUtils.getDate( DateTimeUtils.DATE_FORMAT_YYYYMMDD,
+ orgField.get( org ).toString() ) );
+ } else {
+ if ( destField.getType().getName().equals( orgField.getType().getName() ) ) {
+ destField.set( dest, orgField.get( org ) );
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Get UUID
+ *
+ * @return
+ */
+ public static String generatorUUID() {
+ return UUID.randomUUID().toString();
+ }
+
+ public static boolean strIsEmpty(String s) {
+ if (s == null || "".equals(s)) {
+ return true;
+ }
+ return false;
+ }
+
+ /***
+ * Get file name from path
+ * @param filePath
+ * @return succeed, return file name
+ * failed, return null
+ */
+ public static String getFileNameFromPath(String filePath) {
+ String ret = "";
+ try{
+ ret = filePath.substring(filePath.lastIndexOf(Constants.PATH_SEPARATOR) + 1);
+ }catch (Exception e){
+ e.printStackTrace();
+ return null;
+ }
+ return ret;
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/constants/Constants.java b/appmarket-utils/src/main/java/app/market/utils/constants/Constants.java
new file mode 100644
index 0000000..fef120a
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/constants/Constants.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.constants;
+
+import org.springframework.http.HttpStatus;
+
+public class Constants {
+
+ public static final String CHARACTER_UTF8 = "UTF-8";
+ public static final String CHARACTER_ISO = "ISO-8859-1";
+
+ /** success */
+ public static final int STATUS_SUCCESS = HttpStatus.OK.value();
+ /** unauthorized */
+ public static final int STATUS_UNAUTHORIZED = 401;
+
+ public static final int STATUS_REFRESH_TOKEN = 220;
+
+ public static final int STATUS_BAD_FILE = 402;
+ /** forbidden */
+ public static final int STATUS_FORBIDDEN = 403;
+ /** already exists */
+ public static final int STATUS_ALREADY_EXISTS = 409;
+ /** unsupport media type */
+ public static final int STATUS_UNSUPPORT = 415;
+ /** too many connections */
+ public static final int STATUS_TOO_MANY_CONNECTIONS = 421;
+ /** bad request */
+ public static final int STATUS_BAD_REQUEST = HttpStatus.BAD_REQUEST.value();
+ /** error */
+ public static final int STATUS_ERROR = HttpStatus.INTERNAL_SERVER_ERROR.value();
+
+ public static final int NOT_FOUND = HttpStatus.NOT_FOUND.value();
+
+ public static final int STATUS_CONFLICT = HttpStatus.CONFLICT.value();
+
+ public static final int STATUS_SERVER_ERROR = 500;
+ /** If parameter is blank, replace restful parameter. */
+ public static final String EMPTY_STRING_FALG = "%22%22";
+ /** Usefull deta flag */
+ public static final String DETA_ENABLE_FLAG = "0";
+
+ /** token */
+ public static final String GUEST_ID = "appMarketGuestAuthorizationUser";
+ public static final String ADMID_ID = "super_user";
+
+ public static final String TOKEN_AUTHORIZATION = "authorization_token";
+ public static final String TOKEN_AUTHORIZATION_REFRESH = "authorization_refreshtoken";
+ public static final String TOKEN_AUTHORIZATION_RESOURCE = "authorization_servlet_path";
+ public static final String AUTHORIZATION_CLIENT = "authorization_client";
+ public static final String AUTHORIZATION_CLIENT_VALUE_TOOL = "tool";
+
+ public static final String PAGINATION_COUNTER = "pagination_counter";
+ public static final String PAGINATION_DATA = "pagination_data";
+
+ public static final String USER_SESSION_KEY = "USER_SESSION_KEY";
+ public static final String I18N_JA_JP = "ja.JP";
+
+ /** uploading */
+ public static final int BUFFER_SIZE = 1024;
+ public static final String FILE_TYPE = ".wgt";
+ public static final long IMAGE_SIZE = 1024*500;
+ public static final String IMAGE_TYPE = "image";
+ public static final int IMAGE_INT = 0;
+ public static final String IMAGE_SVG = ".svg";
+ public static final String IMAGE_PNG = ".PNG";
+
+ /** distinct modify or create app*/
+ public static final int APP_CREATE_DETAIL = 0;
+ public static final int APP_MODIFY = 1;
+ public static final int APP_DETAIL_MODIFY = 2;
+
+ //database delete flad
+ public static final String DATA_INVALID = "1";
+ public static final String DATA_VALID = "0";
+
+ public static final String TOKEN_SEPARATOR = ":";
+
+ public static final String PROPERTIES_FILE_NAME_PROPERTIES = "config/properties.properties";
+
+ /**
+ * webservice Utils
+ */
+ public static final String PROPERTIES_FILE_NAME_REDIS = "redis.properties";
+ public static final String PROPERTIES_FILE_NAME_FILE = "fileManager.properties";
+ public static final String PROPERTIES_FILE_NAME_DEFAULT = "properties.properties";
+
+ public static final String UPLOAD_PATH_DEFAULT="/var/lib/tomcat8/appFile/appMarket/appFile/";
+ public static final String UPLOAD_PATH_TYPE_DEFAULT="appType/";
+ public static final String UPLOAD_PATH_APP_DEFAULT="appId/";
+
+ public static final String PATH_SEPARATOR="/";
+
+ public static final String FILE_SEPARATOR = "_";
+
+ public static final String FILE_DOT = ".";
+
+ //public static final String SERVER_PATH = "http://localhost:8080/resource";
+ public static final String UPLOAD_APP_FILE_PATH = "/appFile";
+ public static final String UPLOAD_APP_RES_PATH_ICON = "/appIcon";
+ public static final String UPLOAD_APP_UNCOMPRESS_PATH = "/uncompress";
+
+ public static final String UPLOAD_APP_UNCOMPRESS_FILE_CONFIG = "/config.xml";
+
+
+ /**
+ * wgt/config.xml
+ */
+ public static final String CONFIG_APP_PARAM_ID = "id";
+ public static final String CONFIG_APP_PARAM_VERSION = "version";
+ public static final String CONFIG_APP_PARAM_NAME = "name";
+ public static final String CONFIG_APP_PARAM_ICON = "icon";
+ public static final String CONFIG_APP_PARAM_SRC = "src";
+ public static final String CONFIG_APP_PARAM_DESCRIPTION = "description";
+
+ /***
+ * local app list
+ */
+ public static final String APP_ID_SEPARATOR = "@";
+ public static final String APP_ID_LAUNCHER = "launcher@0.1";
+ public static final String APP_ID_HOMESCREEN = "homescreen@0.1";
+ public static final String APP_ID_WAREHOUSE = "warehouse@1.0";
+
+ /**
+ * download app
+ */
+ public static final String APP_HEADER_KEY = "Content-Disposition";
+ public static final String APP_HEADER_VALUE = "attachment;filename=";
+
+ /**
+ * session
+ */
+ public static final String SESSION_TOKEN = "session_token";
+ public static final String SESSION_REFRESH_TOKEN = "session_refresh_token";
+ public static final String SESSION_PORT = "session_port";
+ public static final String SESSION_SYSTEM_TOKEN = "session_system_token";
+ public static final String SESSION_INSTALL_PATH = "session_install_path";
+
+ /**
+ * access url parameter/
+ */
+ public static final String ACCESS_PORT = "port";
+ public static final String ACCESS_SYSTEM_TOKEN = "systemToken";
+ public static final String ACCESS_INSTALL_PATH = "installPath";
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/constants/ProjectUserRoleEnum.java b/appmarket-utils/src/main/java/app/market/utils/constants/ProjectUserRoleEnum.java
new file mode 100644
index 0000000..fc3cb3f
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/constants/ProjectUserRoleEnum.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.constants;
+
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * User define in project
+ *
+ * @author Toyota
+ */
+public enum ProjectUserRoleEnum {
+
+ MANAGER("pm", "0"), LEADER("leader", "1"), MEMBER("member", "2"), ALL("all", "99");
+
+ private String name;
+ private String value;
+
+ private ProjectUserRoleEnum(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public static String getName(String value) {
+ for (ProjectUserRoleEnum c : ProjectUserRoleEnum.values()) {
+ if ( StringUtils.equalsIgnoreCase( c.getValue(), value ) ) {
+ return c.name;
+ }
+ }
+ return null;
+ }
+
+ public static String getValue(String name) {
+ for (ProjectUserRoleEnum c : ProjectUserRoleEnum.values()) {
+ if ( StringUtils.equalsIgnoreCase( c.getName(), name ) ) {
+ return c.value;
+ }
+ }
+ return null;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/datatable/DataTableMap.java b/appmarket-utils/src/main/java/app/market/utils/datatable/DataTableMap.java
new file mode 100644
index 0000000..d6de5d2
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/datatable/DataTableMap.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.datatable;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+/**
+ * datatable data struction
+ *
+ * @author Toyota
+ */
+public class DataTableMap implements Serializable {
+
+ private static final long serialVersionUID = 4334941724837603916L;
+
+ private LinkedHashMap<String, Object> map;
+
+ public DataTableMap() {
+ map = new LinkedHashMap<String, Object>();
+ }
+
+ /**
+ * Init data table
+ *
+ * @param draw
+ * @param list
+ */
+ public DataTableMap(String draw, List<?> list) {
+ map = new LinkedHashMap<String, Object>();
+ map.put( "draw", draw );
+ map.put( "recordsTotal", 0 );
+ map.put( "recordsFiltered", 0 );
+ map.put( "data", list );
+ }
+
+ /**
+ * Set page count
+ *
+ * @param total
+ */
+ public void setTotal(int total) {
+ map.put( "recordsTotal", total );
+ map.put( "recordsFiltered", total );
+ }
+
+ /**
+ * Add data
+ *
+ * @param list
+ */
+ @SuppressWarnings("unchecked")
+ public void addData(List<?> list) {
+ ( (List<Object>) map.get( "data" ) ).addAll( list );
+ }
+
+ /**
+ * Reset data
+ *
+ * @param list
+ */
+ public void resetData(List<?> list) {
+ map.put( "data", list );
+ }
+
+ /**
+ * Set error message
+ *
+ * @param errorCode
+ * @param errorText
+ */
+ public void setErrorMsg(int errorCode, String errorText) {
+ map.put( "statusCode", errorCode );
+ map.put( "statusText", errorText );
+ }
+
+ /**
+ * get data map
+ *
+ * @return
+ */
+ public LinkedHashMap<String, Object> getMapData() {
+ return this.map;
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/datetime/DateTimeUtils.java b/appmarket-utils/src/main/java/app/market/utils/datetime/DateTimeUtils.java
new file mode 100644
index 0000000..f7971e3
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/datetime/DateTimeUtils.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.datetime;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * date
+ *
+ * @author Toyota
+ * @date 2017/10/10
+ */
+public class DateTimeUtils {
+
+ /** yyyy */
+ public static final String DATE_FORMAT_YYYY = "yyyy";
+ /** yyyy/MM/dd */
+ public static final String DATE_FORMAT_YYYYMMDD = "yyyy/MM/dd";
+ /** yyyy/MM/dd hh:mm:ss */
+ public static final String DATE_FORMAT_YYYYMMDDHHMMSS_SLASH = "yyyy/MM/dd hh:mm:ss";
+ /** yyyy-MM-dd hh:mm:ss */
+ public static final String DATE_FORMAT_YYYYMMDDHHMMSS_DASH = "yyyy-MM-dd hh:mm:ss";
+ /** yyyyMMddhhmmss */
+ public static final String DATE_FORMAT_YYYYMMDDHHMMSS = "yyyyMMddhhmmss";
+ /** yyyyMMddhhmmssSSS */
+ public static final String DATE_FORMAT_YYYYMMDDHHMMSSSSS = "yyyyMMddhhmmssSSS";
+
+ public static String getCurrectDate(String format) {
+ return new SimpleDateFormat( format ).format( new Date() );
+ }
+
+ public static String getDate(String format, Date date) {
+ return new SimpleDateFormat( format ).format( date );
+ }
+
+ public static Date getDate(String format, String date) {
+ try {
+ return new SimpleDateFormat( format ).parse( date );
+ } catch ( ParseException e ) {
+ throw new RuntimeException();
+ }
+ }
+
+ /**
+ * @param date
+ * @return
+ */
+ public static String betweenTime(String date){
+ String strDate=date.replace("/","");
+ int intDate = Integer.parseInt(strDate);
+ String end = String.valueOf(intDate+1);
+ StringBuilder sbOne = new StringBuilder(end);
+ String StrDateOne = sbOne.insert(4, "/").toString();
+ StringBuilder sbTwo = new StringBuilder(StrDateOne);
+ String StrDateTwo = sbTwo.insert(7, "/").toString();
+ return StrDateTwo;
+
+ }
+ public static void main(String[] args) {
+ String s = DateTimeUtils.getDate( DATE_FORMAT_YYYYMMDDHHMMSS, new Date() );
+ System.out.println( s );
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/exception/ExceptionEnum.java b/appmarket-utils/src/main/java/app/market/utils/exception/ExceptionEnum.java
new file mode 100644
index 0000000..0440cbc
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/exception/ExceptionEnum.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.exception;
+
+public enum ExceptionEnum {
+
+ EMPTY_DATA {
+ @Override
+ public String toString() {
+ return "exception_empty_data";
+ }
+ },
+ MULTIPLE_DATA {
+ @Override
+ public String toString() {
+ return "exception_multiple_data";
+ }
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/json/JsonMapperUtils.java b/appmarket-utils/src/main/java/app/market/utils/json/JsonMapperUtils.java
new file mode 100644
index 0000000..7d0664a
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/json/JsonMapperUtils.java
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.json;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.type.JavaType;
+import org.codehaus.jackson.type.TypeReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+import app.market.utils.constants.Constants;
+
+/**
+ * JSON Tool
+ *
+ * @author Toyota
+ */
+public class JsonMapperUtils {
+ private static Logger logger = LoggerFactory.getLogger( JsonMapperUtils.class );
+
+ private static ObjectMapper mapper = new ObjectMapper();
+
+ public JsonMapperUtils() {
+ super();
+ }
+
+ public static ObjectMapper getInstance() {
+ return mapper;
+ }
+
+ /**
+ * write object value
+ *
+ * @param object
+ * @return
+ */
+ public static String writeValueAsString(Object object) {
+ String json = null;
+ try {
+ json = mapper.writeValueAsString( object );
+ } catch ( JsonGenerationException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( JsonMappingException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( IOException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ }
+ return json;
+ }
+
+ /**
+ * read object value
+ *
+ * @see #constructParametricType(Class, Class...)
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T readValue(String jsonString, Class<T> clazz) {
+ if ( StringUtils.isEmpty( jsonString ) ) {
+ return null;
+ }
+ Object obj = null;
+ try {
+ obj = mapper.readValue( jsonString, clazz );
+ } catch ( JsonParseException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( JsonMappingException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( IOException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ }
+ return (T) obj;
+ }
+
+ /**
+ * read object value
+ *
+ * @see #constructParametricType(Class, Class...)
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T readValue(String jsonString, JavaType javaType) {
+ if ( StringUtils.isEmpty( jsonString ) ) {
+ return null;
+ }
+ Object obj = null;
+ try {
+ obj = mapper.readValue( jsonString, javaType );
+ } catch ( JsonParseException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( JsonMappingException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( IOException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ }
+ return (T) obj;
+ }
+
+ /**
+ * read object value
+ *
+ * @see #constructParametricType(Class, Class...)
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T readValue(String jsonString, TypeReference<T> typeReference) {
+ if ( StringUtils.isEmpty( jsonString ) ) {
+ return null;
+ }
+ Object obj = null;
+ try {
+ obj = mapper.readValue( jsonString, typeReference );
+ } catch ( JsonParseException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( JsonMappingException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ } catch ( IOException e ) {
+ logger.info( e.getMessage() );
+ e.printStackTrace();
+ }
+ return (T) obj;
+ }
+
+ /**
+ * String to tree
+ *
+ * @param content
+ * @return
+ * @throws JsonProcessingException
+ * @throws IOException
+ */
+ public static JsonNode readTree(String content) throws JsonProcessingException, IOException {
+ return mapper.readTree( content );
+ }
+
+ /**
+ * Get JSON information
+ *
+ * @param type
+ * @param forward
+ * @param msg
+ * @return
+ */
+ public static String getJsonString(Object type, String forward, Object msg) {
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
+ map.put( "result", type );
+ map.put( "forward", forward );
+ if ( msg != null ) {
+ map.put( "message", msg );
+ } else {
+ }
+ String jsonStr = JsonMapperUtils.writeValueAsString( map );
+ logger.info( jsonStr );
+ return jsonStr;
+ }
+
+ public static boolean getResult(String jsonStr) {
+ boolean ret = false;
+ Map<String, Object> map = JsonMapperUtils.readValue(jsonStr, Map.class);
+ if ((int) map.get("result") == Constants.STATUS_SUCCESS) {
+ ret = true;
+ }
+ return ret;
+ }
+
+ public static Object getMessage(String jsonStr) {
+ Map<String, Object> map = JsonMapperUtils.readValue(jsonStr, Map.class);
+ return (Object)map.get("message");
+ }
+
+ /**
+ * get json boject
+ * @param jsonStr
+ * @return
+ */
+ public static JSONObject getJsonObject(String jsonStr)
+ {
+ JSONObject jsonObject = JSONObject.parseObject(jsonStr);
+ return jsonObject;
+ }
+
+ public static List getJsonList(String jsonstring, Class cls) {
+ List list = new ArrayList();
+ try {
+ list = JSON.parseArray(jsonstring, cls);
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+ return list;
+ }
+
+} \ No newline at end of file
diff --git a/appmarket-utils/src/main/java/app/market/utils/json/JsonMessage.java b/appmarket-utils/src/main/java/app/market/utils/json/JsonMessage.java
new file mode 100644
index 0000000..83e7dc1
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/json/JsonMessage.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.json;
+
+public class JsonMessage {
+
+ private String name;
+ private Object value;
+
+ public JsonMessage() {
+ super();
+ }
+
+ public JsonMessage(String name, Object value) {
+ super();
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/json/JsonResult.java b/appmarket-utils/src/main/java/app/market/utils/json/JsonResult.java
new file mode 100644
index 0000000..9aba3fa
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/json/JsonResult.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.json;
+
+import java.io.Serializable;
+
+import app.market.utils.constants.Constants;
+import app.market.utils.datetime.DateTimeUtils;
+
+public class JsonResult implements Serializable {
+
+ private static final long serialVersionUID = -6156654045350234343L;
+
+ private int status;
+ private String timestamp;
+ private Object data;
+
+ public JsonResult() {
+ this.status = Constants.STATUS_SUCCESS;
+ this.timestamp = DateTimeUtils.getCurrectDate( DateTimeUtils.DATE_FORMAT_YYYYMMDDHHMMSS );
+ }
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ public String getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(String timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public Object getData() {
+ return data;
+ }
+
+ public void setData(Object data) {
+ this.data = data;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/property/KeysConstants.java b/appmarket-utils/src/main/java/app/market/utils/property/KeysConstants.java
new file mode 100644
index 0000000..c739762
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/property/KeysConstants.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.property;
+
+public class KeysConstants {
+ public static final String PROJECT_ERROR = "project_error";
+ public static final String STATUS_UNAUTHORIZED = "status_unauthorized";
+ public static final String STATUS_TOO_MANY_CONNECTIONS = "status_too_many_connections";
+ public static final String STATUS_FORBIDDEN = "status_forbidden";
+ public static final String STATUS_BAD_REQUEST = "bad_request";
+ public static final String INVALID_QUERYPARAM = "invalid_query_param";
+ public static final String INVALID_BODY = "invalid_body";
+ public static final String ALREADY_EXIST = "already_exist";
+ public static final String USER_NOT_DELETE = "user_not_delete";
+ public static final String EXPIRED_REFRESH_TOKEN = "expired_refresh_token";
+ /** ▼▼▼▼▼▼▼▼▼▼ ErrorCode Message ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String MISSING_NECESSARY_QUERYPARAM = "missing_necessary_queryparam";
+ public static final String THE_PICTURE_SIZES = "the_picture_sizes_should_not_exceed_500KB";
+ public static final String UPLOAD_PICTURES_ONLY = "you_can_upload_pictures_only";
+ public static final String INVALID_OPERATION = "invalid_operation";
+ public static final String RESOURCE_ALREADY_EXISTS = "resource_already_exists";
+ public static final String RESOURCE_APP_ALREADY_EXISTS = "resource_app_already_exists";
+ public static final String DEVELOPER_IS_NOT_EXIST = "developer_is_not_exist";
+ public static final String TYPENAME_ALREADY_EXISTS = "typename_already_exists";
+ /** ▲▲▲▲▲▲▲▲▲▲ ErrorCode Message ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ login ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String LOGIN_LOGINID_IS_NOT_EXIST = "login_loginId_is_not_exist";
+ public static final String LOGIN_LOGINID_IS_NOT_EMPTY = "login_loginId_is_not_empty";
+ public static final String LOGIN_PASSWORD_IS_NOT_EMPTY = "login_password_is_not_empty";
+ /** ▲▲▲▲▲▲▲▲▲▲ login ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ user ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String USER_PASSWORD_IS_NOT_EMPTY = "user_password_is_not_empty";
+ public static final String USER_PASSWORD_IS_NOT_SPACES = "no_spaces_can_be_found_in_the_password";
+ public static final String USER_REPASSWORD_IS_NOT_EMPTY = "user_repassword_is_not_empty";
+ public static final String USER_USERNAME_IS_NOT_EMPTY = "user_username_is_not_empty";
+ public static final String USER_USERNAME_MAX_ERROR = "user_username_max_error";
+ public static final String USER_PASSWORD_MAX_ERROR = "user_password_max_error";
+ public static final String USER_REPASSWORD_MAX_ERROR = "user_repassword_max_error";
+ public static final String USER_MAILADDRESS_MAX_ERROR = "user_mailaddress_max_error";
+ public static final String USER_USERNAME_IS_NOT_REPEATED = "user_username_is_not_repeated";
+ public static final String USER_MAILADDRESS_IS_NOT_EMPTY = "user_mailaddress_is_not_empty";
+ public static final String USER_USERID_IS_NOT_EMPTY = "user_userid_is_not_empty";
+ public static final String USER_OLD_PASSWORD_IS_NOT_EMPTY = "user_old_password_is_not_empty";
+ public static final String USER_NEW_PASSWORD_IS_NOT_EMPTY = "user_new_password_is_not_empty";
+ public static final String USER_NEW_REPASSWORD_IS_NOT_EMPTY = "user_new_repassword_is_not_empty";
+ public static final String USER_NEW_REPASSWORD_IS_NOT_EQUALS = "user_new_repassword_is_not_equals";
+ public static final String USER_SAVE_IS_FAILED = "user_save_is_failed";
+ public static final String USER_SAVE_IS_SUCCESS = "user_save_is_success";
+ public static final String USER_SAVE_IS_EXIST = "user_is_exist";
+ public static final String USER_LOGINID_IS_FAILED = "user_loginid_is_failed";
+ public static final String USER_INFO_CHANGE_SUCCESS = "user_info_change_success";
+ public static final String USER_IS_SUCCESS = "user_is_success";
+ public static final String USER_TITLE_NAME_INSERT = "user_title_name_insert";
+ public static final String USER_TITLE_NAME_MODIFY = "user_title_name_modify";
+ public static final String USER_NAME_IS_NOT_EMPTY = "user_name_is_not_empty";
+ public static final String USER_GET_LIST_IS_FAILED = "user_get_list_is_failed";
+ public static final String USER_DELETE_FAILED = "user_delete_failed";
+ public static final String USER_MAILADDRESS_IS_NOT_EQUALS = "user_mailaddress_is_not_equals";
+ public static final String USER_REPASSWORD_ERROR = "user_repassword_error";
+ public static final String USER_PASSWORD_ERROR = "user_password_error";
+ /** ▲▲▲▲▲▲▲▲▲▲ user ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ app ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String APP_APPNAME_IS_NOT_EMPTY = "app_appname_is_not_empty";
+ public static final String APP_DEVICETYPE_IS_NOT_EMPTY = "app_DeviceType_is_not_empty";
+ public static final String APP_VERSIONNAME_IS_NOT_EMPTY = "app_versionname_is_not_empty";
+ public static final String APP_TYPEID_IS_NOT_EMPTY = "app_typeid_is_not_empty";
+ public static final String APP_FILEPATH_IS_NOT_EMPTY = "app_filepath_is_not_empty";
+ public static final String APP_ABSTRACT_IS_NOT_EMPTY = "app_abstract_is_not_empty";
+ public static final String APP_IMAGRPATH_IS_NOT_EMPTY = "app_imagepath_is_not_empty";
+ public static final String APP_SAVE_IS_FAILED = "app_save_is_failed";
+ public static final String APP_SAVE_IS_SUCCESS = "app_save_is_success";
+ public static final String APP_UPLOAD_PARAM_FILE_IS_NULL = "app_upload_param_file_is_null";
+ public static final String APP_UPLOAD_MD5 = "md5_failed";
+ public static final String APP_TITLE_NAME_MODIFY = "app_title_name_modify";
+ public static final String APP_TITLE_NAME_INSERT = "app_title_name_insert";
+ public static final String APP_APPNAME_MAX_ERROR = "app_appname_max_error";
+ public static final String APP_FILEPATH_MAX_ERROR = "app_filepath_max_error";
+ public static final String APP_VERSIONNAME_MAX_ERROR = "app_versionname_max_error";
+ public static final String APP_ABSTRACT_MAX_ERROR = "app_abstract_max_error";
+ public static final String APP_FILE_TYPE_IS_UNSUPPORTED = "app_file_type_is_unsupported";
+ public static final String APP_FILE_READ_FAILED = "app_file_read_failed";
+ public static final String APP_FILE_UNCOMPRESS_FAILED = "app_file_uncompress_failed";
+ /** ▲▲▲▲▲▲▲▲▲▲ app ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ authority ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String AUTHORITY_ID_IS_NOT_EMPTY = "authority_id_is_not_empty";
+ /** ▼▼▼▼▼▼▼▼▼▼ authority ▼▼▼▼▼▼▼▼▼▼ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ system ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String SYS_ERROR_SAVE_SUCCESS = "sys_error_save_success";
+ /** ▼▼▼▼▼▼▼▼▼▼ system ▼▼▼▼▼▼▼▼▼▼ */
+
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/property/MessageUtil.java b/appmarket-utils/src/main/java/app/market/utils/property/MessageUtil.java
new file mode 100644
index 0000000..e3bdfc2
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/property/MessageUtil.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.property;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+import app.market.utils.constants.Constants;
+
+public class MessageUtil {
+
+ public static Properties prop = null;
+ public static String i18n = Constants.I18N_JA_JP;
+
+ private static Properties getPropertyInstance() {
+ if ( prop == null ) {
+ prop = new Properties();
+ try {
+ prop.load( new InputStreamReader( MessageUtil.class.getClassLoader().getResourceAsStream( "message." + i18n + ".properties" ), "UTF-8" ) );
+ } catch ( FileNotFoundException e ) {
+ throw new RuntimeException();
+ } catch ( IOException e ) {
+ throw new RuntimeException();
+ }
+ }
+ return MessageUtil.prop;
+ }
+
+ /**
+ * Get propertites
+ *
+ * @param type
+ * @return String
+ */
+ public static String getPropertites(String type) {
+ prop = getPropertyInstance();
+ return prop.getProperty( type );
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/property/Option.java b/appmarket-utils/src/main/java/app/market/utils/property/Option.java
new file mode 100644
index 0000000..eb8413e
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/property/Option.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.property;
+
+import java.io.Serializable;
+
+/**
+ * Page select's option
+ *
+ * @author Toyota
+ */
+public class Option implements Serializable, Comparable<Option> {
+
+ private static final long serialVersionUID = 3717357659129461807L;
+
+ private String label;
+ private String value;
+
+ public Option() {
+ }
+
+ public Option(String label, String value) {
+ this.label = label;
+ this.value = value;
+ }
+
+ /**
+ * @return the label
+ */
+ public String getLabel() {
+ return label == null ? "" : label;
+ }
+
+ /**
+ * @param label
+ * the label to set
+ */
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ /**
+ * @return the value
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param value
+ * the value to set
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public int compareTo(Option o) {
+ int b = Integer.valueOf( o.getValue() );
+ int n = ( this.getValue() == null || "".equals( this.getValue().trim() ) ) ? 0
+ : Integer.valueOf( this.getValue() );
+ return b > n ? -1 : 1;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/property/PropertyContants.java b/appmarket-utils/src/main/java/app/market/utils/property/PropertyContants.java
new file mode 100644
index 0000000..920e5f5
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/property/PropertyContants.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.property;
+
+public class PropertyContants {
+
+ public static final String WEBAPP_REDIRECT_URI = "webapp_redirect_uri";
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/property/PropertyUtil.java b/appmarket-utils/src/main/java/app/market/utils/property/PropertyUtil.java
new file mode 100644
index 0000000..0be4d44
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/property/PropertyUtil.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.property;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class PropertyUtil {
+
+ public static final String DEFAULLABEL = "please choose";
+
+ private static final String ESCAPE_COLON = "&col&";
+
+ public static Properties prop;
+
+ private static Properties getPropertyInstance() {
+ if ( prop == null ) {
+ prop = new Properties();
+ try {
+ prop.load( new InputStreamReader(
+ PropertyUtil.class.getClassLoader().getResourceAsStream( "property.properties" ), "UTF-8" ) );
+ } catch ( FileNotFoundException e ) {
+ throw new RuntimeException();
+ } catch ( IOException e ) {
+ throw new RuntimeException();
+ }
+ }
+ return PropertyUtil.prop;
+ }
+
+ /**
+ * Get propertites
+ *
+ * @param type
+ * @return String
+ */
+ public static String getPropertites(String type) {
+ prop = getPropertyInstance();
+ return prop.getProperty( type );
+ }
+
+ /**
+ * Get dropdown list
+ *
+ * @param type
+ * @param hasSpace
+ * @return List<Option>
+ */
+ public static List<Option> getPropertites(String type, boolean hasSpace) {
+ prop = getPropertyInstance();
+ Pattern pattern = Pattern.compile( type + "[0-9]" );
+ Matcher matcher = null;
+
+ final List<Option> selectList = new ArrayList<Option>();
+ Option option = null;
+ if ( hasSpace ) {
+ option = new Option( DEFAULLABEL, "" );
+ selectList.add( option );
+ }
+ Enumeration<?> keys = prop.keys();
+ while ( keys.hasMoreElements() ) {
+ String key = (String) keys.nextElement();
+ matcher = pattern.matcher( key );
+ if ( matcher.matches() ) {
+ String value = prop.getProperty( key );
+ String[] split = value.split( ":" );
+ String escapeLabel = split[1].trim();
+ if ( -1 != escapeLabel.lastIndexOf( ESCAPE_COLON ) ) {
+ escapeLabel = escapeLabel.replace( ESCAPE_COLON, ":" );
+ }
+ option = new Option( escapeLabel, split[0] );
+ selectList.add( option );
+ }
+ }
+ return selectList;
+ }
+
+ /**
+ * Get label
+ *
+ * @param type
+ * @param value
+ * @return
+ */
+ public static String getPropertites(String type, String value) {
+ prop = getPropertyInstance();
+ Pattern pattern = Pattern.compile( type + "[0-9]" );
+ Matcher matcher = null;
+
+ String str = "";
+ Enumeration<?> keys = prop.keys();
+ while ( keys.hasMoreElements() ) {
+ String key = (String) keys.nextElement();
+ matcher = pattern.matcher( key );
+ if ( matcher.matches() ) {
+ String sValue = prop.getProperty( key );
+ String[] split = sValue.split( ":" );
+ if ( value.equals( split[0] ) ) {
+ str = split[1];
+ break;
+ }
+ }
+ }
+ return str;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/rest/RestTemplateUtil.java b/appmarket-utils/src/main/java/app/market/utils/rest/RestTemplateUtil.java
new file mode 100644
index 0000000..4f97aa0
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/rest/RestTemplateUtil.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.rest;
+
+import java.util.Map;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
+
+import app.market.utils.SpringWebUtil;
+import app.market.utils.constants.Constants;
+import app.market.utils.json.JsonResult;
+import app.market.utils.property.KeysConstants;
+import app.market.utils.property.MessageUtil;
+import app.market.utils.webservice.ApiParam;
+
+public class RestTemplateUtil {
+
+ private RestTemplate restTemplate;
+
+ public RestTemplateUtil() {
+ this.restTemplate = new RestTemplate();
+ }
+
+ /**
+ *
+ * @param url
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ public String post(String url, Object model, HttpSession session) throws Exception {
+ HttpHeaders requestHeaders = new HttpHeaders();
+ Class<?> clx = model.getClass();
+ //String token = SpringWebUtil.getRequest().getParameter( "token" );
+ String token = (String) session.getAttribute(Constants.SESSION_TOKEN);
+ String servletPath = SpringWebUtil.getRequest().getServletPath();
+ if ( StringUtils.isEmpty( token ) || StringUtils.isEmpty( servletPath ) )
+ throw new HttpClientErrorException( HttpStatus.UNAUTHORIZED,
+ MessageUtil.getPropertites( KeysConstants.STATUS_UNAUTHORIZED ) );
+ requestHeaders.add( Constants.TOKEN_AUTHORIZATION, token );
+ //requestHeaders.add( Constants.TOKEN_AUTHORIZATION_RESOURCE, servletPath );
+
+ HttpEntity<Object> requestEntity = new HttpEntity<Object>( clx.getClass().forName( clx.getName() ).cast( model ), requestHeaders );
+ String result = restTemplate.postForObject( url, requestEntity, String.class );
+ return result;
+ }
+
+
+
+ /**
+ * Restful GET
+ * @param url
+ * @param params
+ * @return
+ * @throws Exception
+ */
+ public String get(String url,HttpSession session, String... params) throws Exception {
+ HttpEntity<Object> requestEntity = getRequestEntity(null, session);
+
+ ResponseEntity<String> result = restTemplate.exchange( url, HttpMethod.GET, requestEntity, String.class, params );
+ return result.getBody();
+ }
+
+ /**
+ * getQueryParam
+ * @param url
+ * @param queryParams
+ * @return
+ * @throws Exception
+ */
+ public String getByQueryParam(String url, Map<String, Object> queryParams, HttpSession session) throws Exception {
+ HttpEntity<Object> requestEntity = getRequestEntity(null, session);
+ url = addParamURL(url, queryParams);
+ ResponseEntity<String> result = restTemplate.exchange(url, HttpMethod.GET, requestEntity, String.class, queryParams);
+ return result.getBody();
+ }
+
+ /**
+ * Restful GET (download)
+ * @param url
+ * @param param
+ * @return
+ * @throws Exception
+ */
+ public ResponseEntity<byte[]> download(String url, Map<String, Object> queryParams, HttpSession session) throws Exception {
+ HttpEntity<Object> requestEntity = getRequestEntity(null, session);
+
+ url = addParamURL(url, queryParams);
+
+ ResponseEntity<byte[]> exchange = restTemplate.exchange(url, HttpMethod.GET, requestEntity, byte[].class);
+ return exchange;
+ }
+
+ /**
+ * Restful Post
+ * @param restUserSelectloginuser
+ * @param postData
+ * @return
+ * @throws Exception
+ */
+ public ResponseEntity<String> Post(String restUserSelectloginuser, Object postData, HttpSession session) throws Exception {
+ ResponseEntity<String> rEntity = restTemplate.postForEntity( restUserSelectloginuser, postData, String.class);
+ return rEntity;
+ }
+
+ /**
+ * Restful POST(update)
+ * @param url
+ * @param param
+ * @param class1
+ * @return
+ * @throws ClassNotFoundException
+ */
+ public String post(String url, MultiValueMap<String, Object> queryParam, Class<String> classz, String[] pathParam, HttpSession session)
+ throws ClassNotFoundException {
+ HttpEntity<Object> requestEntity = getRequestEntity(queryParam, session);
+
+ String result = null;
+
+ if(pathParam == null){
+ result = restTemplate.postForObject( url, requestEntity, String.class);
+ }else{
+ result = restTemplate.postForObject( url, requestEntity, String.class, pathParam);
+ }
+
+ return result;
+ }
+
+ /**
+ * Restful DELETE
+ * @param url
+ * @param id
+ * @return
+ * @throws Exception
+ */
+ public String delete(String url, String id, HttpSession session) throws Exception {
+ String json = "";
+ HttpEntity<Object> requestEntity = getRequestEntity(id, session);
+ ResponseEntity<String> exchange = restTemplate.exchange(url, HttpMethod.DELETE, requestEntity, String.class, id);
+ json = exchange.getBody();
+ return json;
+ }
+
+/*===========================================================================================================================
+ * PRIVATE METHOD
+===========================================================================================================================*/
+
+ /**
+ * getRequestEntity
+ * @param body
+ * @param session
+ * @return
+ */
+ private HttpEntity<Object> getRequestEntity(Object body, HttpSession session)
+ {
+ HttpHeaders requestHeaders = new HttpHeaders();
+ //String token = SpringWebUtil.getRequest().getParameter(ApiParam.API_RESPONSE_TOKEN);
+ String token = (String) session.getAttribute(Constants.SESSION_TOKEN);
+ if(token == null) token = "";
+ String servletPath = SpringWebUtil.getRequest().getServletPath();
+ if (StringUtils.isEmpty(servletPath)) {
+ throw new HttpClientErrorException(HttpStatus.UNAUTHORIZED,
+ MessageUtil.getPropertites(KeysConstants.STATUS_UNAUTHORIZED));
+ }
+ requestHeaders.add(Constants.TOKEN_AUTHORIZATION, token);
+ //requestHeaders.add(Constants.TOKEN_AUTHORIZATION_RESOURCE, servletPath);
+
+ HttpEntity<Object> requestEntity = new HttpEntity<Object>( body, requestHeaders );
+ return requestEntity;
+ }
+
+ private String addParamURL(String url, Map<String, Object> queryParams ){
+ url += "?";
+ for (String key : queryParams.keySet()) {
+ if (!url.endsWith("?")) {
+ url += "&";
+ }
+ Object val = queryParams.get(key);
+ if(val != null){
+ url += key + "=" + val.toString();
+ }
+ }
+ return url;
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/token/DeleteModel.java b/appmarket-utils/src/main/java/app/market/utils/token/DeleteModel.java
new file mode 100644
index 0000000..23bd856
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/token/DeleteModel.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.token;
+
+import java.io.Serializable;
+
+public class DeleteModel implements Serializable {
+
+ private static final long serialVersionUID = -7060343784298377805L;
+
+ private String id;
+
+ private String token;
+
+ public DeleteModel() {
+ }
+
+ public DeleteModel(String id, String token) {
+ this.id = id;
+ this.token = token;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/token/TokenModel.java b/appmarket-utils/src/main/java/app/market/utils/token/TokenModel.java
new file mode 100644
index 0000000..3c53d11
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/token/TokenModel.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.token;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class TokenModel implements Serializable {
+
+ private static final long serialVersionUID = 2544696323418911040L;
+
+ private String loginId;
+ private String token; //accessToken
+ private String refreshToken; //refreshToken
+ private String ipAddress;
+ private Object userEntity;
+ private List<Object> apiList = new ArrayList<>();
+ private List<Object> resourceList = new ArrayList<>();
+
+ public TokenModel() {
+
+ }
+
+ public TokenModel(String loginId, Object user, String token) {
+ this.loginId = loginId;
+ this.userEntity = user;
+ this.token = token;
+ }
+
+ public String getLoginId() {
+ return loginId;
+ }
+
+ public void setLoginId(String loginId) {
+ this.loginId = loginId;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public String getRefreshToken() {
+ return refreshToken;
+ }
+
+ public void setRefreshToken(String refreshToken) {
+ this.refreshToken = refreshToken;
+ }
+
+ public String getIpAddress() {
+ return ipAddress;
+ }
+
+ public void setIpAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ }
+
+ public Object getUserEntity() {
+ return userEntity;
+ }
+
+ public void setUserEntity(Object userEntity) {
+ this.userEntity = userEntity;
+ }
+
+ public List<Object> getResourceList() {
+ return resourceList;
+ }
+
+ public void setResourceList(List<Object> resourceList) {
+ this.resourceList = resourceList;
+ }
+
+ public List<Object> getApiList() {
+ return apiList;
+ }
+
+ public void setApiList(List<Object> apiList) {
+ this.apiList = apiList;
+ }
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/webservice/ApiParam.java b/appmarket-utils/src/main/java/app/market/utils/webservice/ApiParam.java
new file mode 100644
index 0000000..fb54618
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/webservice/ApiParam.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.webservice;
+
+import java.util.HashMap;
+
+public class ApiParam {
+ public static final String API_PARAM_SORT = "sort";
+ public static final String API_PARAM_ORDER = "order";
+ public static final String API_PARAM_OFFSET = "offset";
+ public static final String API_PARAM_LIMIT = "limit";
+
+ /**
+ *
+ */
+ public static final String API_PARAM_VALUE_ORDER_ASC = "ASC";
+ public static final String API_PARAM_VALUE_ORDER_DESC = "DESC";
+ public static final String API_PARAM_VALUE_DICTIONARY_CATEGORY = "0100";
+ public static final String API_PARAM_VALUE_DICTIONARY_DEVICETYPE = "0101";
+ public static final String API_PARAM_VALUE_DICTIONARY_ISPUBLIC = "0102";
+
+ /**
+ * パラメータの
+ */
+ public static final String API_PARAM_DEFAULT_OFFSET = "0";
+ public static final String API_PARAM_DEFAULT_LIMIT = "10";
+ public static final int API_PARAM_CRITICAL_OFFSET = 0;
+ public static final int API_PARAM_CRITICAL_LIMIT = 0;
+
+ public static final String API_PARAM_DEFAULT_IS_PUBLIC = "1";
+ public static final String API_PARAM_DEFAULT_NOT_PUBLIC = "0";
+
+ public static final String API_PARAM_DEFAULT_SORT_NAME = "createDate";
+ public static final String API_PARAM_DEFAULT_DEL = "0";
+
+ /**
+ *
+ */
+ public static final String API_PARAM_CRITICAL_LIMIT_MIN = "1";
+ public static final String API_PARAM_CRITICAL_TYPE_MIN = "0";
+ public static final String API_PARAM_CRITICAL_TYPE_MAX = "9";
+ public static final String API_PARAM_CRITICAL_DEVICETYPE_MIN = "0";
+ public static final String API_PARAM_CRITICAL_DEVICETYPE_MAX = "5";
+
+ /**
+ *
+ */
+ public static final int API_PARAM_APPNAME_LENGTH = 32;
+ public static final int API_PARAM_USERNAME_LENGTH = 32;
+ public static final int API_PARAM_VERSIONNAME_LENGTH = 32;
+ public static final int API_PARAM_VERFILEPATH_LENGTH = 200;
+ public static final int API_PARAM_APPABSTRACT_LENGTH = 800;
+ public static final int API_PARAM_USERPASSMIN_LENGTH = 6;
+ public static final int API_PARAM_USERPASSMAX_LENGTH = 32;
+ public static final int API_PARAM_MAILADDRESS_LENGTH = 32;
+
+ /**
+ *
+ */
+ public static final String API_APP_PARAM_LOGINID = "loginId";
+ public static final String API_APP_PARAM_REFRESHTOKEN = "refreshToken";
+ public static final String API_APP_PARAM_PASSWORD = "password";
+ public static final String API_APP_PARAM_MULTIPARTFILE = "multipartFile";
+ public static final String API_APP_PARAM_FILE_HASH = "hashcode";
+ public static final String API_APP_PARAM_APPTYPEID = "appTypeId";
+ public static final String API_APP_PARAM_APPID = "appId";
+ public static final String API_APP_PARAM_FILE_NAME = "fileName";
+ public static final String API_APP_PARAM_FILE_PATH = "filePath";
+ public static final String API_APP_PARAM_APPNAME = "appName";
+ public static final String API_APP_PARAM_DEVELOPER = "appDeveloper";
+ public static final String API_APP_PARAM_APPDEVICETYPEID = "appDeviceTypeId";
+ public static final String API_APP_PARAM_APPDEVICETYPE = "appDeviceType";
+ public static final String API_APP_PARAM_APPISPUBLIC = "appIsPublic";
+ public static final String API_APP_PARAM_DICTIONARY_TYPEID = "dictionaryTypeId";
+ public static final String API_APP_PARAM_DICTIONARY_VALUE = "dictionaryValue";
+ public static final String API_APP_PARAM_DICTIONARY_LABEL = "dictionaryLabel";
+ public static final String API_APP_PARAM_KEYWORD = "keyWord";
+ public static final String API_APP_PARAM_APPID_CUSTOM = "appIdCustom";
+
+ /**
+ *
+ */
+ public static final String API_USER_PARAM_USERNAME = "userName";
+ public static final String API_USER_PARAM_MAIL = "mail";
+ public static final String API_USER_PARAM_CREATEDATE = "createDate";
+ public static final String API_USER_PARAM_AUID = "auId";
+
+ /**
+ *
+ */
+ public static final String API_RESPONSE_TOKEN = "token";
+ public static final String API_RESPONSE_REFRESHTOKEN = "refreshToken";
+ public static final String API_RESPONSE_APPID = "appId";
+ public static final String API_RESPONSE_APPVERSIONID = "appVersionId";
+ public static final String API_RESPONSE_USERID = "userId";
+
+ public static final HashMap<String, String> AppQueryParam=new HashMap<String, String>();
+ static
+ {
+ AppQueryParam.put("appId" , "APP_ID");
+ AppQueryParam.put("appName" , "APP_NAME");
+ AppQueryParam.put("appAbstract" , "APP_ABSTRACT");
+ AppQueryParam.put("typeId" , "APP_TYPE_ID");
+ AppQueryParam.put("typeName" , "TYPE_NAME");
+ AppQueryParam.put("appDeviceTypeId" , "APP_DEVICE_TYPE_ID");
+ AppQueryParam.put("appDeviceTypeName" , "APP_DEVICE_TYPE_NAME");
+ AppQueryParam.put("developer" , "DEVELOPER");
+ AppQueryParam.put("developerName" , "USER_NAME");
+ AppQueryParam.put("versionName" , "VERSION_NAME");
+ AppQueryParam.put("verFileSize" , "SIZE");
+ AppQueryParam.put("verCreateDate" , "VERSION_CREATE_DATE");
+ AppQueryParam.put("createDate" , "APP_CREATE_DATE");
+ AppQueryParam.put("updateDate" , "APP_UPDATE_DATE");
+ AppQueryParam.put("hashcode" , "MD5");
+
+ }
+
+ public static final HashMap<String, String> UserQueryParam=new HashMap<String, String>();
+ static
+ {
+ UserQueryParam.put("userId" , "USER_ID");
+ UserQueryParam.put("userName" , "USER_NAME");
+ UserQueryParam.put("mailAddress" , "MAIL_ADDRESS");
+ UserQueryParam.put("createDate" , "CREATE_DATE");
+ UserQueryParam.put("updateDate" , "UPDATE_DATE");
+ UserQueryParam.put("auId" , "A_AU_ID");
+ UserQueryParam.put("auName" , "AU_NAME");
+ }
+
+ public enum UserQueryParamWeb {
+ USERNAME("userName", 1)
+ , USERMAILADDRESS("mailAddress", 2)
+ , USERCREATEDATE("createDate", 3);
+
+ private String fieldName;
+ private int paramId;
+
+ private UserQueryParamWeb(String fieldName, int paramId) {
+ this.fieldName = fieldName;
+ this.paramId = paramId;
+ }
+
+ public static String getFieldNameById(int id) {
+ for (UserQueryParamWeb c : UserQueryParamWeb.values()) {
+ if (c.getId() == id) {
+ return c.fieldName;
+ }
+ }
+ return null;
+ }
+
+ public int getId() {
+ return paramId;
+ }
+ }
+
+ public enum UserAuId {
+ ADIMIN("ADIMIN", 1)
+ , DEVELOPER("DEVELOPER", 2)
+ , NORMAL("NORMAL", 3);
+
+ private String fieldName;
+ private int paramId;
+
+ private UserAuId(String fieldName, int paramId) {
+ this.fieldName = fieldName;
+ this.paramId = paramId;
+ }
+
+ public static String getFieldNameById(int id) {
+ for (UserAuId c : UserAuId.values()) {
+ if (c.getId() == id) {
+ return c.fieldName;
+ }
+ }
+ return null;
+ }
+
+ public int getId() {
+ return paramId;
+ }
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCode.java b/appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCode.java
new file mode 100644
index 0000000..cf067ae
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCode.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.webservice;
+
+import app.market.utils.property.MessageUtil;
+
+public class ErrorCode {
+
+ private ErrorCodeEnum codeStr=null;
+ private String message = "";
+
+ /**
+ *
+ * @param codeStr
+ * @param messageKey
+ */
+ public ErrorCode(ErrorCodeEnum codeStr, String messageKey) {
+ super();
+ this.codeStr = codeStr;
+
+ String message = MessageUtil.getPropertites( messageKey );
+ this.message = message;
+ }
+
+ public ErrorCodeEnum getCodeStr() {
+ return codeStr;
+ }
+ public void setCodeStr(ErrorCodeEnum codeStr) {
+ this.codeStr = codeStr;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCodeEnum.java b/appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCodeEnum.java
new file mode 100644
index 0000000..c1cecbd
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/webservice/ErrorCodeEnum.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.webservice;
+
+public enum ErrorCodeEnum{
+
+ //●400リ request error
+ INVALID_BODY,INVALID_QUERYPARAM,MISSING_NECESSARY_QUERYPARAM,MISSING_RESOURCE,BAD_FAILED,ALREADY_UPDATED,
+
+ //●401 authorized error
+ UNAUTHORIZED_API,EXPIRED_TOKEN,EXPIRED_REFRESH_TOKEN,LOGIN_FAILD,
+
+ //●402 MD5 error
+ MD5_FAILED,
+
+ //●403 forbidden
+ FORBIDDEN_RESOURCE,
+
+ //●409 already exist
+ RESOURCE_ALREADY_EXISTS,CORRELATION_RESOURCE_ALREADY_EXISTS,TYPENAME_ALREADY_EXISTS,
+
+ //●415 unsupport file
+ UNSUPPORT_FILE,
+
+ //●503 system maintenance
+ UNDER_MAINTENANCE,
+
+}
diff --git a/appmarket-utils/src/main/java/app/market/utils/webservice/WebServiceURI.java b/appmarket-utils/src/main/java/app/market/utils/webservice/WebServiceURI.java
new file mode 100644
index 0000000..40cb025
--- /dev/null
+++ b/appmarket-utils/src/main/java/app/market/utils/webservice/WebServiceURI.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils.webservice;
+
+public class WebServiceURI {
+
+ /** token expire */
+ public static final String REST_TOKEN_VALIDATETOKENEXPIRE_LF = "/api/v1/validateTokenRest/validateTokenExpire";
+
+ public static final String REST_TOKEN_VALIDATETOKENAUTHORTICATION_LF = "/api/v1/validateTokenRest/validateTokenAuthortication";
+
+ public static final String REST_TOKEN_LF = "/api/v1/token/{refreshToken}";
+
+ /** ▼▼▼▼▼▼▼▼▼▼ user ▼▼▼▼▼▼▼▼▼▼ */
+ /** login */
+ public static final String REST_USER_SELECTLOGINUSER_LF = "/api/v1/login";
+ /** user collection */
+ public static final String REST_USER_SELECTPAGINATIONDATABYEXAMPLE_LF = "/api/v1/user/collection";
+ /** user search */
+ public static final String REST_USER_BY_USERNAME_LF = "/api/v1/user/{userName}";
+ /** get current user */
+ public static final String REST_USER_SELECT_CURRENT_LF = "/api/v1/user/currentUser";
+ /** save user */
+ public static final String REST_USER_LF = "/api/v1/user";
+ /** delete user */
+ public static final String REST_USER_BY_USERID_LF = "/api/v1/user/{userId}";
+ /** ▲▲▲▲▲▲▲▲▲▲ user ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ application ▼▼▼▼▼▼▼▼▼▼ */
+ /** get application collection */
+ public static final String REST_APP_COLLECTION_APP_LF = "/api/v1/app/collection";
+ /** get application information */
+ public static final String REST_APP_INFO_LF = "/api/v1/app/info";
+
+ public static final String REST_APP_INFO_PARM_ID_LF = "/api/v1/app/info/{appId}";
+ /** get application authority */
+ public static final String REST_APP_INFO_PARM_CUSTOMID_LF = "/api/v1/app/info/dev/{appIdCustom}";
+
+ public static final String REST_APP_VERSION_INFO_LF = "/api/v1/app/info/version";
+
+ /** application upload */
+ public static final String REST_APP_FILE_LF = "/api/v1/app/file";
+
+ public static final String REST_APP_FILE_PARM_FILENAME_TYPEID_APPID_LF = "/api/v1/app/file/{fileName}/{appDeviceTypeId}/{appId}";
+
+ public static final String REST_APP_FILE_PARM_FILEPATH_LF = "/api/v1/app/file";
+
+ public static final String REST_APP_IMAGE_LF = "/api/v1/app/image";
+ /** ▲▲▲▲▲▲▲▲▲▲ application ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ authority ▼▼▼▼▼▼▼▼▼▼ */
+ /** get authority list */
+ public static final String REST_AUTHORITY_GET_LIST_OPTION_LF = "/api/v1/authority/collection";
+ /** ▲▲▲▲▲▲▲▲▲▲ authority ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ resource ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String REST_RESOURCE_GET_MENU_RESOURCES_BY_LOGINID_LF = "/api/v1/resource/menuResource/collection";
+ /** ▲▲▲▲▲▲▲▲▲▲ resource ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ dictionary ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String REST_DICTIONARY_COLLECTION_LF = "/api/v1/dictionary/collection/{dictionaryTypeId}";
+ public static final String REST_DICTIONARY_INFO_LF = "/api/v1/dictionary/info";
+ /** ▲▲▲▲▲▲▲▲▲▲ dictionary ▲▲▲▲▲▲▲▲▲▲ */
+}
diff --git a/appmarket-utils/src/main/resources/message.ja.JP.properties b/appmarket-utils/src/main/resources/message.ja.JP.properties
new file mode 100644
index 0000000..cdb7b8c
--- /dev/null
+++ b/appmarket-utils/src/main/resources/message.ja.JP.properties
@@ -0,0 +1,98 @@
+project_error=A server error has occurred. Please contact the administrator.
+status_unauthorized=Your session has timed out, please log in again.
+status_forbidden=Have no permission to read the records of this application.
+status_too_many_connections=The account has been registered.
+bad_request=Request parameter is wrong!
+md5_failed=Failed to check file on md5!
+app_upload_param_file_is_null = Upload file is required.
+invalid_query_param=Invalid query parameter!
+invalid_body=Invalid body
+already_exist = Data has already existed!
+user_not_delete = Users with data connections can not be deleted.
+expired_refresh_token=Refresh token has timed out.
+
+###################### login message ######################
+login_loginId_is_not_exist=Invalid User name or Password.
+login_loginId_is_not_empty=User name is required.
+login_password_is_not_empty=Password is required.
+###################### /login message ######################
+
+###################### user message ######################
+user_old_password_is_not_empty=Old password is required.
+user_new_password_is_not_empty=New password is required.
+user_password_is_not_empty = Password is required.
+no_spaces_can_be_found_in_the_password = Password can not contain space.
+user_username_is_not_empty=User name is required.
+user_username_is_not_repeated=User name has already existed.
+user_username_max_error=Maximum length of user name is 32 characters.
+user_password_max_error=Maximum length of password is 32 characters.
+user_repassword_max_error=Maximum length of password is 32 characters.
+user_mailaddress_max_error=Maximum length of mail address is 32 characters.
+user_repassword_is_not_empty = Confirm password is required.
+user_mailaddress_is_not_empty=Mail address is required.
+user_userid_is_not_empty=User id is required.
+user_save_is_failed=Save user failed.
+
+user_is_exist= User name has already been registered.
+user_delete_failed=Delete user failed.
+user_name_is_not_empty=Name is required.
+user_get_list_is_failed=Get user list failed.
+user_new_repassword_is_not_empty=Confirm password is required.
+user_new_repassword_is_not_equals=Password doesn't match.
+user_save_is_success = Update account successfully.
+user_repassword_error = Minimum length of password is 6 characters.
+user_password_error = Minimum length of confirm password is 6 characters.
+user_mailaddress_is_not_equals = Enter the email address in the format:mail@example.com.
+
+user_loginid_is_failed = Login Id is wrong.
+user_info_change_success= Change the information successfully.
+user_title_name_insert=User/Create
+user_title_name_modify=User/Detail
+###################### /user message ######################
+
+###################### /app message ######################
+app_title_name_insert=App/Create
+app_title_name_modify=App/Detail
+app_save_is_failed=Update App failed.
+app_appname_is_not_empty=App name is required.
+app_DeviceType_is_not_empty=App devicetype can not be empty.
+app_versionname_is_not_empty=Version is required.
+app_typeid_is_not_empty=Type Id is required.
+app_filepath_is_not_empty=File path is required.
+app_abstract_is_not_empty=App description is required.
+app_imagepath_is_not_empty=App Icon is required.
+
+app_save_is_success=App updated successfully.
+app_appname_max_error=Maximum length of App name is 32 characters.
+app_versionname_max_error=Maximum length of version is 32 characters.
+app_abstract_max_error=Maximum length of description is 1000 characters.
+app_filepath_max_error=Maximum length of file path is 200 characters.
+
+app_file_read_failed=Read App file failed.
+app_file_uncompress_failed=Uncompress App file failed.
+
+###################### app message ######################
+
+###################### errorcode message ######################
+the_picture_sizes_should_not_exceed_500KB = The size of picture can not exceed 500KB.
+you_can_upload_pictures_only = You can upload pictures only.
+missing_necessary_queryparam=Query parameter is empty or wrong.
+invalid_operation=Invalid operation
+app_file_type_is_unsupported=Unsupported APP file type.
+developer_is_not_exist=Developer does not exist.
+resource_already_exists=User name has already existed.
+resource_app_already_exists=Application identify has already existed.
+
+###################### errorcode message ######################
+
+###################### /authority message ######################
+authority_id_is_not_empty = Authority Id is required.
+###################### /authority message ######################
+
+###################### project message ######################
+user_is_success= Create user successfully.
+###################### /project message ######################
+
+###################### system message ######################
+
+###################### /system message ###################### \ No newline at end of file
diff --git a/appmarket-utils/src/main/resources/message.ja.en.properties b/appmarket-utils/src/main/resources/message.ja.en.properties
new file mode 100644
index 0000000..cdb7b8c
--- /dev/null
+++ b/appmarket-utils/src/main/resources/message.ja.en.properties
@@ -0,0 +1,98 @@
+project_error=A server error has occurred. Please contact the administrator.
+status_unauthorized=Your session has timed out, please log in again.
+status_forbidden=Have no permission to read the records of this application.
+status_too_many_connections=The account has been registered.
+bad_request=Request parameter is wrong!
+md5_failed=Failed to check file on md5!
+app_upload_param_file_is_null = Upload file is required.
+invalid_query_param=Invalid query parameter!
+invalid_body=Invalid body
+already_exist = Data has already existed!
+user_not_delete = Users with data connections can not be deleted.
+expired_refresh_token=Refresh token has timed out.
+
+###################### login message ######################
+login_loginId_is_not_exist=Invalid User name or Password.
+login_loginId_is_not_empty=User name is required.
+login_password_is_not_empty=Password is required.
+###################### /login message ######################
+
+###################### user message ######################
+user_old_password_is_not_empty=Old password is required.
+user_new_password_is_not_empty=New password is required.
+user_password_is_not_empty = Password is required.
+no_spaces_can_be_found_in_the_password = Password can not contain space.
+user_username_is_not_empty=User name is required.
+user_username_is_not_repeated=User name has already existed.
+user_username_max_error=Maximum length of user name is 32 characters.
+user_password_max_error=Maximum length of password is 32 characters.
+user_repassword_max_error=Maximum length of password is 32 characters.
+user_mailaddress_max_error=Maximum length of mail address is 32 characters.
+user_repassword_is_not_empty = Confirm password is required.
+user_mailaddress_is_not_empty=Mail address is required.
+user_userid_is_not_empty=User id is required.
+user_save_is_failed=Save user failed.
+
+user_is_exist= User name has already been registered.
+user_delete_failed=Delete user failed.
+user_name_is_not_empty=Name is required.
+user_get_list_is_failed=Get user list failed.
+user_new_repassword_is_not_empty=Confirm password is required.
+user_new_repassword_is_not_equals=Password doesn't match.
+user_save_is_success = Update account successfully.
+user_repassword_error = Minimum length of password is 6 characters.
+user_password_error = Minimum length of confirm password is 6 characters.
+user_mailaddress_is_not_equals = Enter the email address in the format:mail@example.com.
+
+user_loginid_is_failed = Login Id is wrong.
+user_info_change_success= Change the information successfully.
+user_title_name_insert=User/Create
+user_title_name_modify=User/Detail
+###################### /user message ######################
+
+###################### /app message ######################
+app_title_name_insert=App/Create
+app_title_name_modify=App/Detail
+app_save_is_failed=Update App failed.
+app_appname_is_not_empty=App name is required.
+app_DeviceType_is_not_empty=App devicetype can not be empty.
+app_versionname_is_not_empty=Version is required.
+app_typeid_is_not_empty=Type Id is required.
+app_filepath_is_not_empty=File path is required.
+app_abstract_is_not_empty=App description is required.
+app_imagepath_is_not_empty=App Icon is required.
+
+app_save_is_success=App updated successfully.
+app_appname_max_error=Maximum length of App name is 32 characters.
+app_versionname_max_error=Maximum length of version is 32 characters.
+app_abstract_max_error=Maximum length of description is 1000 characters.
+app_filepath_max_error=Maximum length of file path is 200 characters.
+
+app_file_read_failed=Read App file failed.
+app_file_uncompress_failed=Uncompress App file failed.
+
+###################### app message ######################
+
+###################### errorcode message ######################
+the_picture_sizes_should_not_exceed_500KB = The size of picture can not exceed 500KB.
+you_can_upload_pictures_only = You can upload pictures only.
+missing_necessary_queryparam=Query parameter is empty or wrong.
+invalid_operation=Invalid operation
+app_file_type_is_unsupported=Unsupported APP file type.
+developer_is_not_exist=Developer does not exist.
+resource_already_exists=User name has already existed.
+resource_app_already_exists=Application identify has already existed.
+
+###################### errorcode message ######################
+
+###################### /authority message ######################
+authority_id_is_not_empty = Authority Id is required.
+###################### /authority message ######################
+
+###################### project message ######################
+user_is_success= Create user successfully.
+###################### /project message ######################
+
+###################### system message ######################
+
+###################### /system message ###################### \ No newline at end of file
diff --git a/appmarket-utils/src/test/java/app/market/utils/AppTest.java b/appmarket-utils/src/test/java/app/market/utils/AppTest.java
new file mode 100644
index 0000000..bb7d52b
--- /dev/null
+++ b/appmarket-utils/src/test/java/app/market/utils/AppTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.utils;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/database/appmarket.sql b/database/appmarket.sql
new file mode 100644
index 0000000..b8cfa29
--- /dev/null
+++ b/database/appmarket.sql
@@ -0,0 +1,248 @@
+CREATE DATABASE IF NOT EXISTS `appmarket` /*!40100 DEFAULT CHARACTER SET latin1 */;
+USE `appmarket`;
+-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
+--
+-- Host: 192.168.20.161 Database: appmarket
+-- ------------------------------------------------------
+-- Server version 5.7.22
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `t_app`
+--
+
+DROP TABLE IF EXISTS `t_app`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_app` (
+ `APP_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `APP_NAME` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
+ `APP_ABSTRACT` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `APP_TYPE_ID` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `APP_DEVICE_TYPE_ID` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `DEVELOPER` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `APP_CREATE_DATE` datetime DEFAULT NULL,
+ `APP_UPDATE_DATE` datetime DEFAULT NULL,
+ `APP_IS_DEL` char(1) COLLATE utf8_unicode_ci DEFAULT '0',
+ `APP_VERSION_NAME` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `APP_IS_PUBLIC` char(1) COLLATE utf8_unicode_ci DEFAULT '0',
+ `APP_VERSION_ID` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `APP_ID_CUSTOM` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`APP_ID`),
+ KEY `develop_fk_idx` (`DEVELOPER`),
+ KEY `type_fk_idx` (`APP_TYPE_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+
+
+--
+-- Table structure for table `t_app_version`
+--
+
+DROP TABLE IF EXISTS `t_app_version`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_app_version` (
+ `VERSION_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `V_APP_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `VERSION_NAME` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
+ `SIZE` int(11) DEFAULT NULL,
+ `COMMENT` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `FILE_PATH` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
+ `MD5` char(32) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `VERSION_CREATE_DATE` datetime DEFAULT NULL,
+ `VERSION_IS_DEL` char(1) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `IMAGE_PATH` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`VERSION_ID`),
+ KEY `app_fk_idx` (`V_APP_ID`),
+ CONSTRAINT `app_fk` FOREIGN KEY (`V_APP_ID`) REFERENCES `t_app` (`APP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_app_version`
+--
+
+
+--
+-- Table structure for table `t_authority`
+--
+
+DROP TABLE IF EXISTS `t_authority`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_authority` (
+ `AU_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `AU_NAME` varchar(50) CHARACTER SET utf8 NOT NULL,
+ `AU_IS_DEL` char(1) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`AU_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_authority`
+--
+
+LOCK TABLES `t_authority` WRITE;
+/*!40000 ALTER TABLE `t_authority` DISABLE KEYS */;
+INSERT INTO `t_authority` VALUES ('1','admin','0'),('2','developer','0'),('3','nomal','0'),('4','guest','1');
+/*!40000 ALTER TABLE `t_authority` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `t_authority_resource_link`
+--
+
+DROP TABLE IF EXISTS `t_authority_resource_link`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_authority_resource_link` (
+ `R_RES_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `R_AU_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`R_RES_ID`,`R_AU_ID`),
+ KEY `au_fk_idx` (`R_AU_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_authority_resource_link`
+--
+
+LOCK TABLES `t_authority_resource_link` WRITE;
+/*!40000 ALTER TABLE `t_authority_resource_link` DISABLE KEYS */;
+INSERT INTO `t_authority_resource_link` VALUES ('00001','1'),('01001','1'),('01002','1'),('01003','1'),('01004','1'),('01005','1'),('01006','1'),('01007','1'),('02001','1'),('02002','1'),('02003','1'),('02004','1'),('02005','1'),('02006','1'),('02007','1'),('02008','1'),('10000','1'),('11001','1'),('11002','1'),('11003','1'),('11004','1'),('11005','1'),('12001','1'),('12002','1'),('12003','1'),('12004','1'),('12005','1'),('12006','1'),('12007','1'),('12008','1'),('12009','1'),('13001','1'),('14001','1'),('14002','1'),('14003','1'),('15001','1'),('16001','1'),('00001','2'),('02001','2'),('02002','2'),('02003','2'),('02004','2'),('02005','2'),('02006','2'),('02007','2'),('02008','2'),('10000','2'),('11005','2'),('12001','2'),('12002','2'),('12003','2'),('12004','2'),('12005','2'),('12006','2'),('12007','2'),('12008','2'),('12009','2'),('13001','2'),('14001','2'),('14002','2'),('14003','2'),('15001','2'),('16001','2'),('00001','3'),('02001','3'),('02004','3'),('02007','3'),('02008','3'),('10000','3'),('11005','3'),('12001','3'),('12002','3'),('12006','3'),('12008','3'),('12009','3'),('13001','3'),('14002','3'),('14003','3'),('15001','3'),('16001','3'),('00001','4'),('02001','4'),('02004','4'),('02007','4'),('02008','4'),('10000','4'),('11005','4'),('12001','4'),('12002','4'),('12006','4'),('12008','4'),('12009','4'),('13001','4'),('14002','4'),('14003','4'),('15001','4'),('16001','4');
+/*!40000 ALTER TABLE `t_authority_resource_link` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `t_dictionary`
+--
+
+DROP TABLE IF EXISTS `t_dictionary`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_dictionary` (
+ `DIC_ID` int(11) NOT NULL AUTO_INCREMENT,
+ `DIC_TYPE` varchar(4) NOT NULL,
+ `DIC_VALUE` varchar(4) NOT NULL,
+ `DIC_LABEL` varchar(45) NOT NULL,
+ PRIMARY KEY (`DIC_ID`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_dictionary`
+--
+
+LOCK TABLES `t_dictionary` WRITE;
+/*!40000 ALTER TABLE `t_dictionary` DISABLE KEYS */;
+INSERT INTO `t_dictionary` VALUES (1,'0100','0','Automotive'),(2,'0100','1','Operation System'),(3,'0100','2','Connectivity'),(4,'0100','3','Graphics'),(5,'0100','4','Navigation'),(6,'0100','5','Multimedia'),(7,'0100','6','Nativate APP'),(8,'0100','7','AGL APP'),(9,'0100','8','Web APP'),(10,'0100','9','Other'),(11,'0101','0','Renesas M3 Dev Board'),(12,'0101','1','QEMU'),(13,'0101','2','Intel Minnowboard Max'),(14,'0101','3','TI Vayu'),(15,'0101','4','Raspberry Pi 3'),(16,'0101','5','Intel Cyclone V'),(17,'0102','0','Non-public'),(18,'0102','1','Public');
+/*!40000 ALTER TABLE `t_dictionary` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `t_resource`
+--
+
+DROP TABLE IF EXISTS `t_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_resource` (
+ `RES_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `RES_NAME` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
+ `RES_TYPE` varchar(50) CHARACTER SET utf8 NOT NULL,
+ `ACCESS_PATH` varchar(1000) CHARACTER SET utf8 NOT NULL,
+ `HTTP_METHOD` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`RES_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_resource`
+--
+
+LOCK TABLES `t_resource` WRITE;
+/*!40000 ALTER TABLE `t_resource` DISABLE KEYS */;
+INSERT INTO `t_resource` VALUES ('00001','メイン画面','resource','/main',NULL),('01001','アカウントリスト','resource','/account/list',NULL),('01002','アカウント編集','resource','/account/modify',NULL),('01003','アカウント検索','resource','/account/search',NULL),('01004','アカウント更新','resource','/account/update',NULL),('01005','アカウント新規を保存','resource','/account/save',NULL),('01006','アカウントを削除','resource','/account/delete',NULL),('01007','アカウント詳細','resource','/account/detail',NULL),('02001','アプリリスト','resource','/app/list',NULL),('02002','アプリ編集','resource','/app/modify',NULL),('02003','アプリ新規','resource','/app/save',NULL),('02004','アプリ検索','resource','/app/search',NULL),('02005','アプリ新規','resource','/app/insert',NULL),('02006','アプリ削除','resource','/app/delete',NULL),('02007','アプリダウンロード ','resource','/app/download',NULL),('02008','アプリ情報','resource','/app/detail',NULL),('10000','login','api','/login','POST'),('11001','getUserList','api','/user/collection','GET'),('11002','getUserById','api','/user/{userId}','GET'),('11003','updateUser','api','/user','POST'),('11004','deleteUser','api','/user/{userId}','DELETE'),('11005','getCurrentUser','api','/user/currentUser','GET'),('12001','getAppList','api','/app/collection','GET'),('12002','getApp','api','/app/info/{appId}','GET'),('12003','updateApp','api','/app/info','POST'),('12004','updateAppVersion','api','/app/info/version','POST'),('12005','deleteAppAllInfo','api','/app/info/{appId}','DELETE'),('12006','getDictionaryCollection','api','/dictionary/collection/{DictionaryTypeId}','GET'),('12007','updateImageFile','api','/app/image','POST'),('12008','getAppInfoByCustomId','api','/app/info/dev/{appIdCustom}','GET'),('12009','saveDictionary','api','/dictionary/info','POST'),('13001','getAuthorityCollection','api','/authority/collection','GET'),('14001','updateAppFile','api','/app/file/{fileName}/{appTypeId}/{appId}','POST'),('14002','downloadAppFile','api','/app/file/{fileName}/{appTypeId}/{appId}','GET'),('14003','downloadAppFile','api','/app/file','GET'),('15001','getMenuResource','api','/resource/menuResource/collection','GET'),('16001','refreshToken','api','/token/{refreshToken}','GET');
+/*!40000 ALTER TABLE `t_resource` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `t_user`
+--
+
+DROP TABLE IF EXISTS `t_user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_user` (
+ `USER_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `USER_PW` varchar(50) CHARACTER SET utf8 NOT NULL,
+ `USER_NAME` varchar(50) CHARACTER SET utf8 NOT NULL,
+ `REAL_NAME` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `MAIL_ADDRESS` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
+ `CREATE_DATE` datetime DEFAULT NULL,
+ `UPDATE_DATE` datetime DEFAULT NULL,
+ `IS_DEL` char(1) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`USER_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_user`
+--
+
+LOCK TABLES `t_user` WRITE;
+/*!40000 ALTER TABLE `t_user` DISABLE KEYS */;
+INSERT INTO `t_user` VALUES ('4c442aaf-5f61-4673-b45f-acec2fb8eb08','c7f2618467e07b91cb5f542cb4b5c853','super_user',NULL,'admin@tted.com',NULL,NULL,'0'),('817acafc-cff8-4b05-ab04-a1bf4035119f','e10adc3949ba59abbe56e057f20f883e','appMarketGuestAuthorizationUser',NULL,'appMarketGuestAuthorizationUser@126.com',NULL,NULL,'0');
+/*!40000 ALTER TABLE `t_user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `t_user_authority_link`
+--
+
+DROP TABLE IF EXISTS `t_user_authority_link`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_user_authority_link` (
+ `A_USER_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ `A_AU_ID` char(36) COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`A_USER_ID`,`A_AU_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `t_user_authority_link`
+--
+
+LOCK TABLES `t_user_authority_link` WRITE;
+/*!40000 ALTER TABLE `t_user_authority_link` DISABLE KEYS */;
+INSERT INTO `t_user_authority_link` VALUES ('4c442aaf-5f61-4673-b45f-acec2fb8eb08','1'),('817acafc-cff8-4b05-ab04-a1bf4035119f','3');
+/*!40000 ALTER TABLE `t_user_authority_link` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Dumping routines for database 'appmarket'
+--
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2019-02-19 17:34:04
diff --git a/database/appmarket_update_2.0-3.0.sql b/database/appmarket_update_2.0-3.0.sql
new file mode 100644
index 0000000..5f19cab
--- /dev/null
+++ b/database/appmarket_update_2.0-3.0.sql
@@ -0,0 +1,4 @@
+DELETE FROM `appmarket`.`t_authority_resource_link`;
+DELETE FROM `appmarket`.`t_resource`;
+INSERT INTO `t_authority_resource_link` VALUES ('00001','1'),('01001','1'),('01002','1'),('01003','1'),('01004','1'),('01005','1'),('01006','1'),('01007','1'),('02001','1'),('02002','1'),('02003','1'),('02004','1'),('02005','1'),('02006','1'),('02007','1'),('02008','1'),('10000','1'),('11001','1'),('11002','1'),('11003','1'),('11004','1'),('11005','1'),('12001','1'),('12002','1'),('12003','1'),('12004','1'),('12005','1'),('12006','1'),('12007','1'),('12008','1'),('12009','1'),('13001','1'),('14001','1'),('14002','1'),('14003','1'),('15001','1'),('16001','1'),('00001','2'),('02001','2'),('02002','2'),('02003','2'),('02004','2'),('02005','2'),('02006','2'),('02007','2'),('02008','2'),('10000','2'),('11005','2'),('12001','2'),('12002','2'),('12003','2'),('12004','2'),('12005','2'),('12006','2'),('12007','2'),('12008','2'),('12009','2'),('13001','2'),('14001','2'),('14002','2'),('14003','2'),('15001','2'),('16001','2'),('00001','3'),('02001','3'),('02004','3'),('02007','3'),('02008','3'),('10000','3'),('11005','3'),('12001','3'),('12002','3'),('12006','3'),('12008','3'),('12009','3'),('13001','3'),('14002','3'),('14003','3'),('15001','3'),('16001','3'),('00001','4'),('02001','4'),('02004','4'),('02007','4'),('02008','4'),('10000','4'),('11005','4'),('12001','4'),('12002','4'),('12006','4'),('12008','4'),('12009','4'),('13001','4'),('14002','4'),('14003','4'),('15001','4'),('16001','4');
+INSERT INTO `t_resource` VALUES ('00001','メイン画面','resource','/main',NULL),('01001','アカウントリスト','resource','/account/list',NULL),('01002','アカウント編集','resource','/account/modify',NULL),('01003','アカウント検索','resource','/account/search',NULL),('01004','アカウント更新','resource','/account/update',NULL),('01005','アカウント新規を保存','resource','/account/save',NULL),('01006','アカウントを削除','resource','/account/delete',NULL),('01007','アカウント詳細','resource','/account/detail',NULL),('02001','アプリリスト','resource','/app/list',NULL),('02002','アプリ編集','resource','/app/modify',NULL),('02003','アプリ新規','resource','/app/save',NULL),('02004','アプリ検索','resource','/app/search',NULL),('02005','アプリ新規','resource','/app/insert',NULL),('02006','アプリ削除','resource','/app/delete',NULL),('02007','アプリダウンロード ','resource','/app/download',NULL),('02008','アプリ情報','resource','/app/detail',NULL),('10000','login','api','/login','POST'),('11001','getUserList','api','/user/collection','GET'),('11002','getUserById','api','/user/{userId}','GET'),('11003','updateUser','api','/user','POST'),('11004','deleteUser','api','/user/{userId}','DELETE'),('11005','getCurrentUser','api','/user/currentUser','GET'),('12001','getAppList','api','/app/collection','GET'),('12002','getApp','api','/app/info/{appId}','GET'),('12003','updateApp','api','/app/info','POST'),('12004','updateAppVersion','api','/app/info/version','POST'),('12005','deleteAppAllInfo','api','/app/info/{appId}','DELETE'),('12006','getDictionaryCollection','api','/dictionary/collection/{DictionaryTypeId}','GET'),('12007','updateImageFile','api','/app/image','POST'),('12008','getAppInfoByCustomId','api','/app/info/dev/{appIdCustom}','GET'),('12009','saveDictionary','api','/dictionary/info','POST'),('13001','getAuthorityCollection','api','/authority/collection','GET'),('14001','updateAppFile','api','/app/file/{fileName}/{appTypeId}/{appId}','POST'),('14002','downloadAppFile','api','/app/file/{fileName}/{appTypeId}/{appId}','GET'),('14003','downloadAppFile','api','/app/file','GET'),('15001','getMenuResource','api','/resource/menuResource/collection','GET'),('16001','refreshToken','api','/token/{refreshToken}','GET'); \ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..0aed415
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-root</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <!-- spring version -->
+ <spring.version>4.0.6.RELEASE</spring.version>
+ <!-- log4j version -->
+ <slf4j.version>1.6.6</slf4j.version>
+ <log4j.version>1.2.9</log4j.version>
+ </properties>
+
+ <dependencies>
+
+ <!-- springframe start -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-oxm</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <!-- springframe end -->
+
+ <!-- common -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.4</version>
+ </dependency>
+
+ <!-- log start -->
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <!-- log end -->
+
+ </dependencies>
+
+ <modules>
+ <module>warehouse</module>
+ <module>appmarket-core</module>
+ <module>appmarket-model</module>
+ <module>appmarket-persistence</module>
+ <module>appmarket-utils</module>
+ <module>webservice</module>
+ </modules>
+
+ <build>
+ <finalName>appmarket-root</finalName>
+ <plugins>
+ <!-- Compile -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
+ <configuration>
+ <compilerArgument>-parameters</compilerArgument>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/warehouse/pom.xml b/warehouse/pom.xml
new file mode 100644
index 0000000..574a49a
--- /dev/null
+++ b/warehouse/pom.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-root</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>warehouse</artifactId>
+ <packaging>war</packaging>
+ <name>warehouse Maven Webapp</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- servlet -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>4.0.0</version>
+ </dependency>
+ <!-- taglib -->
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- JSP 标准标签库(JSTL) -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <!-- standard在jstl1.2之后不需要一起使用 -->
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <!-- ./JSP 标准标签库(JSTL) -->
+
+
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.5.3</version>
+ </dependency>
+
+ <!-- upload -->
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.10</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>app.market</groupId>
+ <artifactId>appmarket-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ <version>1.2.28</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <finalName>warehouse</finalName>
+ </build>
+</project>
diff --git a/warehouse/release note.txt b/warehouse/release note.txt
new file mode 100644
index 0000000..7846c77
--- /dev/null
+++ b/warehouse/release note.txt
@@ -0,0 +1,18 @@
+2018/07/02
+ver00.00.02
+①logoを変更する
+
+2018/06/11
+ver00.00.01
+①ログイン
+②ログアウト
+③ユーザーの新規
+④ユーザーの削除
+⑤ユーザーリストの表示
+⑥アプリの詳細情報の新規
+⑦アプリの詳細情報の削除
+⑧アプリの詳細情報の表示
+⑨アプリリストの表示
+⑩アプリのアップロード
+⑪アプリのダウンロード
+
diff --git a/warehouse/src/main/java/app/market/LogUtil.java b/warehouse/src/main/java/app/market/LogUtil.java
new file mode 100644
index 0000000..cd9ac0c
--- /dev/null
+++ b/warehouse/src/main/java/app/market/LogUtil.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market;
+
+import org.slf4j.Logger;
+
+public class LogUtil {
+
+ public static void printCatchLog(final Logger logger, Exception e){
+ logger.error("Thread.currentThread().getStackTrace()[1].getMethodName()" + e.getMessage());
+ }
+}
diff --git a/warehouse/src/main/java/app/market/PropertyTool.java b/warehouse/src/main/java/app/market/PropertyTool.java
new file mode 100644
index 0000000..24f2cda
--- /dev/null
+++ b/warehouse/src/main/java/app/market/PropertyTool.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+import app.market.utils.constants.Constants;
+
+
+public class PropertyTool {
+
+ public static Properties prop;
+
+ private static Properties getPropertyInstance() {
+ if ( prop == null ) {
+ prop = new Properties();
+ try {
+ prop.load( new InputStreamReader(
+ PropertyTool.class.getClassLoader().getResourceAsStream( Constants.PROPERTIES_FILE_NAME_PROPERTIES ), Constants.CHARACTER_UTF8 ) );
+ } catch ( FileNotFoundException e ) {
+ throw new RuntimeException();
+ } catch ( IOException e ) {
+ throw new RuntimeException();
+ }
+ }
+ return PropertyTool.prop;
+ }
+
+ /**
+ * get propertites
+ *
+ * @param type
+ * @return String
+ */
+ public static String getPropertites(String type) {
+ prop = getPropertyInstance();
+ return prop.getProperty( type );
+ }
+}
diff --git a/warehouse/src/main/java/app/market/WebServiceClient.java b/warehouse/src/main/java/app/market/WebServiceClient.java
new file mode 100644
index 0000000..528af0e
--- /dev/null
+++ b/warehouse/src/main/java/app/market/WebServiceClient.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market;
+
+import app.market.utils.webservice.WebServiceURI;
+
+public class WebServiceClient {
+
+ private static final String REST_SERVICE_URI = PropertyTool.getPropertites( "webservice_base_uri" );
+
+ /** token expire */
+ public static final String REST_TOKEN_VALIDATETOKENEXPIRE = REST_SERVICE_URI.concat( WebServiceURI.REST_TOKEN_VALIDATETOKENEXPIRE_LF );
+
+ public static final String REST_TOKEN_VALIDATETOKENAUTHORTICATION = REST_SERVICE_URI.concat( WebServiceURI.REST_TOKEN_VALIDATETOKENAUTHORTICATION_LF );
+
+ public static final String REST_TOKEN = REST_SERVICE_URI.concat( WebServiceURI.REST_TOKEN_LF );
+
+
+ /** ▼▼▼▼▼▼▼▼▼▼ user ▼▼▼▼▼▼▼▼▼▼ */
+ /** login */
+ public static final String REST_USER_SELECTLOGINUSER = REST_SERVICE_URI.concat( WebServiceURI.REST_USER_SELECTLOGINUSER_LF );
+ /** get user collection */
+ public static final String REST_USER_SELECTPAGINATIONDATABYEXAMPLE = REST_SERVICE_URI.concat( WebServiceURI.REST_USER_SELECTPAGINATIONDATABYEXAMPLE_LF );
+ /** get user information */
+ public static final String REST_USER_BY_USERNAME = REST_SERVICE_URI.concat( WebServiceURI.REST_USER_BY_USERNAME_LF );
+ /** get current user */
+ public static final String REST_USER_SELECT_CURRENT = REST_SERVICE_URI.concat( WebServiceURI.REST_USER_SELECT_CURRENT_LF );
+ /** save user */
+ public static final String REST_USER = REST_SERVICE_URI.concat( WebServiceURI.REST_USER_LF );
+ /** delete user */
+ public static final String REST_USER_BY_USERID = REST_SERVICE_URI.concat( WebServiceURI.REST_USER_BY_USERID_LF );
+ /** ▲▲▲▲▲▲▲▲▲▲ user ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ application ▼▼▼▼▼▼▼▼▼▼ */
+ /** get application collection */
+ public static final String REST_APP_COLLECTION_APP = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_COLLECTION_APP_LF );
+ /** get application information */
+ public static final String REST_APP_INFO = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_INFO_LF );
+
+ public static final String REST_APP_INFO_PARM_ID = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_INFO_PARM_ID_LF );
+ /** get application authority */
+ public static final String REST_APP_INFO_PARM_CUSTOMID = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_INFO_PARM_CUSTOMID_LF );
+
+ public static final String REST_APP_VERSION_INFO = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_VERSION_INFO_LF );
+
+ /** upload application */
+ public static final String REST_APP_FILE = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_FILE_LF );
+
+ public static final String REST_APP_FILE_PARM_FILENAME_TYPEID_APPID = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_FILE_PARM_FILENAME_TYPEID_APPID_LF );
+
+ public static final String REST_APP_IMAGE = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_IMAGE_LF );
+ public static final String REST_APP_FILE_PARM_FILEPATH = REST_SERVICE_URI.concat( WebServiceURI.REST_APP_FILE_PARM_FILEPATH_LF );
+ /** ▲▲▲▲▲▲▲▲▲▲ application ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ authority ▼▼▼▼▼▼▼▼▼▼ */
+ /** get authority list */
+ public static final String REST_AUTHORITY_GET_LIST_OPTION = REST_SERVICE_URI.concat( WebServiceURI.REST_AUTHORITY_GET_LIST_OPTION_LF );
+ /** ▲▲▲▲▲▲▲▲▲▲ authority ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ resource ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String REST_RESOURCE_GET_MENU_RESOURCES_BY_LOGINID = REST_SERVICE_URI.concat( WebServiceURI.REST_RESOURCE_GET_MENU_RESOURCES_BY_LOGINID_LF );
+ /** ▲▲▲▲▲▲▲▲▲▲ resource ▲▲▲▲▲▲▲▲▲▲ */
+
+ /** ▼▼▼▼▼▼▼▼▼▼ dictionary ▼▼▼▼▼▼▼▼▼▼ */
+ public static final String REST_DICTIONARY_COLLECTION = REST_SERVICE_URI.concat( WebServiceURI.REST_DICTIONARY_COLLECTION_LF );
+ public static final String REST_DICTIONARY_INFO = REST_SERVICE_URI.concat( WebServiceURI.REST_DICTIONARY_INFO_LF );
+ /** ▲▲▲▲▲▲▲▲▲▲ dictionary ▲▲▲▲▲▲▲▲▲▲ */
+}
diff --git a/warehouse/src/main/java/app/market/filter/Filter.java b/warehouse/src/main/java/app/market/filter/Filter.java
new file mode 100644
index 0000000..68465c1
--- /dev/null
+++ b/warehouse/src/main/java/app/market/filter/Filter.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.filter;
+
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.web.filter.OncePerRequestFilter;
+
+public class Filter extends OncePerRequestFilter {
+
+ @Override
+ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
+ throws ServletException, IOException {
+
+ filterChain.doFilter( request, response );
+
+ }
+
+}
diff --git a/warehouse/src/main/java/app/market/filter/Log4jlistener.java b/warehouse/src/main/java/app/market/filter/Log4jlistener.java
new file mode 100644
index 0000000..b7b2325
--- /dev/null
+++ b/warehouse/src/main/java/app/market/filter/Log4jlistener.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.filter;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public class Log4jlistener implements ServletContextListener {
+
+ public void contextDestroyed(ServletContextEvent servletcontextevent) {
+ // System.getProperties().clear();
+ }
+
+ public void contextInitialized(ServletContextEvent servletcontextevent) {
+ Properties prop = new Properties();
+ try {
+ prop.load( new InputStreamReader(
+ Log4jlistener.class.getClassLoader().getResourceAsStream( "config/properties.properties" ) ) );
+ } catch ( IOException e ) {
+ e.printStackTrace();
+ }
+ Enumeration<Object> e = prop.keys();
+ while ( e.hasMoreElements() ) {
+ String key = e.nextElement().toString();
+ String path = prop.getProperty( key );
+ System.setProperty( key, path );
+ File f = new File( path );
+ if ( !f.getParentFile().exists() ) {
+ f.getParentFile().mkdirs();
+ }
+ }
+ }
+
+}
diff --git a/warehouse/src/main/java/app/market/web/controller/BreadcrumbMapping.java b/warehouse/src/main/java/app/market/web/controller/BreadcrumbMapping.java
new file mode 100644
index 0000000..3a3d113
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/BreadcrumbMapping.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller;
+
+import org.apache.commons.lang3.StringUtils;
+
+import app.market.web.form.breadcrumb.BreadcrumbFrom;
+import app.market.web.form.breadcrumb.BreadcrumbSubFrom;
+
+public class BreadcrumbMapping {
+
+ public static final String APP_DETAIL = "APP,APP_DETAIL";
+ public static final String APP_DETAIL_MODIFY = "APP,APP_DETAIL,APP_DETAIL_MODIFY";
+ public static final String APP_INSERT = "APP,APP_INSERT";
+ public static final String APP_MODIFY = "APP,APP_MODIFY";
+ public static final String USER_INSERT = "USER,USER_INSERT";
+ public static final String USER_DETAIL = "USER,USER_DETAIL";
+ public static final String USER_MODIFY = "USER,USER_MODIFY";
+ public static BreadcrumbFrom getBreadcrumb(String name) {
+ BreadcrumbFrom breadcrumb = new BreadcrumbFrom();
+ String[] names = name.split(",");
+ for (int i = 0; i < names.length; i++) {
+ BreadcrumbSubFrom sub = BreadcrumbEnum.getBreadcrumbSubFrom(names[i]);
+ breadcrumb.getBreadcrumb().add(sub);
+ if (i == names.length - 1) {
+ sub.setCurrent(true);
+ }
+ }
+ return breadcrumb;
+ }
+
+ public enum BreadcrumbEnum {
+ USER("USER", "User", "account"),
+ USER_DETAIL("USER_DETAIL", "Detail", "url"),
+ USER_INSERT("USER_INSERT", "Create", "url"),
+ USER_MODIFY("USER_MODIFY", "Modify", "url"),
+ APP("APP", "App", "app"),
+ APP_DETAIL("APP_DETAIL", "Detail", "app/more"),
+ APP_DETAIL_MODIFY("APP_DETAIL_MODIFY", "Modify", "url"),
+ APP_MODIFY("APP_MODIFY", "Modify", "url"),
+ APP_INSERT("APP_INSERT", "Create", "url");
+
+ private String key;
+ private String name;
+ private String url;
+
+ private BreadcrumbEnum(String key, String name, String value) {
+ this.key = key;
+ this.name = name;
+ this.url = value;
+ }
+
+ public static BreadcrumbSubFrom getBreadcrumbSubFrom(String key) {
+ for (BreadcrumbEnum c : BreadcrumbEnum.values()) {
+ if (StringUtils.equalsIgnoreCase(c.getKey(), key)) {
+ BreadcrumbSubFrom sub = new BreadcrumbSubFrom();
+ sub.setName(c.getName());
+ sub.setUrl(c.getUrl());
+ return sub;
+ }
+ }
+ return null;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ }
+
+}
diff --git a/warehouse/src/main/java/app/market/web/controller/ControllerMapping.java b/warehouse/src/main/java/app/market/web/controller/ControllerMapping.java
new file mode 100644
index 0000000..599dd7b
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/ControllerMapping.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller;
+
+public enum ControllerMapping {
+
+ LOGIN {
+ public String toString() {
+ return "/login";
+ }
+ },
+ MAIN {
+ public String toString() {
+ return "/main";
+ }
+ },
+ MAINDEV {
+ public String toString() {
+ return "/mainDev";
+ }
+ },
+ ACCOUNT {
+ public String toString() {
+ return "/account";
+ }
+ },
+ APP {
+ public String toString() {
+ return "/app";
+ }
+ },
+}
diff --git a/warehouse/src/main/java/app/market/web/controller/PageMapping.java b/warehouse/src/main/java/app/market/web/controller/PageMapping.java
new file mode 100644
index 0000000..938a4f9
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/PageMapping.java
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller;
+
+public enum PageMapping {
+
+ LOGIN {
+ // login screen
+ @Override
+ public String toString() {
+ return "index";
+ }
+ },
+ MAIN {
+ // main screen
+ @Override
+ public String toString() {
+ return "main";
+ }
+ },
+ MAINDEV {
+ // mainDev screen
+ @Override
+ public String toString() {
+ return "mainDev";
+ }
+ },
+ APP {
+ // app screen
+ @Override
+ public String toString() {
+ return "app";
+ }
+ },
+ ACCOUNT_LIST {
+ // account list screen
+ @Override
+ public String toString() {
+ return "account/list";
+ }
+ },
+ ACCOUNT_DETAIL {
+ // account detail screen
+ @Override
+ public String toString() {
+ return "account/detail";
+ }
+ },
+ ACCOUNT_MODIFY {
+ // account modify screen
+ @Override
+ public String toString() {
+ return "account/modify";
+ }
+ },
+ ACCOUNT_REGISTER {
+ // account register screen
+ @Override
+ public String toString() {
+ return "account/register";
+ }
+ },
+ APP_LIST {
+ // application list screen
+ @Override
+ public String toString() {
+ return "app/list";
+ }
+ },
+ APP_TYPE {
+ // application type screen
+ @Override
+ public String toString() {
+ return "app/type";
+ }
+ },
+ APP_MODIFY {
+ // application modify screen
+ @Override
+ public String toString() {
+ return "app/modify";
+ }
+ },
+ M3_LIST {
+ // app dev list screen
+ @Override
+ public String toString() {
+ return "appDev/listDev";
+ }
+ },
+ M3_LOCAL_LIST {
+ // app dev local list screen
+ @Override
+ public String toString() {
+ return "appDev/localListDev";
+ }
+ },
+ M3_SEARCH {
+ // app dev search screen
+ @Override
+ public String toString() {
+ return "appDev/searchDev";
+ }
+ },
+ M3_DETAIL {
+ // app dev detail screen
+ @Override
+ public String toString() {
+ return "appDev/detailDev";
+ }
+ },
+ CREATE_APP {
+ // add application screen
+ @Override
+ public String toString() {
+ return "app/createApp";
+ }
+ },
+ SAVE_APP_INFO {
+ // save application information
+ @Override
+ public String toString() {
+ return "app/saveAppInfo";
+ }
+ },
+ CHECK_APP_INFO {
+ // check application information
+ @Override
+ public String toString() {
+ return "app/checkAppInfo";
+ }
+ },
+ OTHER_404 {
+ // 404 screen
+ @Override
+ public String toString() {
+ return "other/404";
+ }
+ },
+ OTHER_500 {
+ // 500 screen
+ @Override
+ public String toString() {
+ return "other/500";
+ }
+ },
+ INIT_INFO {
+ //
+ @Override
+ public String toString() {
+ return "/app/initInfo";
+ }
+ },
+ INIT_CHECK{
+ @Override
+ public String toString() {
+ return "/app/initCheck";
+ }
+ };
+
+ public static String redirect(String pageId, String... args) {
+ String url = "redirect:" + pageId;
+ if ( args.length > 0 ) {
+ url += "?";
+ for (int i = 0; i < args.length; i++) {
+ if ( i == 0 ) {
+ url = url + "p" + i + "=" + args[i];
+ } else {
+ url = url + "&p" + i + "=" + args[i];
+ }
+ }
+ }
+ return url;
+ }
+}
diff --git a/warehouse/src/main/java/app/market/web/controller/SpringBaseController.java b/warehouse/src/main/java/app/market/web/controller/SpringBaseController.java
new file mode 100644
index 0000000..b85f1e6
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/SpringBaseController.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.servlet.HandlerExceptionResolver;
+import org.springframework.web.servlet.ModelAndView;
+
+import app.market.utils.datatable.DataTableMap;
+import app.market.utils.json.JsonMapperUtils;
+import app.market.utils.json.JsonResult;
+
+/**
+ * Base Controller
+ *
+ * @author Toyota
+ */
+public abstract class SpringBaseController implements HandlerExceptionResolver {
+
+ private static Logger logger = LoggerFactory.getLogger( SpringBaseController.class );
+
+ protected final static String MODEL_ERRORS = "modelErrors";
+
+ @Override
+ public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler,
+ Exception ex) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ if ( ex instanceof IOException ) {
+ logger.info( ex.getMessage() );
+ model.put( MODEL_ERRORS, "No permission to read the record of this application!" );
+ return new ModelAndView( "other/500", model );
+
+ } else if ( ex instanceof SQLException ) {
+ logger.info( ex.getMessage() );
+ model.put( MODEL_ERRORS, "The database error occurred." );
+ return new ModelAndView( "other/500", model );
+
+ } else if ( ex instanceof HttpClientErrorException ) {
+ logger.info( ex.getMessage() );
+ model.put( MODEL_ERRORS, ex.getMessage() );
+ return new ModelAndView( PageMapping.LOGIN.toString(), model );
+
+ } else if ( ex instanceof RuntimeException ) {
+ logger.info( ex.getMessage() );
+ model.put( MODEL_ERRORS, ex.getMessage() );
+ return new ModelAndView( "other/500", model );
+
+ } else if ( ex instanceof NullPointerException ) {
+ logger.info( ex.getMessage() );
+ model.put( MODEL_ERRORS, ex.getMessage() );
+ return new ModelAndView( "other/500", model );
+
+ } else if ( ex instanceof Exception ) {
+ logger.info( ex.getMessage() );
+ model.put( MODEL_ERRORS, "A server error occurred. Please contact the administrator!" );
+ // model.put( MODEL_ERRORS, "Your session has time out, please log on again.");
+ return new ModelAndView( "other/500", model );
+ }
+ return null;
+ }
+
+ protected String writeDataTableMap(JsonResult jr, String draw) {
+ DataTableMap map = new DataTableMap( draw, null );
+ map.setErrorMsg( jr.getStatus(), jr.getData().toString() );
+ return JsonMapperUtils.writeValueAsString( map.getMapData() );
+ }
+
+ protected String writeErrorList(JsonResult jr, List<String> errorList) {
+ errorList.add( jr.getData().toString() );
+ return JsonMapperUtils.getJsonString( jr.getStatus(), null, errorList );
+ }
+
+ protected String writeErrorString(JsonResult jr) {
+ return JsonMapperUtils.getJsonString( jr.getStatus(), null, jr.getData().toString() );
+ }
+
+}
diff --git a/warehouse/src/main/java/app/market/web/controller/account/AccountController.java b/warehouse/src/main/java/app/market/web/controller/account/AccountController.java
new file mode 100644
index 0000000..20690fa
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/account/AccountController.java
@@ -0,0 +1,336 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller.account;
+
+import java.security.NoSuchAlgorithmException;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import app.market.LogUtil;
+import app.market.utils.Md5Util;
+import app.market.utils.constants.Constants;
+import app.market.utils.datetime.DateTimeUtils;
+import app.market.utils.json.JsonMapperUtils;
+import app.market.utils.json.JsonResult;
+import app.market.utils.property.KeysConstants;
+import app.market.utils.property.MessageUtil;
+import app.market.utils.webservice.ApiParam;
+import app.market.web.controller.BreadcrumbMapping;
+import app.market.web.controller.PageMapping;
+import app.market.web.controller.SpringBaseController;
+import app.market.web.form.account.AccountForm;
+import app.market.web.services.account.AccountService;
+
+/**
+ *
+ * @author Toyota
+ *
+ * User Manager
+ *
+ */
+@Controller
+@RequestMapping(value = "account")
+public class AccountController extends SpringBaseController {
+ private static Logger logger = LoggerFactory.getLogger(AccountController.class);
+
+ @Autowired
+ private AccountService accountService;
+
+ /**
+ * User Manager Init
+ *
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "")
+ public ModelAndView init(HttpSession session) throws Exception {
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ // Unauthorized Exception
+ JsonResult jr = accountService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ model.put(MODEL_ERRORS, jr.getData().toString());
+ return new ModelAndView(PageMapping.ACCOUNT_LIST.toString(), model);
+ }
+ try {
+ accountService.getAuthorityList(model, true, session);
+
+ } catch (Exception e) {
+ LogUtil.printCatchLog(logger, e);
+ e.printStackTrace();
+ }
+ return new ModelAndView(PageMapping.ACCOUNT_LIST.toString(), model);
+ }
+
+ /**
+ * User Manager modify
+ *
+ * @param userId
+ * @return
+ * @throws Exception
+ *
+ */
+ @RequestMapping(value = "modify")
+ @ResponseBody
+ public ModelAndView modify(@RequestParam(value = "userId", required = false) String userId,
+ @RequestParam(value = "isDetail", required = false) boolean isDetail, HttpSession session)
+ throws Exception {
+ logger.debug("Modify User, start search--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName());
+ Map<String, Object> modal = new LinkedHashMap<String, Object>();
+ // Unauthorized Exception
+ JsonResult jr = accountService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ modal.put(MODEL_ERRORS, jr.getData().toString());
+ return new ModelAndView(PageMapping.ACCOUNT_LIST.toString(), modal);
+ }
+
+ AccountForm acForm;
+ String breadcrumb;
+ String viewName;
+ try {
+ if (StringUtils.isNotEmpty(userId)) {
+ // Search AccountForm By UserId
+ acForm = accountService.searchFormById(userId, session);
+ String createDate = DateTimeUtils.getDate(DateTimeUtils.DATE_FORMAT_YYYYMMDDHHMMSS_DASH,
+ acForm.getCreateDate());
+ String updateDate = DateTimeUtils.getDate(DateTimeUtils.DATE_FORMAT_YYYYMMDDHHMMSS_DASH,
+ acForm.getUpdateDate());
+ modal.put("updateDate", updateDate);
+ modal.put("createDate", createDate);
+
+ if (isDetail) {
+ breadcrumb = BreadcrumbMapping.USER_DETAIL;
+ } else {
+ breadcrumb = BreadcrumbMapping.USER_MODIFY;
+ }
+ } else {
+ acForm = new AccountForm();
+ breadcrumb = BreadcrumbMapping.USER_INSERT;
+ }
+ // Get Account List
+ acForm.getBreadcrumb().addAll(BreadcrumbMapping.getBreadcrumb(breadcrumb).getBreadcrumb());
+ } catch (Exception e) {
+ LogUtil.printCatchLog(logger, e);
+ modal.put(MODEL_ERRORS, e.getMessage());
+ return new ModelAndView(PageMapping.ACCOUNT_LIST.toString(), modal);
+ }
+ // Get Account List
+ accountService.getAuthorityList(modal, false, session);
+ modal.put("appInfo", acForm);
+ if (isDetail) {
+ viewName = PageMapping.ACCOUNT_DETAIL.toString();
+ } else {
+ viewName = PageMapping.ACCOUNT_MODIFY.toString();
+ }
+
+ logger.debug("Modify User, stop search");
+ return new ModelAndView(viewName, modal);
+ }
+
+ /**
+ * User Manager Search
+ *
+ * @param draw
+ * @param length
+ * @param start
+ * @param sort
+ * @param mailAddress
+ * @param userName
+ * @param order
+ * @return
+ * @throws ParseException
+ */
+ @RequestMapping(value = "search")
+ @ResponseBody
+ public String search(@RequestParam(value = "draw") String draw, @RequestParam(value = "length") int length,
+ @RequestParam(value = "start") int start, @RequestParam(value = "orderColumn") String sort,
+ @RequestParam(value = "keyWord") String keyWord, @RequestParam(value = "orderDir") String order,
+ @RequestParam(value = "auId") String auId, @RequestParam(value = "createDate") String createDate,
+ HttpSession session) throws ParseException {
+ logger.debug("Start search list--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() + keyWord);
+ Map<String, Object> modal = new LinkedHashMap<String, Object>();
+ // Unauthorized exception
+ JsonResult jr = accountService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeDataTableMap(jr, draw);
+ }
+ String ret = "";
+ try {
+ AccountForm form = new AccountForm();
+ // Assign value To Form
+ form.setDraw(draw);
+ form.setKeyWord(keyWord);
+ form.setAuId(auId);
+ form.setOffset(start);
+ form.setLimit(length);
+ sort = ApiParam.UserQueryParamWeb.getFieldNameById(Integer.valueOf(sort));
+ form.setSort(sort);
+ form.setOrder(order);
+ form.setIsDel("0");
+ // Page Search
+ ret = accountService.selectPaginationData(form, session);
+
+ // Get Account List
+ accountService.getAuthorityList(modal, true, session);
+ } catch (Exception e) {
+ LogUtil.printCatchLog(logger, e);
+ e.printStackTrace();
+ }
+ logger.debug("Stop search list");
+ return ret;
+ }
+
+ /**
+ * User Manager update and save
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "update")
+ @ResponseBody
+ public String update(@RequestParam(value = "form") String formString, HttpSession session)
+ throws NoSuchAlgorithmException {
+ logger.debug("Start save user--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName());
+ String ret = "";
+ List<String> errorList = new ArrayList<String>();
+
+ // Unauthorized Exception
+ JsonResult jr = accountService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeErrorList(jr, errorList);
+ }
+
+ AccountForm form = JsonMapperUtils.readValue(formString, AccountForm.class);
+ checkUpdateInfo(form, errorList);
+
+ form.setIsDel("0");
+ if (CollectionUtils.isEmpty(errorList)) {
+ // Account Save
+ if (StringUtils.isEmpty(form.getUserId())) {
+ // MD5 encrypt
+ String userPwMd = Md5Util.md5(form.getUserPw());
+ form.setUserPw(userPwMd);
+ }
+ ret = accountService.save(form, session);
+ } else {
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null, errorList);
+ }
+ logger.debug("Stop save user");
+ return ret;
+ }
+
+ /**
+ * User Manager Delete
+ *
+ */
+ @RequestMapping(value = "delete")
+ @ResponseBody
+ public String delete(@RequestParam(value = "id") String id, HttpSession session) {
+ logger.debug("Delete user start, id=" + id);
+ // Unauthorized Exception
+ JsonResult jr = accountService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeErrorString(jr);
+ }
+ // Account Delete By UserId
+ String ret = accountService.delete(id, session);
+ logger.debug("Delete user stop");
+ return ret;
+ }
+
+ /**
+ * check userinfo
+ * @param errorList
+ *
+ */
+ private List<String> checkUpdateInfo(AccountForm form, List<String> errorList) {
+
+
+ /**
+ * @ can only have numbers、letters、underscores、dots、minus numbers. There is only
+ * one between @ and dots numbers、letters、underscores、dots、minus numbers,And two
+ * points can't be next to. The content after dots can only is
+ * letters、numbers,the length is less than 1 less than 7.
+ */
+ String szReg = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$";
+ Pattern pattern = Pattern.compile(szReg);
+ Matcher matcher = pattern.matcher(form.getMailAddress());
+
+ // Input Check
+ if (StringUtils.isEmpty(form.getUserName().replace(" ", ""))) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_USERNAME_IS_NOT_EMPTY));
+ }
+ if (form.getUserName().length() > ApiParam.API_PARAM_USERNAME_LENGTH) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_USERNAME_MAX_ERROR));
+ }
+ // save Need password verification,update not Need password verification
+ if (StringUtils.isEmpty(form.getUserId())) {
+ if (form.getUserPw().indexOf(" ") != -1) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_PASSWORD_IS_NOT_SPACES));
+ }
+ if (StringUtils.isEmpty(form.getUserPw())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_PASSWORD_IS_NOT_EMPTY));
+ }
+ if (form.getUserPw().length() > 0 && form.getUserPw().length() < ApiParam.API_PARAM_USERPASSMIN_LENGTH) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_PASSWORD_ERROR));
+ }
+ if (form.getUserPw().length() > ApiParam.API_PARAM_USERPASSMAX_LENGTH) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_PASSWORD_MAX_ERROR));
+ }
+ if (StringUtils.isEmpty(form.getReuserPw())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_REPASSWORD_IS_NOT_EMPTY));
+ }
+ if (form.getReuserPw().length() > 0 && !StringUtils.equals(form.getUserPw(), form.getReuserPw())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_NEW_REPASSWORD_IS_NOT_EQUALS));
+ }
+ }
+
+ if (StringUtils.isEmpty(form.getMailAddress())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_MAILADDRESS_IS_NOT_EMPTY));
+ }
+ if (form.getMailAddress().length() > ApiParam.API_PARAM_MAILADDRESS_LENGTH) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_MAILADDRESS_MAX_ERROR));
+ }
+ if (!matcher.matches() && form.getMailAddress().length() > 0) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.USER_MAILADDRESS_IS_NOT_EQUALS));
+ }
+ if (StringUtils.isEmpty(form.getAuId())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.AUTHORITY_ID_IS_NOT_EMPTY));
+ }
+ return errorList;
+ }
+}
diff --git a/warehouse/src/main/java/app/market/web/controller/app/AppController.java b/warehouse/src/main/java/app/market/web/controller/app/AppController.java
new file mode 100644
index 0000000..afb070a
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/app/AppController.java
@@ -0,0 +1,636 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller.app;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+
+import app.market.LogUtil;
+import app.market.model.user.User;
+import app.market.utils.SpringWebUtil;
+import app.market.utils.constants.Constants;
+import app.market.utils.datetime.DateTimeUtils;
+import app.market.utils.json.JsonMapperUtils;
+import app.market.utils.json.JsonResult;
+import app.market.utils.property.KeysConstants;
+import app.market.utils.property.MessageUtil;
+import app.market.utils.webservice.ApiParam;
+import app.market.web.controller.BreadcrumbMapping;
+import app.market.web.controller.PageMapping;
+import app.market.web.controller.SpringBaseController;
+import app.market.web.form.app.AppForm;
+import app.market.web.services.app.AppService;
+import app.market.web.services.main.MainService;
+import app.market.web.services.user.UserService;
+
+
+/**
+ *
+ * @author Toyota
+ *
+ * App Manager
+ */
+@Controller
+@RequestMapping(value = "app")
+public class AppController extends SpringBaseController {
+ private static Logger logger = LoggerFactory.getLogger( AppController.class );
+
+ @Autowired
+ private AppService appService;
+
+ @Autowired
+ private MainService mainService;
+
+ @Autowired
+ private UserService userService;
+
+ @RequestMapping(value = "")
+ public ModelAndView init(@RequestParam(value = "token", required = false) String token, HttpSession session) throws Exception {
+ logger.debug( "APPinit--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() );
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.APP_LIST.toString(), model );
+ }
+ try {
+ // Get App Option
+ appService.getAppTypeOption(model, true, session);
+ appService.getDeviceTypeOption(model, true, session);
+ } catch ( Exception e ) {
+ model.put( MODEL_ERRORS, e.getMessage() );
+ return new ModelAndView( PageMapping.APP_LIST.toString(), model );
+ }
+ // Search User name
+ if(!StringUtils.isEmpty(token)){
+ User user = userService.selectCurrentUser(session);
+ model.put( "username", user.getUserName() );
+ model.put( "userid",user.getUserId() );
+ model.put( "auid", user.getAuId());
+ }
+ model.put( "menuPathString", mainService.selectMenuResourceByLoginId(session) );
+ return new ModelAndView( PageMapping.APP_LIST.toString(), model );
+ }
+
+ /**
+ * App Manager Detail
+ *
+ * @param appId
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "more")
+ @ResponseBody
+ public ModelAndView more(@RequestParam(value = "appId", required = false) String appId
+ , @RequestParam(value = "token", required = false) String token
+ , HttpSession session) throws Exception {
+ logger.debug( "APP modify--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() );
+
+ Map<String, Object> model = new LinkedHashMap<String, Object>();
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.APP_LIST.toString(), model );
+ }
+ AppForm apForm = new AppForm();
+ try {
+ // Search AppForm By AppId
+ apForm = appService.searchFormById(appId, session);
+ // Get App Option
+ appService.getAppTypeOption( model, true, session );
+ apForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(BreadcrumbMapping.APP_DETAIL).getBreadcrumb() );
+ } catch ( Exception e ) {
+ model.put( MODEL_ERRORS, e.getMessage() );
+ return new ModelAndView( PageMapping.APP_LIST.toString(), model );
+ }
+
+ // Get App Option
+ appService.getAppTypeOption( model, true, session );
+ String date = DateTimeUtils.getDate(DateTimeUtils.DATE_FORMAT_YYYYMMDD, apForm.getCreateDate());
+ model.put( "appInfo", apForm );
+ model.put("date", date);
+ model.put( Constants.TOKEN_AUTHORIZATION,token);
+ logger.debug( "APP modify" );
+ return new ModelAndView( PageMapping.APP_MODIFY.toString(), model );
+ }
+
+ /**
+ * App Manager initCreate
+ *
+ * @param appId
+ * @param token
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "initCreate")
+ public ModelAndView initCreate(@RequestParam(value = "appId", required = false) String appId,
+ @RequestParam(value = "token", required = false) String token, HttpSession session) throws Exception {
+ logger.debug( "APP save--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() );
+
+ Map<String, Object> model = new LinkedHashMap<String, Object>();
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.APP_LIST.toString(), model );
+ }
+
+ AppForm apForm;
+ String breadcrumb;
+ try {
+ // Get App Option
+ appService.getDeviceTypeOption(model, false, session);
+ apForm = new AppForm();
+ breadcrumb = BreadcrumbMapping.APP_INSERT;
+ apForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(breadcrumb).getBreadcrumb() );
+ } catch (Exception e) {
+ LogUtil.printCatchLog(logger, e);
+ model.put(MODEL_ERRORS, e.getMessage());
+ return new ModelAndView(PageMapping.APP_LIST.toString(), model);
+ }
+
+ // Search Userid
+ model.put( "appInfo", apForm );
+ model.put( "userid", userService.selectCurrentUser( session ).getUserId() );
+ logger.debug( "APP save" );
+ return new ModelAndView( PageMapping.CREATE_APP.toString(), model );
+ }
+
+ /**
+ * App Manager createApp
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "createApp")
+ @ResponseBody
+ public String createApp(@RequestParam(value = "file",required = false) MultipartFile file,
+ @RequestParam(value = "form") String formString, HttpSession session) {
+ logger.debug("APP update start --Class: " + this.getClass().getName() + "--method: " + Thread.currentThread().getStackTrace()[1].getMethodName());
+ logger.debug("formString= " + formString);
+
+ List<String> errorList = new ArrayList<String>();
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeErrorList(jr, errorList);
+ }
+ AppForm appForm = JsonMapperUtils.readValue(formString, AppForm.class);
+ checkUpdateInfo(appForm, errorList, file);
+
+ String ret="";
+ if (CollectionUtils.isEmpty(errorList)) {
+ try {
+ String token = SpringWebUtil.getRequest().getParameter("token");
+ User curUser = userService.selectCurrentUser(session);
+ appForm.setDeveloper(curUser.getUserId());
+ ret = appService.save(appForm, session);
+ } catch (Exception e) {
+ logger.error(e.getMessage());
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null, errorList);
+ }
+ } else {
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null, errorList);
+ }
+ logger.debug("APP update stop");
+ return ret;
+ }
+
+ /**
+ * App Manager initInfo
+ *
+ * @param appId
+ * @param isCreate
+ * @return
+ */
+ @RequestMapping(value = "initInfo")
+ public ModelAndView initInfo(String appId, int modifyFlag, HttpSession session){
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ AppForm appForm = new AppForm();
+ String breadcrumb;
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ model.put(MODEL_ERRORS, jr.getData());
+ //return writeErrorList(jr, jr.getData());
+ }else {
+ try{
+ appForm = appService.searchFormById(appId, session);
+ appService.getAppTypeOption( model, false, session);
+ appService.getIsPublicOption(model, false, session);
+
+ if(modifyFlag == Constants.APP_CREATE_DETAIL){
+ //create
+ breadcrumb = BreadcrumbMapping.APP_INSERT;
+ appForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(breadcrumb).getBreadcrumb() );
+ }else{
+ if(modifyFlag == Constants.APP_MODIFY){
+ //list modfiy
+ breadcrumb = BreadcrumbMapping.APP_MODIFY;
+ appForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(breadcrumb).getBreadcrumb() );
+ }else if(modifyFlag == Constants.APP_DETAIL_MODIFY){
+ //detail modfiy
+ breadcrumb = BreadcrumbMapping.APP_DETAIL_MODIFY;
+ appForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(breadcrumb).getBreadcrumb() );
+ }
+ String url = appForm.getBreadcrumb().get(1).getUrl();
+ url = url+"?"+"appId="+appId;
+ appForm.getBreadcrumb().get(1).setUrl(url);
+ }
+ }catch (Exception e) {
+ logger.error(e.getMessage());
+ model.put(MODEL_ERRORS, e.getMessage());
+ }
+ model.put("appInfo", appForm);
+ }
+
+ return new ModelAndView( PageMapping.SAVE_APP_INFO.toString(), model );
+ }
+
+ /**
+ * App Manager saveAppInfo
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "saveInfo")
+ @ResponseBody
+ public String saveInfo(@RequestParam(value = "file",required = false) MultipartFile file,
+ @RequestParam(value = "form") String formString, HttpSession session) {
+ logger.debug("APP update start --Class: " + this.getClass().getName() + "--method: " + Thread.currentThread().getStackTrace()[1].getMethodName());
+ logger.debug("formString= " + formString);
+
+ List<String> errorList = new ArrayList<String>();
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeErrorList(jr, errorList);
+ }
+ AppForm appForm = JsonMapperUtils.readValue(formString, AppForm.class);
+ checkUpdateInfo(appForm, errorList, file);
+ String ret = "";
+ if (CollectionUtils.isEmpty(errorList)) {
+ try {
+ User curUser = userService.selectCurrentUser(session);
+ appForm.setIsDel("0");
+ appForm.setDeveloper(curUser.getUserId());
+ ret = appService.save(appForm, session);
+ if(JsonMapperUtils.getResult(ret)) {
+ if (file != null) {
+ // Picture name is fileName
+ String fileName = file.getOriginalFilename();
+ appForm.setImagePath(null);
+ ret = appService.upload(appForm, file, fileName, true, session);
+ }
+ ret = appService.saveVersion(appForm, session);
+ }
+ } catch (Exception e) {
+ logger.error(e.getMessage());
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null, errorList);
+ }
+ } else {
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null,errorList);
+ }
+ logger.debug("APP update stop");
+ return ret;
+ }
+
+ /**
+ * App Manager initCheck
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "initCheck")
+ public ModelAndView initCheck(String appId, HttpSession session){
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ model.put(MODEL_ERRORS, jr.getData());
+ //return writeErrorList(jr, jr.getData());
+ }
+ AppForm appForm = new AppForm();
+ String date = "";
+ try{
+ appForm = appService.searchFormById(appId, session);
+ date = DateTimeUtils.getDate(DateTimeUtils.DATE_FORMAT_YYYYMMDD, appForm.getCreateDate());
+ appForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(BreadcrumbMapping.APP_INSERT).getBreadcrumb() );
+ }catch (Exception e) {
+ logger.error(e.getMessage());
+ model.put(MODEL_ERRORS, e.getMessage());
+ }
+ model.put("date", date);
+ model.put("appInfo", appForm);
+ return new ModelAndView( PageMapping.CHECK_APP_INFO.toString(), model );
+ }
+
+ /**
+ * App Manager check
+ *
+ * @param
+ * @return
+ */
+ @RequestMapping(value = "check")
+ @ResponseBody
+ public String check(String appId){
+ String ret = JsonMapperUtils.getJsonString(Constants.STATUS_SUCCESS, PageMapping.APP.toString(), null);
+ return ret;
+ }
+
+ /**
+ * App Manager Search
+ *
+ * @param draw
+ * @param length
+ * @param start
+ * @param sort
+ * @param appDeveloper
+ * @param appTypeId
+ * @param appName
+ * @param order
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "search")
+ @ResponseBody
+ public String search(@RequestParam(value = "draw") String draw, @RequestParam(value = "length") int length,
+ @RequestParam(value = "start") int start, @RequestParam(value = "orderColumn") String sort,
+ @RequestParam(value = "typeId") String appTypeId,@RequestParam(value = "orderDir") String order,
+ @RequestParam(value = "deviceTypeId") String appDeviceTypeId,@RequestParam(value = "token", required = false) String token,
+ @RequestParam(value = "keyWord") String keyWord, HttpSession session) throws Exception {
+ logger.debug( "Search list start --Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() + keyWord );
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ return writeDataTableMap( jr, draw );
+ }
+ // Assign value To AppForm
+ AppForm form = new AppForm();
+ form.setDraw( draw );
+ form.setAppDeviceTypeId(appDeviceTypeId);
+ form.setTypeId(appTypeId);
+ form.setOffset( start );
+ form.setLimit( length );
+ form.setSort( "createDate" );
+ form.setOrder( ApiParam.API_PARAM_VALUE_ORDER_DESC );
+ form.setIsDel( "0" );
+ form.setKeyWord(keyWord);
+ User user = userService.selectCurrentUser(session);
+ if(user == null){
+ form.setAppIsPublic(ApiParam.API_PARAM_DEFAULT_IS_PUBLIC);
+ }
+ // Page Search
+ String ret = appService.selectPaginationData( form, session );
+ logger.debug( "Search list stop" );
+ return ret;
+ }
+
+ @RequestMapping(value = "downloadenter")
+ @ResponseBody
+ public void downloadtest() {
+ logger.debug( "download done" );
+ }
+ /**
+ * App Manager Download File
+ *
+ * @param appId
+ * @param typeId
+ * @param filePath
+ * @param response
+ * @throws HttpException
+ * @throws FileNotFoundException
+ */
+ @RequestMapping(value = "download")
+ @ResponseBody
+ public void download(@RequestParam(value = "appId", required = false) String appId,
+ @RequestParam(value = "typeId", required = false) String typeId,
+ @RequestParam(value = "filePath", required = false) String filePath,
+ HttpServletResponse response, HttpSession session)
+ throws HttpException, FileNotFoundException {
+ logger.debug( "download--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() + filePath );
+ // Assign value To AppForm
+ AppForm form = new AppForm();
+ form.setAppId(appId);
+ form.setTypeId(typeId);
+ form.setVerFilePath(filePath);
+
+ try {
+ // App Download
+ ResponseEntity<byte[]> rEntity = appService.download(form, session);
+ response.setContentType(rEntity.getHeaders().getContentType().toString());
+ response.setContentLength((int) rEntity.getHeaders().getContentLength());
+ String headerKey = "Content-Disposition";
+ String contentDisponsition = rEntity.getHeaders().get(headerKey).get(0);
+ response.setHeader(headerKey, contentDisponsition);
+
+ OutputStream outStream = response.getOutputStream();
+ outStream.write(rEntity.getBody(), 0, rEntity.getBody().length);
+ outStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ logger.debug( "download done" );
+ }
+ /**
+ * App Manager uploadFile
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "uploadFile")
+ @ResponseBody
+ public String uploadFile(@RequestParam(value = "file",required = false) MultipartFile file,
+ @RequestParam(value = "form") String formString, HttpSession session) {
+ logger.debug("APP update start --Class: " + this.getClass().getName() + "--method: " + Thread.currentThread().getStackTrace()[1].getMethodName());
+ logger.debug("formString= " + formString);
+ String ret ="";
+
+ AppForm appForm = JsonMapperUtils.readValue(formString, AppForm.class);
+ List<String> errorList = new ArrayList<String>();
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeErrorList(jr, errorList);
+ }
+ try {
+ String fileName = appForm.getVerFilePath();
+ ret = appService.upload(appForm, file, fileName, false, session);
+ } catch (Exception e) {
+ logger.error(e.getMessage());
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null, e.getMessage());
+ }
+ logger.debug("APP update stop");
+ return ret;
+ }
+
+ /**
+ * App Manager Delete
+ *
+ * @param id
+ * @return
+ */
+ @RequestMapping(value = "delete")
+ @ResponseBody
+ public String delete(@RequestParam(value = "id") String id, HttpSession session) {
+ logger.debug( "APP delete start, id=" + id );
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ return writeErrorString( jr );
+ }
+ // App Delete By AppId。
+ String ret = appService.delete( id, session );
+ logger.debug( "APP delete stop" );
+ return JsonMapperUtils.getJsonString( ret, null, "" );
+ }
+
+ /**
+ * App Manager type
+ *
+ * @param
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "type")
+ @ResponseBody
+ public ModelAndView type(String type, HttpSession session) throws Exception{
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.APP_TYPE.toString(), model );
+ }
+
+ try {
+ // Get App Option
+ appService.getAppTypeOption( model, false, session );
+ appService.getDeviceTypeOption(model, false, session);
+ } catch ( Exception e ) {
+ model.put( MODEL_ERRORS, e.getMessage() );
+ return new ModelAndView( PageMapping.APP_TYPE.toString(), model );
+ }
+
+ return new ModelAndView( PageMapping.APP_TYPE.toString(), model );
+
+
+ }
+
+ /**
+ * Add Or Update Type/Device Type
+ *
+ * @param dicType
+ * @param dicValue
+ * @param dicLabel
+ * @return
+ */
+ @RequestMapping(value = "saveType")
+ @ResponseBody
+ public String saveType(@RequestParam(value = "type", required = false) String dicType,
+ @RequestParam(value = "typeValue", required = false) String dicValue,
+ @RequestParam(value = "typeLabel", required = false) String dicLabel,
+ HttpSession session) {
+ String ret = "";
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ return JsonMapperUtils.getJsonString(jr.getStatus(), null, jr.getData());
+ }
+ try {
+ ret = appService.saveDictionary(dicType, dicValue, dicLabel, session);
+ } catch (Exception e) {
+ logger.error(e.getMessage());
+ ret = JsonMapperUtils.getJsonString(Constants.STATUS_ERROR, null, e.getMessage());
+ }
+ logger.debug("Add Or Update Type/Device Type stop");
+ return ret;
+ }
+
+ /**
+ * check update info
+ * @param appForm
+ * @return
+ */
+ private List<String> checkUpdateInfo(AppForm appForm, List<String> errorList, MultipartFile imageFile) {
+
+ if(StringUtils.isEmpty(appForm.getAppId())){
+ if (StringUtils.isEmpty(appForm.getAppDeviceTypeId())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_DEVICETYPE_IS_NOT_EMPTY));
+ }
+ }else {
+ if(StringUtils.isEmpty(appForm.getVerFilePath())){
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_FILEPATH_IS_NOT_EMPTY));
+ }
+ if (StringUtils.isEmpty(appForm.getTypeId())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_TYPEID_IS_NOT_EMPTY));
+ }
+ if (appForm.getVerFilePath().length() > ApiParam.API_PARAM_VERFILEPATH_LENGTH) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_FILEPATH_MAX_ERROR));
+ }
+ if (StringUtils.isEmpty(appForm.getAppAbstract().replace(" ", ""))) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_ABSTRACT_IS_NOT_EMPTY));
+ }
+ if (appForm.getAppAbstract().length() > ApiParam.API_PARAM_APPABSTRACT_LENGTH) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_ABSTRACT_MAX_ERROR));
+ }
+ if(StringUtils.isEmpty(appForm.getAppName())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_APPNAME_IS_NOT_EMPTY));
+ }
+ if(imageFile == null && StringUtils.isEmpty(appForm.getImagePath())) {
+ errorList.add(MessageUtil.getPropertites(KeysConstants.APP_IMAGRPATH_IS_NOT_EMPTY));
+ }
+ }
+
+ return errorList;
+ }
+} \ No newline at end of file
diff --git a/warehouse/src/main/java/app/market/web/controller/login/LoginController.java b/warehouse/src/main/java/app/market/web/controller/login/LoginController.java
new file mode 100644
index 0000000..316d0e8
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/login/LoginController.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller.login;
+
+import java.util.Enumeration;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+import app.market.utils.Md5Util;
+import app.market.utils.constants.Constants;
+import app.market.utils.json.JsonMapperUtils;
+import app.market.utils.property.KeysConstants;
+import app.market.utils.property.MessageUtil;
+import app.market.utils.webservice.ApiParam;
+import app.market.web.controller.ControllerMapping;
+import app.market.web.controller.PageMapping;
+import app.market.web.controller.SpringBaseController;
+import app.market.web.services.login.LoginService;
+
+/**
+ * login
+ *
+ * @author Toyota
+ * @date 2017/10/10
+ */
+@Controller
+@RequestMapping(value = "login")
+public class LoginController extends SpringBaseController {
+
+ @Autowired
+ private LoginService loginService;
+
+ @RequestMapping(value = "")
+ public ModelAndView init() {
+ return new ModelAndView( PageMapping.LOGIN.toString(), null );
+ }
+
+ /**
+ * signin
+ *
+ * @param loginId
+ * @param userPw
+ * @param httpSession
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "signin")
+ @ResponseBody
+ public String login(@RequestParam(value = "loginId") String loginId,
+ @RequestParam(value = "userPw") String userPw,
+ HttpSession session) throws Exception {
+ //MD5 encrypt
+ String userPwMd = Md5Util.md5(userPw);
+ List<String> errList = new LinkedList<String>();
+ if ( StringUtils.isEmpty( loginId ) ) {
+ errList.add( MessageUtil.getPropertites( KeysConstants.LOGIN_LOGINID_IS_NOT_EMPTY ) );
+ }
+ if ( StringUtils.isEmpty( userPw ) ) {
+ errList.add( MessageUtil.getPropertites( KeysConstants.LOGIN_PASSWORD_IS_NOT_EMPTY ) );
+ }
+ if ( errList.size() > 0 ) {
+ return JsonMapperUtils.getJsonString( Constants.STATUS_UNAUTHORIZED, null, errList );
+ }
+
+ try {
+ String port = (String)session.getAttribute(Constants.SESSION_PORT);
+ String systemToken = (String)session.getAttribute(Constants.SESSION_SYSTEM_TOKEN);
+ String installPath = (String)session.getAttribute(Constants.SESSION_INSTALL_PATH);
+ String jsonStr = loginService.loginUser( loginId, userPwMd, session);
+ Map<String,String> value = JSON.parseObject(jsonStr, Map.class);
+ boolean result = JsonMapperUtils.getResult(jsonStr);
+ if(result){
+ String message = (String)JsonMapperUtils.getMessage(jsonStr);
+ JSONObject jsonObj = JsonMapperUtils.getJsonObject(message);
+ String token = jsonObj.getString(ApiParam.API_RESPONSE_TOKEN);
+ String refreshtoken = jsonObj.getString(ApiParam.API_RESPONSE_REFRESHTOKEN);
+ session.setAttribute( Constants.SESSION_TOKEN, token );
+ session.setAttribute( Constants.SESSION_REFRESH_TOKEN, refreshtoken );
+
+ if(StringUtils.isNotEmpty(port) && StringUtils.isNotEmpty(systemToken) && StringUtils.isNotEmpty(installPath)){
+ String param = "?" + Constants.ACCESS_PORT + "=" + port + "&" + Constants.ACCESS_SYSTEM_TOKEN + "=" + systemToken + "&" + Constants.ACCESS_INSTALL_PATH + "=" + installPath;
+ value.put("forward",ControllerMapping.MAINDEV.toString() + param);
+ }else{
+ value.put("forward",ControllerMapping.MAIN.toString());
+ }
+ jsonStr = JSON.toJSONString(value);
+ }
+ return jsonStr;
+ } catch ( Exception e ) {
+ e.getMessage();
+ throw new RuntimeException( e.getMessage() );
+ }
+ }
+
+ /**
+ * login screen init
+ *
+ * @param httpSession
+ * @return
+ */
+ @RequestMapping(value = "init")
+ @ResponseBody
+ public String init(HttpSession httpSession) {
+ // Enumeration<String> attributes = httpSession.getAttributeNames();
+ // while ( attributes.hasMoreElements() ) {
+ // String name = attributes.nextElement();
+ // httpSession.removeAttribute( name );
+ // }
+ /* httpSession.invalidate();*/
+ return JsonMapperUtils.getJsonString( Constants.STATUS_SUCCESS, ControllerMapping.LOGIN.toString(), null );
+ }
+
+ /**
+ * logout
+ *
+ * @param httpSession
+ * @return
+ */
+ @RequestMapping(value = "logout")
+ @ResponseBody
+ public String logout(HttpSession httpSession) {
+ Enumeration<String> attributes = httpSession.getAttributeNames();
+ while (attributes.hasMoreElements()) {
+ String name = attributes.nextElement();
+ httpSession.removeAttribute(name);
+ }
+ httpSession.invalidate();
+ return "";
+ }
+
+} \ No newline at end of file
diff --git a/warehouse/src/main/java/app/market/web/controller/main/MainController.java b/warehouse/src/main/java/app/market/web/controller/main/MainController.java
new file mode 100644
index 0000000..c867225
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controller/main/MainController.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controller.main;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+
+import app.market.utils.constants.Constants;
+import app.market.utils.json.JsonResult;
+import app.market.web.controller.PageMapping;
+import app.market.web.controller.SpringBaseController;
+import app.market.web.services.account.AccountService;
+import app.market.web.services.app.AppService;
+import app.market.web.services.main.MainService;
+import app.market.web.services.user.UserService;
+
+/**
+ * ログイン
+ *
+ * @author Toyota
+ * @date 2017/10/10
+ */
+@Controller
+@RequestMapping(value = "main")
+public class MainController extends SpringBaseController {
+
+ @Autowired
+ private MainService mainService;
+
+ @Autowired
+ private UserService userService;
+
+ @Autowired
+ private AccountService accountService;
+
+ @Autowired
+ private AppService appService;
+
+ /**
+ * init
+ *
+ * @param token
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "")
+ public ModelAndView init(HttpSession session) throws Exception {
+ LinkedHashMap<String, Object> modal = new LinkedHashMap<>();
+ Map<String, Object> model = new LinkedHashMap<String, Object>();
+
+ String token = (String) session.getAttribute(Constants.SESSION_TOKEN);
+ String refreshToken = (String) session.getAttribute(Constants.SESSION_TOKEN);
+ if(StringUtils.isNotEmpty(token) && StringUtils.isNotEmpty(refreshToken)){
+ JsonResult jr = mainService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ modal.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.MAIN.toString(), modal );
+ }
+
+ model.put("username", userService.selectCurrentUser(session).getUserName());
+ model.put("userid", userService.selectCurrentUser(session).getUserId());
+ model.put("auid", userService.selectCurrentUser(session).getAuId());
+ model.put("menuPathString", mainService.selectMenuResourceByLoginId(session));
+ model.put( Constants.TOKEN_AUTHORIZATION, token );
+ model.put( Constants.TOKEN_AUTHORIZATION_REFRESH, refreshToken );
+ }
+
+ appService.getAppTypeOption(model, true, session);
+ appService.getDeviceTypeOption(model, true, session);
+ accountService.getAuthorityList(model, true, session);
+ return new ModelAndView( PageMapping.MAIN.toString(), model );
+ }
+
+}
diff --git a/warehouse/src/main/java/app/market/web/controllerDev/appDev/AppControllerDev.java b/warehouse/src/main/java/app/market/web/controllerDev/appDev/AppControllerDev.java
new file mode 100644
index 0000000..4a5f0ce
--- /dev/null
+++ b/warehouse/src/main/java/app/market/web/controllerDev/appDev/AppControllerDev.java
@@ -0,0 +1,367 @@
+/*
+ * Copyright (c) 2019 TOYOTA MOTOR CORPORATION
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package app.market.web.controllerDev.appDev;
+
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.lang3.StringUtils;
+import org.codehaus.jackson.type.JavaType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.alibaba.fastjson.JSONObject;
+
+import app.market.model.resource.Resource;
+import app.market.model.user.User;
+import app.market.utils.constants.Constants;
+import app.market.utils.datetime.DateTimeUtils;
+import app.market.utils.json.JsonMapperUtils;
+import app.market.utils.json.JsonResult;
+import app.market.utils.webservice.ApiParam;
+import app.market.web.controller.BreadcrumbMapping;
+import app.market.web.controller.PageMapping;
+import app.market.web.controller.SpringBaseController;
+import app.market.web.form.app.AppForm;
+import app.market.web.services.app.AppService;
+import app.market.web.services.main.MainService;
+import app.market.web.services.user.UserService;
+
+
+/**
+ *
+ * @author Toyota
+ *
+ * App Manager
+ */
+@Controller
+@RequestMapping(value = "appDev")
+public class AppControllerDev extends SpringBaseController {
+ private static Logger logger = LoggerFactory.getLogger( AppControllerDev.class );
+
+ @Autowired
+ private AppService appService;
+
+ @Autowired
+ private MainService mainService;
+
+ @Autowired
+ private UserService userService;
+
+ @RequestMapping(value = "")
+ public ModelAndView init(@RequestParam(value = "token", required = false) String token, HttpSession session) throws Exception {
+ logger.debug( "APPinit--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() );
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.M3_LIST.toString(), model );
+ }
+ // Search User name
+ if(!StringUtils.isEmpty(token)){
+ User user = userService.selectCurrentUser(session);
+ model.put( "username", user.getUserName() );
+ model.put( "userid",user.getUserId() );
+ model.put( "auid", user.getAuId());
+ }
+ model.put("menuPathString", mainService.selectMenuResourceByLoginId(session));
+ return new ModelAndView( PageMapping.M3_LIST.toString(), model );
+ }
+
+ /**
+ * App Manager Detail
+ * @param appId
+ * @param token
+ * @param isListDev
+ * @param appStatus //button word(install:0,update:2,launch:1)
+ * @param session
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "detail")
+ @ResponseBody
+ public ModelAndView detail(@RequestParam(value = "appId", required = false) String appId
+ , @RequestParam(value = "token", required = false) String token
+ , @RequestParam(value = "isListDev") boolean isListDev
+ , @RequestParam(value = "appStatus") String appStatus
+ , HttpSession session) throws Exception {
+ logger.debug( "APP modify--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() );
+
+ Map<String, Object> model = new LinkedHashMap<String, Object>();
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.M3_DETAIL.toString(), model );
+ }
+ AppForm apForm = new AppForm();
+ try {
+ // Search AppForm By AppId
+ apForm = appService.searchFormById(appId, session);
+ apForm.getBreadcrumb().addAll( BreadcrumbMapping.getBreadcrumb(BreadcrumbMapping.APP_DETAIL).getBreadcrumb() );
+ } catch ( Exception e ) {
+ model.put( MODEL_ERRORS, e.getMessage() );
+ return new ModelAndView( PageMapping.M3_DETAIL.toString(), model );
+ }
+
+ // Get App Option
+ appService.getAppTypeOption( model, true, session);
+ String date = DateTimeUtils.getDate(DateTimeUtils.DATE_FORMAT_YYYYMMDD, apForm.getCreateDate());
+ model.put( "appInfo", apForm );
+ model.put( "date", date);
+ model.put( Constants.TOKEN_AUTHORIZATION,token);
+ model.put( "isListDev", isListDev);
+ model.put( "appStatus", appStatus);
+ logger.debug( "APP modify" );
+ return new ModelAndView( PageMapping.M3_DETAIL.toString(), model );
+ }
+
+ /**
+ * App Manager localApp
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "localApp")
+ public ModelAndView localApp(HttpSession session){
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.M3_LOCAL_LIST.toString(), model );
+ }
+ try {
+ appService.getAppTypeOption( model, false, session );
+ appService.getDeviceTypeOption(model, false, session);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return new ModelAndView( PageMapping.M3_LOCAL_LIST.toString(), model );
+ }
+
+ /**
+ * App Manager localApp
+ *
+ * @param formString
+ * @return
+ */
+ @RequestMapping(value = "SearchDev")
+ public ModelAndView SearchDev(HttpSession session){
+ LinkedHashMap<String, Object> model = new LinkedHashMap<>();
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ model.put( MODEL_ERRORS, jr.getData().toString() );
+ return new ModelAndView( PageMapping.M3_SEARCH.toString(), model );
+ }
+ try {
+ appService.getAppTypeOption( model, false, session );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return new ModelAndView( PageMapping.M3_SEARCH.toString(), model );
+ }
+
+ /**
+ * App Manager Search
+ *
+ * @param draw
+ * @param length
+ * @param start
+ * @param sort
+ * @param appDeveloper
+ * @param appTypeId
+ * @param appName
+ * @param order
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "search")
+ @ResponseBody
+ public String search(
+ @RequestParam(value = "draw") String draw,
+ @RequestParam(value = "length") int length,
+ @RequestParam(value = "start") int start,
+ @RequestParam(value = "orderColumn") String sort,
+ @RequestParam(value = "typeId") String appTypeId,
+ @RequestParam(value = "orderDir") String order,
+ @RequestParam(value = "deviceTypeId") String appDeviceTypeId,
+ @RequestParam(value = "token", required = false) String token,
+ @RequestParam(value = "keyWord") String keyWord, HttpSession session) throws Exception {
+ logger.debug("search list start--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() + keyWord);
+
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if (jr.getStatus() != Constants.STATUS_SUCCESS) {
+ return writeDataTableMap(jr, draw);
+ }
+
+ // Assign value To AppForm
+ AppForm form = new AppForm();
+ form.setDraw(draw);
+ form.setAppDeviceTypeId(appDeviceTypeId);
+ form.setTypeId(appTypeId);
+ form.setOffset(start);
+ form.setLimit(length);
+ form.setSort(ApiParam.API_PARAM_DEFAULT_SORT_NAME);
+ form.setOrder(ApiParam.API_PARAM_VALUE_ORDER_DESC);
+ form.setIsDel(ApiParam.API_PARAM_DEFAULT_DEL);
+ form.setKeyWord(keyWord);
+ User user = userService.selectCurrentUser(session);
+ if (user == null) {
+ form.setAppIsPublic(ApiParam.API_PARAM_DEFAULT_IS_PUBLIC);
+ }
+ // Page Search
+ String ret = appService.selectPaginationData(form, session);
+
+ logger.debug("search list stop");
+ return ret;
+ }
+
+ @RequestMapping(value = "CheckUpdateInfoDev")
+ @ResponseBody
+ public String checkUpdateInfo(@RequestBody String localStr, HttpSession session) throws Exception{
+ logger.debug( "CheckDataDev--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() );
+ // Unauthorized Exception
+ JsonResult jr = appService.validateAuthentication1(session);
+ if ( jr.getStatus() != Constants.STATUS_SUCCESS ) {
+ return writeDataTableMap( jr, localStr );
+ }
+ String id = "";
+ String localversion = "";
+ String dbVersion = "";
+ List<AppForm> appList = new ArrayList<>();
+
+ try {
+ List<Object> localAppList = JSONObject.parseArray(localStr);//installed local app list
+
+ for(Object item : localAppList){
+ String localid = ((JSONObject) item).getString(Constants.CONFIG_APP_PARAM_ID);
+ id = localid.substring(0,localid.lastIndexOf(Constants.APP_ID_SEPARATOR));
+ localversion = ((JSONObject) item).getString(Constants.CONFIG_APP_PARAM_VERSION);
+ //check weather the app in locallist is from server or not
+ AppForm form = appService.searchFormByCustomId( id, session );
+ //set local information for local app
+ if(form == null){
+ form = new AppForm();
+ form.setAppName(((JSONObject) item).getString(Constants.CONFIG_APP_PARAM_NAME));
+ //form.setImagePath(((JSONObject) item).getString(Constants.CONFIG_APP_PARAM_ICON));
+ form.setImagePath(null);
+ form.setAppAbstract(((JSONObject) item).getString(Constants.CONFIG_APP_PARAM_DESCRIPTION));
+ form.setVersionName(localversion);
+ form.setCreateDate(null);
+ form.setAppDeviceTypeName(null);
+ form.setAppDeviceTypeId(null);
+ form.setUpdateFlag(false);
+ }
+ //check the systemAPP use localid
+ if(localid.equals(Constants.APP_ID_LAUNCHER) || localid.equals(Constants.APP_ID_HOMESCREEN) || localid.equals(Constants.APP_ID_WAREHOUSE)){
+ form.setSystemApp(true);
+ }else{
+ //check app's versionName for update
+ dbVersion = form.getVersionName();
+ if( !dbVersion.equals(localversion)){
+ form.setUpdateFlag(true);
+ }
+ else{
+ form.setUpdateFlag(false);
+ }
+ }
+ appList.add(form);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return JsonMapperUtils.writeValueAsString( appList );
+ }
+
+ @RequestMapping(value = "downloadenter")
+ @ResponseBody
+ public void downloadtest() {
+ logger.debug( "downloadenter done" );
+ }
+ /**
+ * App Manager Download File
+ *
+ * @param appId
+ * @param typeId
+ * @param filePath
+ * @param response
+ * @throws HttpException
+ * @throws FileNotFoundException
+ */
+ @RequestMapping(value = "download")
+ @ResponseBody
+ public void download(@RequestParam(value = "appId", required = false) String appId,
+ @RequestParam(value = "typeId", required = false) String typeId,
+ @RequestParam(value = "filePath", required = false) String filePath,
+ HttpServletResponse response, HttpSession session)
+ throws HttpException, FileNotFoundException {
+ logger.debug( "download--Class: " + this.getClass().getName() + "--method: "
+ + Thread.currentThread().getStackTrace()[1].getMethodName() + filePath );
+ // Assign value To AppFor