ahdevicemgt/bonus-modules/bonus-base/src/main/resources/mapper/BmAgreementMapper.xml

487 lines
18 KiB
XML

<?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.bonus.base.mapper.BmAgreementMapper">
<resultMap id="BaseResultMap" type="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
<!--@Table bm_agreement-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="sign_date" jdbcType="VARCHAR" property="signDate" />
<result column="project" jdbcType="INTEGER" property="project" />
<result column="start_time" jdbcType="VARCHAR" property="startTime" />
<result column="lease_term" jdbcType="VARCHAR" property="leaseTerm" />
<result column="advance_charge" jdbcType="VARCHAR" property="advanceCharge" />
<result column="authorizing_person" jdbcType="VARCHAR" property="authorizingPerson" />
<result column="authorizing_phone" jdbcType="VARCHAR" property="authorizingPhone" />
<result column="contract_number" jdbcType="VARCHAR" property="contractNumber" />
<result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="create_time" jdbcType="VARCHAR" property="createTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="settlement_time" jdbcType="VARCHAR" property="settlementTime" />
<result column="is_balance" jdbcType="VARCHAR" property="isBalance" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="is_sure" jdbcType="VARCHAR" property="isSure" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="is_push" jdbcType="VARCHAR" property="isPush" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, sign_date, project, start_time, lease_term, advance_charge,
authorizing_person, authorizing_phone, contract_number, creator, create_time, remark,
settlement_time, is_balance, url, is_sure, company_id, is_push
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from bm_agreement
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from bm_agreement
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
insert into bm_agreement (id, code, sign_date, project, start_time,
lease_term, advance_charge, authorizing_person,
authorizing_phone, contract_number, creator,
create_time, remark, settlement_time,
is_balance, url, is_sure,
company_id, is_push)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{signDate,jdbcType=VARCHAR},
#{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
#{leaseTerm,jdbcType=VARCHAR}, #{advanceCharge,jdbcType=VARCHAR}, #{authorizingPerson,jdbcType=VARCHAR},
#{authorizingPhone,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{createTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{settlementTime,jdbcType=VARCHAR},
#{isBalance,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{isSure,jdbcType=VARCHAR},
#{companyId,jdbcType=INTEGER}, #{isPush,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
insert into bm_agreement
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null and code != ''">
code,
</if>
<if test="signDate != null and signDate != ''">
sign_date,
</if>
<if test="project != null">
project,
</if>
<if test="startTime != null and startTime != ''">
start_time,
</if>
<if test="leaseTerm != null and leaseTerm != ''">
lease_term,
</if>
<if test="advanceCharge != null and advanceCharge != ''">
advance_charge,
</if>
<if test="authorizingPerson != null and authorizingPerson != ''">
authorizing_person,
</if>
<if test="authorizingPhone != null and authorizingPhone != ''">
authorizing_phone,
</if>
<if test="contractNumber != null and contractNumber != ''">
contract_number,
</if>
<if test="creator != null and creator != ''">
creator,
</if>
<if test="createTime != null and createTime != ''">
create_time,
</if>
<if test="remark != null and remark != ''">
remark,
</if>
<if test="settlementTime != null and settlementTime != ''">
settlement_time,
</if>
<if test="isBalance != null and isBalance != ''">
is_balance,
</if>
<if test="url != null and url != ''">
url,
</if>
<if test="isSure != null and isSure != ''">
is_sure,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="isPush != null and isPush != ''">
is_push,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null and code != ''">
#{code,jdbcType=VARCHAR},
</if>
<if test="signDate != null and signDate != ''">
#{signDate,jdbcType=VARCHAR},
</if>
<if test="project != null">
#{project,jdbcType=INTEGER},
</if>
<if test="startTime != null and startTime != ''">
#{startTime,jdbcType=VARCHAR},
</if>
<if test="leaseTerm != null and leaseTerm != ''">
#{leaseTerm,jdbcType=VARCHAR},
</if>
<if test="advanceCharge != null and advanceCharge != ''">
#{advanceCharge,jdbcType=VARCHAR},
</if>
<if test="authorizingPerson != null and authorizingPerson != ''">
#{authorizingPerson,jdbcType=VARCHAR},
</if>
<if test="authorizingPhone != null and authorizingPhone != ''">
#{authorizingPhone,jdbcType=VARCHAR},
</if>
<if test="contractNumber != null and contractNumber != ''">
#{contractNumber,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
#{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
#{createTime,jdbcType=VARCHAR},
</if>
<if test="remark != null and remark != ''">
#{remark,jdbcType=VARCHAR},
</if>
<if test="settlementTime != null and settlementTime != ''">
#{settlementTime,jdbcType=VARCHAR},
</if>
<if test="isBalance != null and isBalance != ''">
#{isBalance,jdbcType=VARCHAR},
</if>
<if test="url != null and url != ''">
#{url,jdbcType=VARCHAR},
</if>
<if test="isSure != null and isSure != ''">
#{isSure,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="isPush != null and isPush != ''">
#{isPush,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
update bm_agreement
<set>
<if test="code != null and code != ''">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="signDate != null and signDate != ''">
sign_date = #{signDate,jdbcType=VARCHAR},
</if>
<if test="project != null">
project = #{project,jdbcType=INTEGER},
</if>
<if test="startTime != null and startTime != ''">
start_time = #{startTime,jdbcType=VARCHAR},
</if>
<if test="leaseTerm != null and leaseTerm != ''">
lease_term = #{leaseTerm,jdbcType=VARCHAR},
</if>
<if test="advanceCharge != null and advanceCharge != ''">
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
</if>
<if test="authorizingPerson != null and authorizingPerson != ''">
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
</if>
<if test="authorizingPhone != null and authorizingPhone != ''">
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
</if>
<if test="contractNumber != null and contractNumber != ''">
contract_number = #{contractNumber,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
creator = #{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
create_time = #{createTime,jdbcType=VARCHAR},
</if>
<if test="remark != null and remark != ''">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="settlementTime != null and settlementTime != ''">
settlement_time = #{settlementTime,jdbcType=VARCHAR},
</if>
<if test="isBalance != null and isBalance != ''">
is_balance = #{isBalance,jdbcType=VARCHAR},
</if>
<if test="url != null and url != ''">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="isSure != null and isSure != ''">
is_sure = #{isSure,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="isPush != null and isPush != ''">
is_push = #{isPush,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
update bm_agreement
set code = #{code,jdbcType=VARCHAR},
sign_date = #{signDate,jdbcType=VARCHAR},
project = #{project,jdbcType=INTEGER},
start_time = #{startTime,jdbcType=VARCHAR},
lease_term = #{leaseTerm,jdbcType=VARCHAR},
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
contract_number = #{contractNumber,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
settlement_time = #{settlementTime,jdbcType=VARCHAR},
is_balance = #{isBalance,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
is_sure = #{isSure,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
is_push = #{isPush,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="insertOrUpdate" parameterType="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
insert into bm_agreement
(id, code, sign_date, project, start_time, lease_term, advance_charge,
authorizing_person, authorizing_phone, contract_number, creator, create_time, remark,
settlement_time, is_balance, url, is_sure, company_id, is_push)
values
(#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{signDate,jdbcType=VARCHAR},
#{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
#{leaseTerm,jdbcType=VARCHAR}, #{advanceCharge,jdbcType=VARCHAR}, #{authorizingPerson,jdbcType=VARCHAR},
#{authorizingPhone,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{createTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{settlementTime,jdbcType=VARCHAR},
#{isBalance,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{isSure,jdbcType=VARCHAR},
#{companyId,jdbcType=INTEGER}, #{isPush,jdbcType=VARCHAR})
on duplicate key update
id = #{id,jdbcType=INTEGER},
code = #{code,jdbcType=VARCHAR},
sign_date = #{signDate,jdbcType=VARCHAR},
project = #{project,jdbcType=INTEGER},
start_time = #{startTime,jdbcType=VARCHAR},
lease_term = #{leaseTerm,jdbcType=VARCHAR},
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
contract_number = #{contractNumber,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
settlement_time = #{settlementTime,jdbcType=VARCHAR},
is_balance = #{isBalance,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
is_sure = #{isSure,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
is_push = #{isPush,jdbcType=VARCHAR}
</insert>
<insert id="insertOrUpdateSelective" parameterType="com.bonus.base.domain.BmAgreement">
<!--@mbg.generated-->
insert into bm_agreement
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null and code != ''">
code,
</if>
<if test="signDate != null and signDate != ''">
sign_date,
</if>
<if test="project != null">
project,
</if>
<if test="startTime != null and startTime != ''">
start_time,
</if>
<if test="leaseTerm != null and leaseTerm != ''">
lease_term,
</if>
<if test="advanceCharge != null and advanceCharge != ''">
advance_charge,
</if>
<if test="authorizingPerson != null and authorizingPerson != ''">
authorizing_person,
</if>
<if test="authorizingPhone != null and authorizingPhone != ''">
authorizing_phone,
</if>
<if test="contractNumber != null and contractNumber != ''">
contract_number,
</if>
<if test="creator != null and creator != ''">
creator,
</if>
<if test="createTime != null and createTime != ''">
create_time,
</if>
<if test="remark != null and remark != ''">
remark,
</if>
<if test="settlementTime != null and settlementTime != ''">
settlement_time,
</if>
<if test="isBalance != null and isBalance != ''">
is_balance,
</if>
<if test="url != null and url != ''">
url,
</if>
<if test="isSure != null and isSure != ''">
is_sure,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="isPush != null and isPush != ''">
is_push,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null and code != ''">
#{code,jdbcType=VARCHAR},
</if>
<if test="signDate != null and signDate != ''">
#{signDate,jdbcType=VARCHAR},
</if>
<if test="project != null">
#{project,jdbcType=INTEGER},
</if>
<if test="startTime != null and startTime != ''">
#{startTime,jdbcType=VARCHAR},
</if>
<if test="leaseTerm != null and leaseTerm != ''">
#{leaseTerm,jdbcType=VARCHAR},
</if>
<if test="advanceCharge != null and advanceCharge != ''">
#{advanceCharge,jdbcType=VARCHAR},
</if>
<if test="authorizingPerson != null and authorizingPerson != ''">
#{authorizingPerson,jdbcType=VARCHAR},
</if>
<if test="authorizingPhone != null and authorizingPhone != ''">
#{authorizingPhone,jdbcType=VARCHAR},
</if>
<if test="contractNumber != null and contractNumber != ''">
#{contractNumber,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
#{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
#{createTime,jdbcType=VARCHAR},
</if>
<if test="remark != null and remark != ''">
#{remark,jdbcType=VARCHAR},
</if>
<if test="settlementTime != null and settlementTime != ''">
#{settlementTime,jdbcType=VARCHAR},
</if>
<if test="isBalance != null and isBalance != ''">
#{isBalance,jdbcType=VARCHAR},
</if>
<if test="url != null and url != ''">
#{url,jdbcType=VARCHAR},
</if>
<if test="isSure != null and isSure != ''">
#{isSure,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="isPush != null and isPush != ''">
#{isPush,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="code != null and code != ''">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="signDate != null and signDate != ''">
sign_date = #{signDate,jdbcType=VARCHAR},
</if>
<if test="project != null">
project = #{project,jdbcType=INTEGER},
</if>
<if test="startTime != null and startTime != ''">
start_time = #{startTime,jdbcType=VARCHAR},
</if>
<if test="leaseTerm != null and leaseTerm != ''">
lease_term = #{leaseTerm,jdbcType=VARCHAR},
</if>
<if test="advanceCharge != null and advanceCharge != ''">
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
</if>
<if test="authorizingPerson != null and authorizingPerson != ''">
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
</if>
<if test="authorizingPhone != null and authorizingPhone != ''">
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
</if>
<if test="contractNumber != null and contractNumber != ''">
contract_number = #{contractNumber,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
creator = #{creator,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
create_time = #{createTime,jdbcType=VARCHAR},
</if>
<if test="remark != null and remark != ''">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="settlementTime != null and settlementTime != ''">
settlement_time = #{settlementTime,jdbcType=VARCHAR},
</if>
<if test="isBalance != null and isBalance != ''">
is_balance = #{isBalance,jdbcType=VARCHAR},
</if>
<if test="url != null and url != ''">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="isSure != null and isSure != ''">
is_sure = #{isSure,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="isPush != null and isPush != ''">
is_push = #{isPush,jdbcType=VARCHAR},
</if>
</trim>
</insert>
</mapper>