|
@@ -0,0 +1,185 @@
|
|
|
|
+<?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="com.huaxu.dao.VerManageMapper">
|
|
|
|
+ <resultMap type="VerManageEntity" id="VerManageResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="verId" column="ver_id" />
|
|
|
|
+ <result property="verUrl" column="ver_url" />
|
|
|
|
+ <result property="isForcedUpgrade" column="is_forced_upgrade" />
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="dateCreate" column="date_create" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="dateUpdate" column="date_update" />
|
|
|
|
+ <result property="mobileOS" column="mobile_os" />
|
|
|
|
+ <result property="curAppVer" column="cur_app_ver" />
|
|
|
|
+ <result property="productType" column="product_type" />
|
|
|
|
+ <result property="forcedUpgradeVer" column="forced_upgrade_ver" />
|
|
|
|
+ <result property="isNewestVer" column="is_newest_ver" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <!-- 实体 -->
|
|
|
|
+ <sql id="verManageColumns">
|
|
|
|
+ a.id as "id" ,
|
|
|
|
+ a.ver_id as "verId" ,
|
|
|
|
+ a.ver_url as "verUrl" ,
|
|
|
|
+ a.is_forced_upgrade as "isForcedUpgrade" ,
|
|
|
|
+ a.remark as "remark" ,
|
|
|
|
+ a.date_create as "dateCreate" ,
|
|
|
|
+ a.date_update as "dateUpdate" ,
|
|
|
|
+ a.create_by as "createBy" ,
|
|
|
|
+ a.update_by as "updateBy" ,
|
|
|
|
+ a.mobile_os as "mobileOS" ,
|
|
|
|
+ a.cur_app_ver as "curAppVer" ,
|
|
|
|
+ a.product_type as "productType" ,
|
|
|
|
+ a.forced_upgrade_ver as "forcedUpgradeVer" ,
|
|
|
|
+ a.is_newest_ver as "isNewestVer"
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <!-- 根据主键获取实体 -->
|
|
|
|
+ <select id="findVerManage" resultType="com.huaxu.entity.VerManageEntity">
|
|
|
|
+ SELECT
|
|
|
|
+ <include refid="verManageColumns"/>
|
|
|
|
+ FROM uims_ver_manage a
|
|
|
|
+ WHERE a.status=1
|
|
|
|
+ <if test="verId != null">
|
|
|
|
+ and a.ver_id like concat(concat('%',#{verId}) ,'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="productType != null">
|
|
|
|
+ and a.product_type = #{productType}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertSelective" parameterType="com.huaxu.entity.VerManageEntity" >
|
|
|
|
+ insert into uims_ver_manage
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
+ <if test="verId != null" >
|
|
|
|
+ ver_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="verUrl != null" >
|
|
|
|
+ ver_url,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isForcedUpgrade != null" >
|
|
|
|
+ is_forced_upgrade,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null" >
|
|
|
|
+ remark,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateUpdate != null" >
|
|
|
|
+ date_update,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null" >
|
|
|
|
+ create_by,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null" >
|
|
|
|
+ update_by,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobileOS != null" >
|
|
|
|
+ mobile_os,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="curAppVer != null" >
|
|
|
|
+ cur_app_ver,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="productType != null" >
|
|
|
|
+ product_type,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="forcedUpgradeVer != null" >
|
|
|
|
+ forced_upgrade_ver,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isNewestVer != null" >
|
|
|
|
+ is_newest_ver,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null" >
|
|
|
|
+ status,
|
|
|
|
+ </if>
|
|
|
|
+ date_create,
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
+ <if test="verId != null" >
|
|
|
|
+ #{verId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="verUrl != null" >
|
|
|
|
+ #{verUrl,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isForcedUpgrade != null" >
|
|
|
|
+ #{isForcedUpgrade,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null" >
|
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateUpdate != null" >
|
|
|
|
+ #{dateUpdate,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null" >
|
|
|
|
+ #{createBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null" >
|
|
|
|
+ #{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobileOS != null" >
|
|
|
|
+ #{mobileOS,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="curAppVer != null" >
|
|
|
|
+ #{curAppVer,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="productType != null" >
|
|
|
|
+ #{productType,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="forcedUpgradeVer != null" >
|
|
|
|
+ #{forcedUpgradeVer,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isNewestVer != null" >
|
|
|
|
+ #{isNewestVer,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null" >
|
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ SYSDATE(),
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.entity.VerManageEntity" >
|
|
|
|
+ update uims_ver_manage
|
|
|
|
+ <set >
|
|
|
|
+ <if test="verId != null" >
|
|
|
|
+ ver_id = #{verId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="verUrl != null" >
|
|
|
|
+ ver_url = #{verUrl,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isForcedUpgrade != null" >
|
|
|
|
+ is_forced_upgrade = #{isForcedUpgrade,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null" >
|
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateUpdate != null" >
|
|
|
|
+ date_update = #{dateUpdate,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null" >
|
|
|
|
+ create_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobileOS != null" >
|
|
|
|
+ mobile_os = #{mobileOS,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="curAppVer != null" >
|
|
|
|
+ cur_app_ver = #{curAppVer,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="productType != null" >
|
|
|
|
+ product_type = #{productType,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="forcedUpgradeVer != null" >
|
|
|
|
+ forced_upgrade_ver = #{forcedUpgradeVer,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isNewestVer != null" >
|
|
|
|
+ is_newest_ver = #{isNewestVer,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null" >
|
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
+ </update>
|
|
|
|
+</mapper>
|