对比新文件 |
| | |
| | | <?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.gk.firework.Mapper.AppFileInfoMapper" > |
| | | <resultMap id="BaseResultMap" type="com.gk.firework.Domain.AppFileInfo" > |
| | | <!-- --> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="filetype" property="filetype" jdbcType="VARCHAR" /> |
| | | <result column="filename" property="filename" jdbcType="VARCHAR" /> |
| | | <result column="fileurl" property="fileurl" jdbcType="VARCHAR" /> |
| | | <result column="version" property="version" jdbcType="INTEGER" /> |
| | | <result column="remark" property="remark" jdbcType="VARCHAR" /> |
| | | <result column="created" property="created" jdbcType="TIMESTAMP" /> |
| | | <result column="updated" property="updated" jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- --> |
| | | id, filetype, filename, fileurl, version, remark, created, updated |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > |
| | | <!-- --> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from appfile |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectDataGrid" resultType="com.gk.firework.Domain.AppFileInfo"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from appfile |
| | | <where> |
| | | 1=1 |
| | | <if test="condition.filetype != null and condition.filetype !=''"> |
| | | and filetype = #{condition.filetype} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="selectNew" resultType="com.gk.firework.Domain.AppFileInfo"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from appfile |
| | | <where> |
| | | 1=1 |
| | | <if test="filetype != null and filetype !=''"> |
| | | and filetype = #{filetype} |
| | | </if> |
| | | </where> |
| | | order by version desc |
| | | limit 1 |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > |
| | | <!-- --> |
| | | delete from appfile |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.AppFileInfo" > |
| | | <!-- --> |
| | | update appfile |
| | | <set > |
| | | <if test="filetype != null" > |
| | | filetype = #{filetype,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="filename != null" > |
| | | filename = #{filename,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="fileurl != null" > |
| | | fileurl = #{fileurl,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="version != null" > |
| | | version = #{version,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="remark != null" > |
| | | remark = #{remark,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="created != null" > |
| | | created = #{created,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updated != null" > |
| | | updated = #{updated,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.AppFileInfo" > |
| | | <!-- --> |
| | | update appfile |
| | | set filetype = #{filetype,jdbcType=VARCHAR}, |
| | | filename = #{filename,jdbcType=VARCHAR}, |
| | | fileurl = #{fileurl,jdbcType=VARCHAR}, |
| | | version = #{version,jdbcType=INTEGER}, |
| | | remark = #{remark,jdbcType=VARCHAR}, |
| | | created = #{created,jdbcType=TIMESTAMP}, |
| | | updated = #{updated,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |