2022-01-27 09:52:02 +08:00

386 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.xhpc.card.mapper.XhpcOperatorMapper">
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcOperator">
<id column="operator_id" jdbcType="BIGINT" property="operatorId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="contact_name" jdbcType="VARCHAR" property="contactName"/>
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="open_bank" jdbcType="VARCHAR" property="openBank"/>
<result column="card_number" jdbcType="VARCHAR" property="cardNumber"/>
<result column="duty_paragraph" jdbcType="VARCHAR" property="dutyParagraph"/>
<result column="attribute" jdbcType="INTEGER" property="attribute"/>
<result column="area_code" jdbcType="VARCHAR" property="areaCode"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="detailed_address" jdbcType="VARCHAR" property="detailedAddress"/>
<result column="longitude" jdbcType="VARCHAR" property="longitude"/>
<result column="latitude" jdbcType="VARCHAR" property="latitude"/>
<result column="email" jdbcType="VARCHAR" property="email"/>
<result column="commission_type" jdbcType="INTEGER" property="commissionType"/>
<result column="platform_commission_rate" jdbcType="DOUBLE" property="platformCommissionRate"/>
<result column="maintenance_commission_rate" jdbcType="DOUBLE" property="maintenanceCommissionRate"/>
<result column="business_license_id" jdbcType="VARCHAR" property="businessLicenseId"/>
<result column="withdrawal_time" jdbcType="INTEGER" property="withdrawalTime"/>
<result column="soc" jdbcType="VARCHAR" property="soc"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="operator_id_evcs" jdbcType="VARCHAR" property="operatorIdEvcs"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
</resultMap>
<sql id="Base_Column_List">
operator_id
, `name`, contact_name, contact_phone, phone, open_bank, card_number,
duty_paragraph, `attribute`, area_code, address, detailed_address, longitude, latitude,
email, commission_type, platform_commission_rate, maintenance_commission_rate, business_license_id,
withdrawal_time, soc, `status`, del_flag, create_time, create_by, update_time, update_by,
remark, operator_id_evcs, tenant_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_operator
where operator_id = #{operatorId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
from xhpc_operator
where operator_id = #{operatorId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="operator_id" keyProperty="operatorId" parameterType="com.xhpc.card.pojo.XhpcOperator"
useGeneratedKeys="true">
insert into xhpc_operator (`name`, contact_name, contact_phone,
phone, open_bank, card_number,
duty_paragraph, `attribute`, area_code,
address, detailed_address, longitude,
latitude, email, commission_type,
platform_commission_rate, maintenance_commission_rate,
business_license_id, withdrawal_time, soc,
`status`, del_flag, create_time,
create_by, update_time, update_by,
remark, operator_id_evcs, tenant_id)
values (#{name,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{openBank,jdbcType=VARCHAR}, #{cardNumber,jdbcType=VARCHAR},
#{dutyParagraph,jdbcType=VARCHAR}, #{attribute,jdbcType=INTEGER}, #{areaCode,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{detailedAddress,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
#{latitude,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{commissionType,jdbcType=INTEGER},
#{platformCommissionRate,jdbcType=DOUBLE}, #{maintenanceCommissionRate,jdbcType=DOUBLE},
#{businessLicenseId,jdbcType=VARCHAR}, #{withdrawalTime,jdbcType=INTEGER}, #{soc,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{operatorIdEvcs,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="operator_id" keyProperty="operatorId"
parameterType="com.xhpc.card.pojo.XhpcOperator" useGeneratedKeys="true">
insert into xhpc_operator
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="contactPhone != null">
contact_phone,
</if>
<if test="phone != null">
phone,
</if>
<if test="openBank != null">
open_bank,
</if>
<if test="cardNumber != null">
card_number,
</if>
<if test="dutyParagraph != null">
duty_paragraph,
</if>
<if test="attribute != null">
`attribute`,
</if>
<if test="areaCode != null">
area_code,
</if>
<if test="address != null">
address,
</if>
<if test="detailedAddress != null">
detailed_address,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="email != null">
email,
</if>
<if test="commissionType != null">
commission_type,
</if>
<if test="platformCommissionRate != null">
platform_commission_rate,
</if>
<if test="maintenanceCommissionRate != null">
maintenance_commission_rate,
</if>
<if test="businessLicenseId != null">
business_license_id,
</if>
<if test="withdrawalTime != null">
withdrawal_time,
</if>
<if test="soc != null">
soc,
</if>
<if test="status != null">
`status`,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="remark != null">
remark,
</if>
<if test="operatorIdEvcs != null">
operator_id_evcs,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="openBank != null">
#{openBank,jdbcType=VARCHAR},
</if>
<if test="cardNumber != null">
#{cardNumber,jdbcType=VARCHAR},
</if>
<if test="dutyParagraph != null">
#{dutyParagraph,jdbcType=VARCHAR},
</if>
<if test="attribute != null">
#{attribute,jdbcType=INTEGER},
</if>
<if test="areaCode != null">
#{areaCode,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="detailedAddress != null">
#{detailedAddress,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
#{longitude,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="commissionType != null">
#{commissionType,jdbcType=INTEGER},
</if>
<if test="platformCommissionRate != null">
#{platformCommissionRate,jdbcType=DOUBLE},
</if>
<if test="maintenanceCommissionRate != null">
#{maintenanceCommissionRate,jdbcType=DOUBLE},
</if>
<if test="businessLicenseId != null">
#{businessLicenseId,jdbcType=VARCHAR},
</if>
<if test="withdrawalTime != null">
#{withdrawalTime,jdbcType=INTEGER},
</if>
<if test="soc != null">
#{soc,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="operatorIdEvcs != null">
#{operatorIdEvcs,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.XhpcOperator">
update xhpc_operator
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="openBank != null">
open_bank = #{openBank,jdbcType=VARCHAR},
</if>
<if test="cardNumber != null">
card_number = #{cardNumber,jdbcType=VARCHAR},
</if>
<if test="dutyParagraph != null">
duty_paragraph = #{dutyParagraph,jdbcType=VARCHAR},
</if>
<if test="attribute != null">
`attribute` = #{attribute,jdbcType=INTEGER},
</if>
<if test="areaCode != null">
area_code = #{areaCode,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="detailedAddress != null">
detailed_address = #{detailedAddress,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
longitude = #{longitude,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
latitude = #{latitude,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="commissionType != null">
commission_type = #{commissionType,jdbcType=INTEGER},
</if>
<if test="platformCommissionRate != null">
platform_commission_rate = #{platformCommissionRate,jdbcType=DOUBLE},
</if>
<if test="maintenanceCommissionRate != null">
maintenance_commission_rate = #{maintenanceCommissionRate,jdbcType=DOUBLE},
</if>
<if test="businessLicenseId != null">
business_license_id = #{businessLicenseId,jdbcType=VARCHAR},
</if>
<if test="withdrawalTime != null">
withdrawal_time = #{withdrawalTime,jdbcType=INTEGER},
</if>
<if test="soc != null">
soc = #{soc,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="operatorIdEvcs != null">
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=VARCHAR},
</if>
</set>
where operator_id = #{operatorId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.XhpcOperator">
update xhpc_operator
set `name` = #{name,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_phone = #{contactPhone,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
open_bank = #{openBank,jdbcType=VARCHAR},
card_number = #{cardNumber,jdbcType=VARCHAR},
duty_paragraph = #{dutyParagraph,jdbcType=VARCHAR},
`attribute` = #{attribute,jdbcType=INTEGER},
area_code = #{areaCode,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
detailed_address = #{detailedAddress,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
commission_type = #{commissionType,jdbcType=INTEGER},
platform_commission_rate = #{platformCommissionRate,jdbcType=DOUBLE},
maintenance_commission_rate = #{maintenanceCommissionRate,jdbcType=DOUBLE},
business_license_id = #{businessLicenseId,jdbcType=VARCHAR},
withdrawal_time = #{withdrawalTime,jdbcType=INTEGER},
soc = #{soc,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
del_flag = #{delFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=VARCHAR}
where operator_id = #{operatorId,jdbcType=BIGINT}
</update>
</mapper>