BizAccountMapper.xml 6.23 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.BizAccountMapper" >
  <resultMap id="BaseResultMap" type="cn.runsa.portal.base.entity.BizAccount" >
    <id column="beaId" property="id" jdbcType="INTEGER" />
    <result column="bebId" property="bebid" jdbcType="INTEGER" />
    <result column="beaName" property="name" jdbcType="VARCHAR" />
    <result column="beaCode" property="code" jdbcType="VARCHAR" />
    <result column="beaAccount" property="account" jdbcType="VARCHAR" />
    <result column="beaRate" property="rate" jdbcType="DECIMAL" />
    <result column="cuId" property="cuid" jdbcType="INTEGER" />
    <result column="beaType" property="type" jdbcType="SMALLINT" />
    <result column="beaSource" property="source" jdbcType="VARCHAR" />
    <result column="ptRemark1" property="remark1" jdbcType="VARCHAR" />
    <result column="ptUpTime" property="uptime" jdbcType="TIMESTAMP" />
    <result column="ptUpdater" property="updater" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    beaId, bebId, beaName, beaCode, beaAccount, beaRate, cuId, beaType, beaSource, ptRemark1, 
    ptUpTime, ptUpdater
  </sql>
  <select id="findById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from mtBizAccount
    where beaId = #{id,jdbcType=INTEGER}
  </select>
  <select id="findList" resultMap="BaseResultMap" parameterType="cn.runsa.portal.base.entity.BizAccount" >
    select 
    <include refid="Base_Column_List" />
    from mtBizAccount
    where bebId = #{bebid,jdbcType=INTEGER}
  </select>
  <delete id="delete" parameterType="java.lang.Integer" >
    delete from mtBizAccount
    where beaId = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByBebId" parameterType="java.lang.Integer" >
    delete from mtBizAccount
    where bebId = #{bebid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizAccount" >
    insert into mtBizAccount (bebId, beaName, beaCode, 
      beaAccount, beaRate, cuId, 
      beaType, beaSource, ptRemark1, 
      ptUpTime, ptUpdater)
    values (#{bebid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
      #{account,jdbcType=VARCHAR}, #{rate,jdbcType=DECIMAL}, #{cuid,jdbcType=INTEGER}, 
      #{type,jdbcType=SMALLINT}, #{source,jdbcType=VARCHAR}, #{remark1,jdbcType=VARCHAR}, 
      #{uptime,jdbcType=TIMESTAMP}, #{updater,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="cn.runsa.portal.base.entity.BizAccount" >
    insert into mtBizAccount
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="bebid != null" >
        bebId,
      </if>
      <if test="name != null" >
        beaName,
      </if>
      <if test="code != null" >
        beaCode,
      </if>
      <if test="account != null" >
        beaAccount,
      </if>
      <if test="rate != null" >
        beaRate,
      </if>
      <if test="cuid != null" >
        cuId,
      </if>
      <if test="type != null" >
        beaType,
      </if>
      <if test="source != null" >
        beaSource,
      </if>
      <if test="remark1 != null" >
        ptRemark1,
      </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="account != null" >
        #{account,jdbcType=VARCHAR},
      </if>
      <if test="rate != null" >
        #{rate,jdbcType=DECIMAL},
      </if>
      <if test="cuid != null" >
        #{cuid,jdbcType=INTEGER},
      </if>
      <if test="type != null" >
        #{type,jdbcType=SMALLINT},
      </if>
      <if test="source != null" >
        #{source,jdbcType=VARCHAR},
      </if>
      <if test="remark1 != null" >
        #{remark1,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.BizAccount" >
    update mtBizAccount
    <set >
      <if test="bebid != null" >
        bebId = #{bebid,jdbcType=INTEGER},
      </if>
      <if test="name != null" >
        beaName = #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        beaCode = #{code,jdbcType=VARCHAR},
      </if>
      <if test="account != null" >
        beaAccount = #{account,jdbcType=VARCHAR},
      </if>
      <if test="rate != null" >
        beaRate = #{rate,jdbcType=DECIMAL},
      </if>
      <if test="cuid != null" >
        cuId = #{cuid,jdbcType=INTEGER},
      </if>
      <if test="type != null" >
        beaType = #{type,jdbcType=SMALLINT},
      </if>
      <if test="source != null" >
        beaSource = #{source,jdbcType=VARCHAR},
      </if>
      <if test="remark1 != null" >
        ptRemark1 = #{remark1,jdbcType=VARCHAR},
      </if>
      <if test="uptime != null" >
        ptUpTime = #{uptime,jdbcType=TIMESTAMP},
      </if>
      <if test="updater != null" >
        ptUpdater = #{updater,jdbcType=INTEGER},
      </if>
    </set>
    where beaId = #{id,jdbcType=INTEGER}
  </update>
  <update id="update" parameterType="cn.runsa.portal.base.entity.BizAccount" >
    update mtBizAccount
    set bebId = #{bebid,jdbcType=INTEGER},
      beaName = #{name,jdbcType=VARCHAR},
      beaCode = #{code,jdbcType=VARCHAR},
      beaAccount = #{account,jdbcType=VARCHAR},
      beaRate = #{rate,jdbcType=DECIMAL},
      cuId = #{cuid,jdbcType=INTEGER},
      beaType = #{type,jdbcType=SMALLINT},
      beaSource = #{source,jdbcType=VARCHAR},
      ptRemark1 = #{remark1,jdbcType=VARCHAR},
      ptUpTime = #{uptime,jdbcType=TIMESTAMP},
      ptUpdater = #{updater,jdbcType=INTEGER}
    where beaId = #{id,jdbcType=INTEGER}
  </update>
</mapper>