summaryrefslogtreecommitdiffstats
path: root/appmarket-persistence/src/main/java/app/market/persistence/xml
diff options
context:
space:
mode:
Diffstat (limited to 'appmarket-persistence/src/main/java/app/market/persistence/xml')
-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
8 files changed, 1882 insertions, 0 deletions
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