BizInvoiceMapper.xml 6.65 KB
<?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="cn.runsa.portal.base.dao.BizInvoiceMapper" >
  <resultMap id="BaseResultMap" type="cn.runsa.portal.base.entity.BizInvoice" >
    <id column="beiId" property="id" jdbcType="INTEGER" />
    <result column="bebId" property="bebid" jdbcType="INTEGER" />
    <result column="beiName" property="name" jdbcType="VARCHAR" />
    <result column="beiCode" property="code" jdbcType="VARCHAR" />
    <result column="beiTaxnum" property="taxnum" jdbcType="VARCHAR" />
    <result column="beiTaxrate" property="taxrate" jdbcType="DECIMAL" />
    <result column="ptPhone" property="phone" jdbcType="VARCHAR" />
    <result column="ptAddr" property="addr" jdbcType="VARCHAR" />
    <result column="cuId" property="cuid" jdbcType="INTEGER" />
    <result column="ptRemark1" property="remark1" jdbcType="VARCHAR" />
    <result column="ptRemark2" property="remark2" jdbcType="VARCHAR" />
    <result column="ptUpTime" property="uptime" jdbcType="TIMESTAMP" />
    <result column="ptUpdater" property="updater" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    beiId, bebId, beiName, beiCode, beiTaxnum, beiTaxrate, ptPhone, ptAddr, cuId, ptRemark1, 
    ptRemark2, ptUpTime, ptUpdater
  </sql>
  <select id="findById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from mtBizInvoice
    where beiId = #{id,jdbcType=INTEGER}
  </select>
  <select id="findList" resultMap="BaseResultMap" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
    select 
    <include refid="Base_Column_List" />
    from mtBizInvoice
    where bebId = #{bebid,jdbcType=INTEGER}
  </select>
  <delete id="delete" parameterType="java.lang.Integer" >
    delete from mtBizInvoice
    where beiId = #{id,jdbcType=INTEGER}
  </delete>
   <delete id="deleteByBebId" parameterType="java.lang.Integer" >
    delete from mtBizInvoice
    where bebId = #{bebid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
    insert into mtBizInvoice (bebId, beiName, beiCode, 
      beiTaxnum, beiTaxrate, ptPhone, 
      ptAddr, cuId, ptRemark1, 
      ptRemark2, ptUpTime, ptUpdater
      )
    values (#{bebid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
      #{taxnum,jdbcType=VARCHAR}, #{taxrate,jdbcType=DECIMAL}, #{phone,jdbcType=VARCHAR}, 
      #{addr,jdbcType=VARCHAR}, #{cuid,jdbcType=INTEGER}, #{remark1,jdbcType=VARCHAR}, 
      #{remark2,jdbcType=VARCHAR}, #{uptime,jdbcType=TIMESTAMP}, #{updater,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
    insert into mtBizInvoice
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="bebid != null" >
        bebId,
      </if>
      <if test="name != null" >
        beiName,
      </if>
      <if test="code != null" >
        beiCode,
      </if>
      <if test="taxnum != null" >
        beiTaxnum,
      </if>
      <if test="taxrate != null" >
        beiTaxrate,
      </if>
      <if test="phone != null" >
        ptPhone,
      </if>
      <if test="addr != null" >
        ptAddr,
      </if>
      <if test="cuid != null" >
        cuId,
      </if>
      <if test="remark1 != null" >
        ptRemark1,
      </if>
      <if test="remark2 != null" >
        ptRemark2,
      </if>
      <if test="uptime != null" >
        ptUpTime,
      </if>
      <if test="updater != null" >
        ptUpdater,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="bebid != null" >
        #{bebid,jdbcType=INTEGER},
      </if>
      <if test="name != null" >
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="taxnum != null" >
        #{taxnum,jdbcType=VARCHAR},
      </if>
      <if test="taxrate != null" >
        #{taxrate,jdbcType=DECIMAL},
      </if>
      <if test="phone != null" >
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="addr != null" >
        #{addr,jdbcType=VARCHAR},
      </if>
      <if test="cuid != null" >
        #{cuid,jdbcType=INTEGER},
      </if>
      <if test="remark1 != null" >
        #{remark1,jdbcType=VARCHAR},
      </if>
      <if test="remark2 != null" >
        #{remark2,jdbcType=VARCHAR},
      </if>
      <if test="uptime != null" >
        #{uptime,jdbcType=TIMESTAMP},
      </if>
      <if test="updater != null" >
        #{updater,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateSelective" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
    update mtBizInvoice
    <set >
      <if test="bebid != null" >
        bebId = #{bebid,jdbcType=INTEGER},
      </if>
      <if test="name != null" >
        beiName = #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        beiCode = #{code,jdbcType=VARCHAR},
      </if>
      <if test="taxnum != null" >
        beiTaxnum = #{taxnum,jdbcType=VARCHAR},
      </if>
      <if test="taxrate != null" >
        beiTaxrate = #{taxrate,jdbcType=DECIMAL},
      </if>
      <if test="phone != null" >
        ptPhone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="addr != null" >
        ptAddr = #{addr,jdbcType=VARCHAR},
      </if>
      <if test="cuid != null" >
        cuId = #{cuid,jdbcType=INTEGER},
      </if>
      <if test="remark1 != null" >
        ptRemark1 = #{remark1,jdbcType=VARCHAR},
      </if>
      <if test="remark2 != null" >
        ptRemark2 = #{remark2,jdbcType=VARCHAR},
      </if>
      <if test="uptime != null" >
        ptUpTime = #{uptime,jdbcType=TIMESTAMP},
      </if>
      <if test="updater != null" >
        ptUpdater = #{updater,jdbcType=INTEGER},
      </if>
    </set>
    where beiId = #{id,jdbcType=INTEGER}
  </update>
  <update id="update" parameterType="cn.runsa.portal.base.entity.BizInvoice" >
    update mtBizInvoice
    set bebId = #{bebid,jdbcType=INTEGER},
      beiName = #{name,jdbcType=VARCHAR},
      beiCode = #{code,jdbcType=VARCHAR},
      beiTaxnum = #{taxnum,jdbcType=VARCHAR},
      beiTaxrate = #{taxrate,jdbcType=DECIMAL},
      ptPhone = #{phone,jdbcType=VARCHAR},
      ptAddr = #{addr,jdbcType=VARCHAR},
      cuId = #{cuid,jdbcType=INTEGER},
      ptRemark1 = #{remark1,jdbcType=VARCHAR},
      ptRemark2 = #{remark2,jdbcType=VARCHAR},
      ptUpTime = #{uptime,jdbcType=TIMESTAMP},
      ptUpdater = #{updater,jdbcType=INTEGER}
    where beiId = #{id,jdbcType=INTEGER}
  </update>
</mapper>