From 3b55d06b89bf64873e685c3d78fce5affbba3d17 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Tue, 16 Apr 2019 11:20:38 +0900 Subject: Add warehouse server source code. [Patch Set 2] Add ReadMe.md Change-Id: I6ade52d2490f5ca4ba107c1a27ed6d5b39048725 Signed-off-by: zheng_wenlong --- .../app/market/persistence/xml/app/AppMapper.xml | 368 +++++++++++++++++++++ .../persistence/xml/app/AppVersionMapper.xml | 298 +++++++++++++++++ .../persistence/xml/authority/AuthorityMapper.xml | 194 +++++++++++ .../xml/authority/AuthorityResourceLinkMapper.xml | 146 ++++++++ .../persistence/xml/resource/DictionaryMapper.xml | 202 +++++++++++ .../persistence/xml/resource/ResourceMapper.xml | 220 ++++++++++++ .../xml/user/UserAuthorityLinkMapper.xml | 146 ++++++++ .../app/market/persistence/xml/user/UserMapper.xml | 308 +++++++++++++++++ 8 files changed, 1882 insertions(+) create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/app/AppVersionMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/authority/AuthorityResourceLinkMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/resource/DictionaryMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/resource/ResourceMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserAuthorityLinkMapper.xml create mode 100644 appmarket-persistence/src/main/java/app/market/persistence/xml/user/UserMapper.xml (limited to 'appmarket-persistence/src/main/java/app/market/persistence/xml') 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + 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 + + + + + delete from t_app + where APP_ID = #{appId,jdbcType=CHAR} + + + delete from t_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 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, + + + + + #{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}, + + + + + + update t_app + + + 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_IS_DEL = #{record.isDel,jdbcType=CHAR}, + + + APP_VERSION_ID = #{record.appVersionId,jdbcType=VARCHAR}, + + + APP_IS_PUBLIC = #{record.appIsPublic,jdbcType=CHAR}, + + + APP_ID_CUSTOM = #{record.appIdCustom,jdbcType=VARCHAR}, + + + + + + + + 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} + + + + + + update t_app + + + 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 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 t_app + set APP_IS_DEL = "1", APP_ID_CUSTOM = concat(APP_ID_CUSTOM,"-",APP_ID) + where APP_ID = #{appId,jdbcType=CHAR} + + + + \ 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + VERSION_ID, V_APP_ID, VERSION_NAME, SIZE, COMMENT, FILE_PATH, MD5, VERSION_CREATE_DATE, + VERSION_IS_DEL, IMAGE_PATH + + + + + delete from t_app_version + where VERSION_ID = #{versionId,jdbcType=CHAR} + + + delete from t_app_version + + + + + + 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 into t_app_version + + + VERSION_ID, + + + V_APP_ID, + + + VERSION_NAME, + + + SIZE, + + + COMMENT, + + + FILE_PATH, + + + MD5, + + + VERSION_CREATE_DATE, + + + VERSION_IS_DEL, + + + IMAGE_PATH, + + + + + #{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}, + + + + + + update t_app_version + + + 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}, + + + + + + + + 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} + + + + + + update t_app_version + + + 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 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 t_app_version + set VERSION_IS_DEL = "1" + where V_APP_ID = #{appId,jdbcType=CHAR} + + + \ 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 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + AU_ID, AU_NAME, AU_IS_DEL + + + + + delete from t_authority + where AU_ID = #{auId,jdbcType=CHAR} + + + delete from t_authority + + + + + + insert into t_authority (AU_ID, AU_NAME, AU_IS_DEL + ) + values (#{auId,jdbcType=CHAR}, #{auName,jdbcType=VARCHAR}, #{isDel,jdbcType=CHAR} + ) + + + insert into t_authority + + + AU_ID, + + + AU_NAME, + + + AU_IS_DEL, + + + + + #{auId,jdbcType=CHAR}, + + + #{auName,jdbcType=VARCHAR}, + + + #{isDel,jdbcType=CHAR}, + + + + + + update t_authority + + + AU_ID = #{record.auId,jdbcType=CHAR}, + + + AU_NAME = #{record.auName,jdbcType=VARCHAR}, + + + AU_IS_DEL = #{record.isDel,jdbcType=CHAR}, + + + + + + + + update t_authority + set AU_ID = #{record.auId,jdbcType=CHAR}, + AU_NAME = #{record.auName,jdbcType=VARCHAR}, + AU_IS_DEL = #{record.isDel,jdbcType=CHAR} + + + + + + update t_authority + + + AU_NAME = #{auName,jdbcType=VARCHAR}, + + + AU_IS_DEL = #{isDel,jdbcType=CHAR}, + + + where AU_ID = #{auId,jdbcType=CHAR} + + + update t_authority + set AU_NAME = #{auName,jdbcType=VARCHAR}, + AU_IS_DEL = #{isDel,jdbcType=CHAR} + where AU_ID = #{auId,jdbcType=CHAR} + + + \ 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 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + R_RES_ID, R_AU_ID + + + + delete from t_authority_resource_link + where R_RES_ID = #{resId,jdbcType=CHAR} + and R_AU_ID = #{auId,jdbcType=CHAR} + + + delete from t_authority_resource_link + + + + + + insert into t_authority_resource_link (R_RES_ID, R_AU_ID) + values (#{resId,jdbcType=CHAR}, #{auId,jdbcType=CHAR}) + + + insert into t_authority_resource_link + + + R_RES_ID, + + + R_AU_ID, + + + + + #{resId,jdbcType=CHAR}, + + + #{auId,jdbcType=CHAR}, + + + + + + update t_authority_resource_link + + + R_RES_ID = #{record.resId,jdbcType=CHAR}, + + + R_AU_ID = #{record.auId,jdbcType=CHAR}, + + + + + + + + update t_authority_resource_link + set R_RES_ID = #{record.resId,jdbcType=CHAR}, + R_AU_ID = #{record.auId,jdbcType=CHAR} + + + + + \ 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 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + DIC_ID, DIC_TYPE, DIC_VALUE, DIC_LABEL + + + + + delete from t_dictionary + where DIC_ID = #{dicId,jdbcType=INTEGER} + + + delete from t_dictionary + + + + + + 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 into t_dictionary + + + DIC_ID, + + + DIC_TYPE, + + + DIC_VALUE, + + + DIC_LABEL, + + + + + #{dicId,jdbcType=INTEGER}, + + + #{dicType,jdbcType=VARCHAR}, + + + #{dicValue,jdbcType=VARCHAR}, + + + #{dicLabel,jdbcType=VARCHAR}, + + + + + + update t_dictionary + + + DIC_ID = #{record.dicId,jdbcType=INTEGER}, + + + DIC_TYPE = #{record.dicType,jdbcType=VARCHAR}, + + + DIC_VALUE = #{record.dicValue,jdbcType=VARCHAR}, + + + DIC_LABEL = #{record.dicLabel,jdbcType=VARCHAR}, + + + + + + + + update t_dictionary + set DIC_LABEL = #{record.dicLabel,jdbcType=VARCHAR} + + + + + + update t_dictionary + + + DIC_TYPE = #{dicType,jdbcType=VARCHAR}, + + + DIC_VALUE = #{dicValue,jdbcType=VARCHAR}, + + + DIC_LABEL = #{dicLabel,jdbcType=VARCHAR}, + + + where DIC_ID = #{dicId,jdbcType=INTEGER} + + + 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} + + + \ 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 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + RES_ID, RES_NAME, RES_TYPE, ACCESS_PATH, HTTP_METHOD + + + + + delete from t_resource + where RES_ID = #{resId,jdbcType=CHAR} + + + delete from t_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 into t_resource + + + RES_ID, + + + RES_NAME, + + + RES_TYPE, + + + ACCESS_PATH, + + + HTTP_METHOD, + + + + + #{resId,jdbcType=CHAR}, + + + #{resName,jdbcType=VARCHAR}, + + + #{resType,jdbcType=VARCHAR}, + + + #{accessPath,jdbcType=VARCHAR}, + + + #{httpMethod,jdbcType=VARCHAR}, + + + + + + update t_resource + + + 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}, + + + + + + + + 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} + + + + + + update t_resource + + + 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 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} + + + \ 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 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + A_USER_ID, A_AU_ID + + + + delete from t_user_authority_link + where A_USER_ID = #{userId,jdbcType=CHAR} + and A_AU_ID = #{auId,jdbcType=CHAR} + + + delete from t_user_authority_link + + + + + + insert into t_user_authority_link (A_USER_ID, A_AU_ID) + values (#{userId,jdbcType=CHAR}, #{auId,jdbcType=CHAR}) + + + insert into t_user_authority_link + + + A_USER_ID, + + + A_AU_ID, + + + + + #{userId,jdbcType=CHAR}, + + + #{auId,jdbcType=CHAR}, + + + + + + update t_user_authority_link + + + A_USER_ID = #{record.userId,jdbcType=CHAR}, + + + A_AU_ID = #{record.auId,jdbcType=CHAR}, + + + + + + + + update t_user_authority_link + set A_USER_ID = #{record.userId,jdbcType=CHAR}, + A_AU_ID = #{record.auId,jdbcType=CHAR} + + + + + \ 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 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + USER_ID, USER_PW, USER_NAME, MAIL_ADDRESS, CREATE_DATE, UPDATE_DATE, IS_DEL, ual.A_AU_ID, au.AU_NAME + + + USER_ID, USER_NAME, MAIL_ADDRESS, CREATE_DATE, UPDATE_DATE, IS_DEL, ual.A_AU_ID, au.AU_NAME + + + + + + delete from t_user + where USER_ID = #{userId,jdbcType=CHAR} + + + delete from t_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 into t_user + + + USER_ID, + + + USER_PW, + + + USER_NAME, + + + MAIL_ADDRESS, + + + CREATE_DATE, + + + UPDATE_DATE, + + + IS_DEL, + + + + + #{userId,jdbcType=CHAR}, + + + #{userPw,jdbcType=VARCHAR}, + + + #{userName,jdbcType=VARCHAR}, + + + #{mailAddress,jdbcType=VARCHAR}, + + + #{createDate,jdbcType=TIMESTAMP}, + + + #{updateDate,jdbcType=TIMESTAMP}, + + + #{isDel,jdbcType=CHAR}, + + + + + + update t_user + + + 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}, + + + + + + + + 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} + + + + + + update t_user + + + 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 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 t_user + set USER_PW = #{userPw,jdbcType=VARCHAR} + where USER_NAME = #{userName,jdbcType=VARCHAR} + and USER_PW = #{userPwBak,jdbcType=VARCHAR} + + + 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}, + + t_user.USER_PW = #{userPw,jdbcType=VARCHAR} + + + + delete from t_user + where USER_NAME = #{userName,jdbcType=VARCHAR} + + + + + + \ No newline at end of file -- cgit 1.2.3-korg