emis-service/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
2024-07-01 22:24:54 +08:00

389 lines
28 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.xdadan.erp.emis.mapper.EmisCustomerUserMapper">
<resultMap type="EmisCustomerUser" id="EmisCustomerUserResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
<result property="id" column="id" />
<result property="customerCode" column="customer_code" />
<result property="customerName" column="customer_name" />
<result property="customerNameEn" column="customer_name_en" />
<result property="simpleName" column="simple_name" />
<result property="contact" column="contact" />
<result property="phone" column="phone" />
<result property="mobile" column="mobile" />
<result property="customerType" column="customer_type" />
<result property="settledType" column="settled_type" />
<result property="userType" column="user_type" />
<result property="company" column="company" />
<result property="licNo" column="lic_no" />
<result property="deptId" column="dept_id" />
<result property="avatar" column="avatar" />
<result property="sex" column="sex" />
<result property="invitationInfo" column="invitation_info" />
<result property="loginIp" column="login_ip" />
<result property="loginDate" column="login_date" />
<result property="nickName" column="nick_name" />
<result property="unionId" column="union_id" />
<result property="openid" column="openid" />
<result property="monthlyPayCode" column="monthly_pay_code" />
<result property="userName" column="user_name" />
<result property="password" column="password" />
<result property="ownerSite" column="owner_site" />
<result property="bizSite" column="biz_site" />
<result property="bizSiteName" column="biz_site_name" />
<result property="country" column="country" />
<result property="province" column="province" />
<result property="city" column="city" />
<result property="county" column="county" />
<result property="town" column="town" />
<result property="address" column="address" />
<result property="email" column="email" />
<result property="postCode" column="post_code" />
<result property="realName" column="real_name" />
<result property="idNo" column="id_no" />
<result property="payee" column="payee" />
<result property="salesmen" column="salesmen" />
<result property="dataFrom" column="data_from" />
<result property="blOpenOms" column="bl_open_oms" />
<result property="blSms" column="bl_sms" />
<result property="opEmpCode" column="op_emp_code" />
<result property="firstSigningDay" column="first_signing_day" />
<result property="status" column="status" />
<result property="orderNum" column="order_num" />
<result property="custNo" column="monthly_pay_code" />
<result property="custName" column="customer_name" />
<result property="payeeName" column="payee" />
<result property="salesmenName" column="salesmen" />
<association property="countryName" column="country" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectCountryNameByCode"/>
<association property="provinceName" column="province" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectRegionNameByCode"/>
<association property="cityName" column="city" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectRegionNameByCode"/>
<association property="countyName" column="county" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectRegionNameByCode"/>
<association property="ownerSiteName" column="owner_site" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
<!-- <association property="payeeName" column="payee" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>-->
<!-- <association property="salesmenName" column="salesmen" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>-->
<!-- <association property="opEmpName" column="op_emp_code" select="selectEmpNameByCode"/>-->
<association property="lastOrderTime" column="customer_code" select="selectLastOrderTimeByCustomerCode"/>
</resultMap>
<select id="selectLastOrderTimeByCustomerCode" parameterType="String" resultType="date">
select send_date from emis_waybill where customer_code=#{code} order by send_date desc limit 1;
</select>
<sql id="selectEmisCustomerUserVo">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, status, order_num, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_customer_user
</sql>
<!-- or FIND_IN_SET(#{ownerSite},biz_site)-->
<select id="selectEmisCustomerUserList" parameterType="EmisCustomerUser" resultMap="EmisCustomerUserResult">
<include refid="selectEmisCustomerUserVo"/>
<where>
del_flag='0'
<if test="ownerSite != null and ownerSite != ''">
and ( owner_site=#{ownerSite} )
</if>
<if test="bizSite != null and bizSite != ''"> and ( FIND_IN_SET(#{bizSite},biz_site) or #{bizSite}=owner_site) </if>
<if test="custName != null and custName != ''"> and customer_name like concat('%', #{custName}, '%')</if>
<if test="id != null "> and id = #{id}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code =#{customerCode}</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="customerNameEn != null and customerNameEn != ''"> and customer_name_en like concat('%', #{customerNameEn}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="contact != null and contact != ''"> and contact like concat('%', #{contact}, '%')</if>
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
<if test="mobile != null and mobile != ''"> and mobile like concat('%', #{mobile}, '%')</if>
<if test="customerType != null and customerType != ''"> and customer_type=#{customerType}</if>
<if test="settledType != null and settledType != ''"> and settled_type=#{settledType}</if>
<if test="userType != null and userType != ''"> and user_type=#{userType}</if>
<if test="company != null and company != ''"> and company like concat('%', #{company}, '%')</if>
<if test="licNo != null and licNo != ''"> and lic_no like concat('%', #{licNo}, '%')</if>
<if test="deptId != null and deptId != ''"> and dept_id like concat('%', #{deptId}, '%')</if>
<if test="avatar != null and avatar != ''"> and avatar like concat('%', #{avatar}, '%')</if>
<if test="sex != null and sex != ''"> and sex= #{sex}</if>
<if test="invitationInfo != null and invitationInfo != ''"> and invitation_info like concat('%', #{invitationInfo}, '%')</if>
<if test="loginIp != null and loginIp != ''"> and login_ip like concat('%', #{loginIp}, '%')</if>
<if test="loginDate != null "> and login_date like concat('%', #{loginDate}, '%')</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="unionId != null and unionId != ''"> and union_id like concat('%', #{unionId}, '%')</if>
<if test="openid != null and openid != ''"> and openid like concat('%', #{openid}, '%')</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''"> and monthly_pay_code= #{monthlyPayCode}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="bizSiteName != null and bizSiteName != ''"> and biz_site_name like concat('%', #{bizSiteName}, '%')</if>
<if test="country != null and country != ''"> and country=#{country}</if>
<if test="province != null and province != ''"> and province=#{province}</if>
<if test="city != null and city != ''"> and city=#{city}</if>
<if test="county != null and county != ''"> and county=#{county}</if>
<if test="town != null and town != ''"> and town=#{town}</if>
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="email != null and email != ''"> and email like concat('%', #{email}, '%')</if>
<if test="postCode != null and postCode != ''"> and post_code like concat('%', #{postCode}, '%')</if>
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
<if test="idNo != null and idNo != ''"> and id_no like concat('%', #{idNo}, '%')</if>
<if test="dataFrom != null and dataFrom != ''"> and data_from like concat('%', #{dataFrom}, '%')</if>
<if test="blOpenOms != null and blOpenOms != ''"> and bl_open_oms=#{blOpenOms}</if>
<if test="blSms != null and blSms != ''"> and bl_sms=#{blSms}</if>
<if test="opEmpCode != null and opEmpCode != ''"> and op_emp_code like concat('%', #{opEmpCode}, '%')</if>
<if test="firstSigningDay != null and firstSigningDay != ''"> and first_signing_day like concat('%', #{firstSigningDay}, '%')</if>
<if test="status != null and status != ''"> and status=#{status}</if>
<if test="orderNum != null and orderNum != ''"> and order_num like concat('%', #{orderNum}, '%')</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<choose>
<when test="payee != null and payee != '' and salesmen != null and salesmen != ''">
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (payee=#{payee} or salesmen=#{salesmen})
</if>
</when>
<otherwise>
<if test="payee != null and payee != ''"> and payee=#{payee}</if>
<if test="salesmen != null and salesmen != ''"> and salesmen=#{salesmen}</if>
</otherwise>
</choose>
</where>
order by create_time desc
</select>
<select id="selectEmisCustomerUserById" parameterType="Long" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, status, order_num, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.id = #{id}
</select>
<insert id="insertEmisCustomerUser" parameterType="EmisCustomerUser">
insert into emis_customer_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="customerCode != null and customerCode != ''">customer_code,</if>
<if test="customerName != null and customerName != ''">customer_name,</if>
<if test="customerNameEn != null and customerNameEn != ''">customer_name_en,</if>
<if test="simpleName != null and simpleName != ''">simple_name,</if>
<if test="contact != null and contact != ''">contact,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="mobile != null and mobile != ''">mobile,</if>
<if test="customerType != null and customerType != ''">customer_type,</if>
<if test="settledType != null and settledType != ''">settled_type,</if>
<if test="userType != null and userType != ''">user_type,</if>
<if test="company != null and company != ''">company,</if>
<if test="licNo != null and licNo != ''">lic_no,</if>
<if test="deptId != null and deptId != ''">dept_id,</if>
<if test="avatar != null and avatar != ''">avatar,</if>
<if test="sex != null and sex != ''">sex,</if>
<if test="invitationInfo != null and invitationInfo != ''">invitation_info,</if>
<if test="loginIp != null and loginIp != ''">login_ip,</if>
<if test="loginDate != null">login_date,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="unionId != null and unionId != ''">union_id,</if>
<if test="openid != null and openid != ''">openid,</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''">monthly_pay_code,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="password != null and password != ''">password,</if>
<if test="ownerSite != null and ownerSite != ''">owner_site,</if>
<if test="bizSite != null and bizSite != ''">biz_site,</if>
<if test="bizSiteName != null and bizSiteName != ''">biz_site_name,</if>
<if test="country != null and country != ''">country,</if>
<if test="province != null and province != ''">province,</if>
<if test="city != null and city != ''">city,</if>
<if test="county != null and county != ''">county,</if>
<if test="town != null and town != ''">town,</if>
<if test="address != null and address != ''">address,</if>
<if test="email != null and email != ''">email,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="realName != null and realName != ''">real_name,</if>
<if test="idNo != null and idNo != ''">id_no,</if>
<if test="payee != null and payee != ''">payee,</if>
<if test="salesmen != null and salesmen != ''">salesmen,</if>
<if test="dataFrom != null and dataFrom != ''">data_from,</if>
<if test="blOpenOms != null and blOpenOms != ''">bl_open_oms,</if>
<if test="blSms != null and blSms != ''">bl_sms,</if>
<if test="opEmpCode != null and opEmpCode != ''">op_emp_code,</if>
<if test="firstSigningDay != null and firstSigningDay != ''">first_signing_day,</if>
<if test="status != null and status != ''">status,</if>
<if test="orderNum != null and orderNum != ''">order_num,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
<if test="customerName != null and customerName != ''">#{customerName},</if>
<if test="customerNameEn != null and customerNameEn != ''">#{customerNameEn},</if>
<if test="simpleName != null and simpleName != ''">#{simpleName},</if>
<if test="contact != null and contact != ''">#{contact},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="mobile != null and mobile != ''">#{mobile},</if>
<if test="customerType != null and customerType != ''">#{customerType},</if>
<if test="settledType != null and settledType != ''">#{settledType},</if>
<if test="userType != null and userType != ''">#{userType},</if>
<if test="company != null and company != ''">#{company},</if>
<if test="licNo != null and licNo != ''">#{licNo},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="sex != null and sex != ''">#{sex},</if>
<if test="invitationInfo != null and invitationInfo != ''">#{invitationInfo},</if>
<if test="loginIp != null and loginIp != ''">#{loginIp},</if>
<if test="loginDate != null">#{loginDate},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="unionId != null and unionId != ''">#{unionId},</if>
<if test="openid != null and openid != ''">#{openid},</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''">#{monthlyPayCode},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="ownerSite != null and ownerSite != ''">#{ownerSite},</if>
<if test="bizSite != null and bizSite != ''">#{bizSite},</if>
<if test="bizSiteName != null and bizSiteName != ''">#{bizSiteName},</if>
<if test="country != null and country != ''">#{country},</if>
<if test="province != null and province != ''">#{province},</if>
<if test="city != null and city != ''">#{city},</if>
<if test="county != null and county != ''">#{county},</if>
<if test="town != null and town != ''">#{town},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="postCode != null and postCode != ''">#{postCode},</if>
<if test="realName != null and realName != ''">#{realName},</if>
<if test="idNo != null and idNo != ''">#{idNo},</if>
<if test="payee != null and payee != ''">#{payee},</if>
<if test="salesmen != null and salesmen != ''">#{salesmen},</if>
<if test="dataFrom != null and dataFrom != ''">#{dataFrom},</if>
<if test="blOpenOms != null and blOpenOms != ''">#{blOpenOms},</if>
<if test="blSms != null and blSms != ''">#{blSms},</if>
<if test="opEmpCode != null and opEmpCode != ''">#{opEmpCode},</if>
<if test="firstSigningDay != null and firstSigningDay != ''">#{firstSigningDay},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisCustomerUser" parameterType="EmisCustomerUser">
update emis_customer_user
<trim prefix="SET" suffixOverrides=",">
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
<if test="customerNameEn != null and customerNameEn != ''">customer_name_en = #{customerNameEn},</if>
<if test="simpleName != null and simpleName != ''">simple_name = #{simpleName},</if>
<if test="contact != null and contact != ''">contact = #{contact},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
<if test="customerType != null and customerType != ''">customer_type = #{customerType},</if>
<if test="settledType != null and settledType != ''">settled_type = #{settledType},</if>
<if test="userType != null and userType != ''">user_type = #{userType},</if>
<if test="company != null and company != ''">company = #{company},</if>
<if test="licNo != null and licNo != ''">lic_no = #{licNo},</if>
<if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="invitationInfo != null and invitationInfo != ''">invitation_info = #{invitationInfo},</if>
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
<if test="loginDate != null">login_date = #{loginDate},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="unionId != null and unionId != ''">union_id = #{unionId},</if>
<if test="openid != null and openid != ''">openid = #{openid},</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''">monthly_pay_code = #{monthlyPayCode},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="ownerSite != null and ownerSite != ''">owner_site = #{ownerSite},</if>
<if test="bizSite != null and bizSite != ''">biz_site = #{bizSite},</if>
<if test="bizSiteName != null and bizSiteName != ''">biz_site_name = #{bizSiteName},</if>
<if test="country != null and country != ''">country = #{country},</if>
<if test="province != null and province != ''">province = #{province},</if>
<if test="city != null and city != ''">city = #{city},</if>
<if test="county != null and county != ''">county = #{county},</if>
<if test="town != null and town != ''">town = #{town},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="realName != null and realName != ''">real_name = #{realName},</if>
<if test="idNo != null and idNo != ''">id_no = #{idNo},</if>
<if test="payee != null and payee != ''">payee = #{payee},</if>
<if test="salesmen != null and salesmen != ''">salesmen = #{salesmen},</if>
<if test="dataFrom != null and dataFrom != ''">data_from = #{dataFrom},</if>
<if test="blOpenOms != null and blOpenOms != ''">bl_open_oms = #{blOpenOms},</if>
<if test="blSms != null and blSms != ''">bl_sms = #{blSms},</if>
<if test="opEmpCode != null and opEmpCode != ''">op_emp_code = #{opEmpCode},</if>
<if test="firstSigningDay != null and firstSigningDay != ''">first_signing_day = #{firstSigningDay},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisCustomerUserById" parameterType="Long">
update emis_customer_user set del_flag='1' where id = #{id}
</delete>
<delete id="deleteEmisCustomerUserByIds" parameterType="String">
update emis_customer_user set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectMaxCustomerCodeBySite" parameterType="String" resultType="Long">
select IF(max(customer_code) is NULL,CONCAT(#{ownSiteCode},LPAD('1',6,'0')),CONCAT(CONVERT(max(customer_code),SIGNED)+1,'')) as code
from emis_customer_user where owner_site = #{ownSiteCode}
</select>
<select id="selectEmisCustomerUserByPhone" parameterType="string" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, status, order_num, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.phone = #{phone}
</select>
<select id="selectMonthCustomerByName" parameterType="string" resultMap="EmisCustomerUserResult">
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, status, order_num, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_customer_user a
where a.del_flag='0' and a.customer_type='2' and a.customer_name = #{customerName}
</select>
</mapper>