郑永安
2023-06-19 59e91a4e9ddaf23cebb12993c774aa899ab22d16
src/main/java/com/gk/firework/Mapper/mybatis/EnterprisePersonMapper.xml
对比新文件
@@ -0,0 +1,279 @@
<?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.EnterprisePersonMapper" >
  <resultMap id="BaseResultMap" type="com.gk.firework.Domain.EnterprisePerson" >
    <!--          -->
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="post" property="post" jdbcType="VARCHAR" />
    <result column="number" property="number" jdbcType="VARCHAR" />
    <result column="validstarttime" property="validstarttime" jdbcType="TIMESTAMP" />
    <result column="validendtime" property="validendtime" jdbcType="TIMESTAMP" />
    <result column="memo" property="memo" 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="enterpriseid" property="enterpriseid" jdbcType="BIGINT" />
    <result column="validflag" property="validflag" jdbcType="BIT" />
    <result column="type" property="type" jdbcType="VARCHAR" />
    <collection property="enterpriseResources"
                javaType="java.util.List"
                ofType="com.gk.firework.Domain.EnterpriseResource"
                column="{epid=id,tabletype=tabletype}"
                select="selectInner">
    </collection>
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.gk.firework.Domain.EnterprisePerson" extends="BaseResultMap" >
    <result column="isreview" property="isreview" jdbcType="BIT" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
    id, name, post, number, validstarttime, validendtime, memo, createtime, createby,
    createbyname, updatetime, updateby, updatebyname, enterpriseid, validflag, type
  </sql>
  <select id="selectInner" parameterType = "java.util.Map" resultType="com.gk.firework.Domain.EnterpriseResource">
      select  er.id id, er.url,er.filename,er.tabletype
      from enterpriseresource er
      where  er.validflag = 1
      and er.tabletype= #{tabletype}
      and belongid = #{epid}
    </select>
  <sql id="Blob_Column_List" >
    <!--          -->
    other
  </sql>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
    <!--          -->
    select
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from enterpriseperson
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectPages" resultMap="BaseResultMap">
        select ep.*,
        #{params.tabletype} tabletype
          from enterpriseperson ep
          where ep.validflag = 1
          and ep.enterpriseid = #{params.id}
          and ep.type = #{params.category}
          order by ep.createtime desc
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    <!--          -->
    delete from enterpriseperson
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insertSelective" parameterType="com.gk.firework.Domain.EnterprisePerson" >
    <!--          -->
    insert into enterpriseperson
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="name != null" >
        name,
      </if>
      <if test="post != null" >
        post,
      </if>
      <if test="number != null" >
        number,
      </if>
      <if test="validstarttime != null" >
        validstarttime,
      </if>
      <if test="validendtime != null" >
        validendtime,
      </if>
      <if test="memo != null" >
        memo,
      </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="enterpriseid != null" >
        enterpriseid,
      </if>
      <if test="validflag != null" >
        validflag,
      </if>
      <if test="type != null" >
        type,
      </if>
      <if test="other != null" >
        other,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="name != null" >
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="post != null" >
        #{post,jdbcType=VARCHAR},
      </if>
      <if test="number != null" >
        #{number,jdbcType=VARCHAR},
      </if>
      <if test="validstarttime != null" >
        #{validstarttime,jdbcType=TIMESTAMP},
      </if>
      <if test="validendtime != null" >
        #{validendtime,jdbcType=TIMESTAMP},
      </if>
      <if test="memo != null" >
        #{memo,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="enterpriseid != null" >
        #{enterpriseid,jdbcType=BIGINT},
      </if>
      <if test="validflag != null" >
        #{validflag,jdbcType=BIT},
      </if>
      <if test="type != null" >
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="other != null" >
        #{other,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.EnterprisePerson" >
    <!--          -->
    update enterpriseperson
    <set >
      <if test="name != null" >
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="post != null" >
        post = #{post,jdbcType=VARCHAR},
      </if>
      <if test="number != null" >
        number = #{number,jdbcType=VARCHAR},
      </if>
      <if test="validstarttime != null" >
        validstarttime = #{validstarttime,jdbcType=TIMESTAMP},
      </if>
      <if test="validendtime != null" >
        validendtime = #{validendtime,jdbcType=TIMESTAMP},
      </if>
      <if test="memo != null" >
        memo = #{memo,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="enterpriseid != null" >
        enterpriseid = #{enterpriseid,jdbcType=BIGINT},
      </if>
      <if test="validflag != null" >
        validflag = #{validflag,jdbcType=BIT},
      </if>
      <if test="type != null" >
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="other != null" >
        other = #{other,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.gk.firework.Domain.EnterprisePerson" >
    <!--          -->
    update enterpriseperson
    set name = #{name,jdbcType=VARCHAR},
      post = #{post,jdbcType=VARCHAR},
      number = #{number,jdbcType=VARCHAR},
      validstarttime = #{validstarttime,jdbcType=TIMESTAMP},
      validendtime = #{validendtime,jdbcType=TIMESTAMP},
      memo = #{memo,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},
      enterpriseid = #{enterpriseid,jdbcType=BIGINT},
      validflag = #{validflag,jdbcType=BIT},
      type = #{type,jdbcType=VARCHAR},
      other = #{other,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.EnterprisePerson" >
    <!--          -->
    update enterpriseperson
    set name = #{name,jdbcType=VARCHAR},
      post = #{post,jdbcType=VARCHAR},
      number = #{number,jdbcType=VARCHAR},
      validstarttime = #{validstarttime,jdbcType=TIMESTAMP},
      validendtime = #{validendtime,jdbcType=TIMESTAMP},
      memo = #{memo,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},
      enterpriseid = #{enterpriseid,jdbcType=BIGINT},
      validflag = #{validflag,jdbcType=BIT},
      type = #{type,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>