郑永安
2023-06-19 f65443d8abeaedc9d102324565e8368e7c9d90c8
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseResourceMapper.xml
对比新文件
@@ -0,0 +1,187 @@
<?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.EnterpriseResourceMapper" >
  <resultMap id="BaseResultMap" type="com.gk.firework.Domain.EnterpriseResource" >
    <!--          -->
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="tabletype" property="tabletype" jdbcType="VARCHAR" />
    <result column="url" property="url" jdbcType="VARCHAR" />
    <result column="filename" property="filename" jdbcType="VARCHAR" />
    <result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
    <result column="createby" property="createby" jdbcType="BIGINT" />
    <result column="createbyname" property="createbyname" jdbcType="VARCHAR" />
    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
    <result column="updateby" property="updateby" jdbcType="BIGINT" />
    <result column="updatebyname" property="updatebyname" jdbcType="VARCHAR" />
    <result column="belongid" property="belongid" jdbcType="BIGINT" />
    <result column="validflag" property="validflag" jdbcType="BIT" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
    id, tabletype, url, filename, createtime, createby, createbyname, updatetime, updateby,
    updatebyname, belongid, validflag
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    <!--          -->
    select
    <include refid="Base_Column_List" />
    from enterpriseresource
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    <!--          -->
    delete from enterpriseresource
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insertSelective" parameterType="com.gk.firework.Domain.EnterpriseResource" >
    <!--          -->
    insert into enterpriseresource
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="tabletype != null" >
        tabletype,
      </if>
      <if test="url != null" >
        url,
      </if>
      <if test="filename != null" >
        filename,
      </if>
      <if test="createtime != null" >
        createtime,
      </if>
      <if test="createby != null" >
        createby,
      </if>
      <if test="createbyname != null" >
        createbyname,
      </if>
      <if test="updatetime != null" >
        updatetime,
      </if>
      <if test="updateby != null" >
        updateby,
      </if>
      <if test="updatebyname != null" >
        updatebyname,
      </if>
      <if test="belongid != null" >
        belongid,
      </if>
      <if test="validflag != null" >
        validflag,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="tabletype != null" >
        #{tabletype,jdbcType=VARCHAR},
      </if>
      <if test="url != null" >
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="filename != null" >
        #{filename,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null" >
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="createby != null" >
        #{createby,jdbcType=BIGINT},
      </if>
      <if test="createbyname != null" >
        #{createbyname,jdbcType=VARCHAR},
      </if>
      <if test="updatetime != null" >
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateby != null" >
        #{updateby,jdbcType=BIGINT},
      </if>
      <if test="updatebyname != null" >
        #{updatebyname,jdbcType=VARCHAR},
      </if>
      <if test="belongid != null" >
        #{belongid,jdbcType=BIGINT},
      </if>
      <if test="validflag != null" >
        #{validflag,jdbcType=BIT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.EnterpriseResource" >
    <!--          -->
    update enterpriseresource
    <set >
      <if test="tabletype != null" >
        tabletype = #{tabletype,jdbcType=VARCHAR},
      </if>
      <if test="url != null" >
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="filename != null" >
        filename = #{filename,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null" >
        createtime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="createby != null" >
        createby = #{createby,jdbcType=BIGINT},
      </if>
      <if test="createbyname != null" >
        createbyname = #{createbyname,jdbcType=VARCHAR},
      </if>
      <if test="updatetime != null" >
        updatetime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateby != null" >
        updateby = #{updateby,jdbcType=BIGINT},
      </if>
      <if test="updatebyname != null" >
        updatebyname = #{updatebyname,jdbcType=VARCHAR},
      </if>
      <if test="belongid != null" >
        belongid = #{belongid,jdbcType=BIGINT},
      </if>
      <if test="validflag != null" >
        validflag = #{validflag,jdbcType=BIT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.EnterpriseResource" >
    <!--          -->
    update enterpriseresource
    set tabletype = #{tabletype,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      filename = #{filename,jdbcType=VARCHAR},
      createtime = #{createtime,jdbcType=TIMESTAMP},
      createby = #{createby,jdbcType=BIGINT},
      createbyname = #{createbyname,jdbcType=VARCHAR},
      updatetime = #{updatetime,jdbcType=TIMESTAMP},
      updateby = #{updateby,jdbcType=BIGINT},
      updatebyname = #{updatebyname,jdbcType=VARCHAR},
      belongid = #{belongid,jdbcType=BIGINT},
      validflag = #{validflag,jdbcType=BIT}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="getUrlByBelongIdAndType" resultType="string">
    select
    url
    from enterpriseresource
    <where>
      belongid = #{id}
      and tabletype = #{type}
    </where>
  </select>
</mapper>