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