emis-service/emis-biz/src/main/resources/mapper/EmisCustomerUserMapper.xml
2024-05-15 20:19:46 +08:00

395 lines
29 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">
<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="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="sendCountry" column="send_country" />
<result property="sendProvince" column="send_province" />
<result property="sendCity" column="send_city" />
<result property="sendCounty" column="send_county" />
<result property="sendTown" column="send_town" />
<result property="sendPerson" column="send_person" />
<result property="sendPhone" column="send_phone" />
<result property="postCode" column="post_code" />
<result property="status" column="status" />
<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="orderNum" column="order_num" />
<result property="firstSigningDay" column="first_signing_day" />
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createSite" column="create_site" />
<result property="updateSite" column="update_site" />
<association property="countryName" column="country" select="selectCountryNameByCode"/>
<association property="provinceName" column="province" select="selectRegionNameByCode"/>
<association property="cityName" column="city" select="selectRegionNameByCode"/>
<association property="countyName" column="county" select="selectRegionNameByCode"/>
<association property="ownerSiteName" column="owner_site" select="selectSiteNameByCode"/>
<association property="payeeName" column="payee" select="selectEmpNameByCode"/>
<association property="salesmenName" column="salesmen" select="selectEmpNameByCode"/>
<association property="opEmpName" column="op_emp_code" select="selectEmpNameByCode"/>
</resultMap>
<select id="selectCountryNameByCode" parameterType="String" resultType="string">
select a.name from emis_country a where a.code = #{code} limit 1
</select>
<select id="selectRegionNameByCode" parameterType="String" resultType="string">
select a.region_name from emis_region a where a.region_code = #{code} limit 1
</select>
<select id="selectSiteNameByCode" parameterType="String" resultType="string">
select a.site_name from emis_site a where a.site_code = #{code} limit 1
</select>
<select id="selectEmpNameByCode" parameterType="String" resultType="string">
select a.emp_name from sys_user a where a.emp_code = #{code} 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, 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, send_country, send_province, send_city, send_county, send_town, send_person, send_phone, post_code, status, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, order_num, first_signing_day, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_customer_user
</sql>
<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="id != null "> and id = #{id}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{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="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 like concat('%', #{customerType}, '%')</if>
<if test="settledType != null and settledType != ''"> and settled_type like concat('%', #{settledType}, '%')</if>
<if test="userType != null and userType != ''"> and user_type like concat('%', #{userType}, '%')</if>
<if test="company != null and company != ''"> and company like concat('%', #{company}, '%')</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 like concat('%', #{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 like concat('%', #{monthlyPayCode}, '%')</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="password != null and password != ''"> and password like concat('%', #{password}, '%')</if>
<!-- <if test="ownerSite != null and ownerSite != ''"> and owner_site like concat('%', #{ownerSite}, '%')</if>-->
<if test="bizSite != null and bizSite != ''"> and biz_site like concat('%', #{bizSite}, '%')</if>
<if test="bizSiteName != null and bizSiteName != ''"> and biz_site_name like concat('%', #{bizSiteName}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
<if test="county != null and county != ''"> and county like concat('%', #{county}, '%')</if>
<if test="town != null and town != ''"> and town like concat('%', #{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="sendCountry != null and sendCountry != ''"> and send_country like concat('%', #{sendCountry}, '%')</if>
<if test="sendProvince != null and sendProvince != ''"> and send_province like concat('%', #{sendProvince}, '%')</if>
<if test="sendCity != null and sendCity != ''"> and send_city like concat('%', #{sendCity}, '%')</if>
<if test="sendCounty != null and sendCounty != ''"> and send_county like concat('%', #{sendCounty}, '%')</if>
<if test="sendTown != null and sendTown != ''"> and send_town like concat('%', #{sendTown}, '%')</if>
<if test="postCode != null and postCode != ''"> and post_code like concat('%', #{postCode}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</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="payee != null and payee != ''"> and payee like concat('%', #{payee}, '%')</if>
<if test="salesmen != null and salesmen != ''"> and salesmen like concat('%', #{salesmen}, '%')</if>
<if test="dataFrom != null and dataFrom != ''"> and data_from like concat('%', #{dataFrom}, '%')</if>
<if test="blOpenOms != null and blOpenOms != ''"> and bl_open_oms like concat('%', #{blOpenOms}, '%')</if>
<if test="blSms != null and blSms != ''"> and bl_sms like concat('%', #{blSms}, '%')</if>
<if test="opEmpCode != null and opEmpCode != ''"> and op_emp_code like concat('%', #{opEmpCode}, '%')</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>
</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, 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, send_country, send_province, send_city, send_county, send_town, send_person, send_phone, post_code, status, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, order_num, first_signing_day, 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="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="sendCountry != null and sendCountry != ''">send_country,</if>
<if test="sendProvince != null and sendProvince != ''">send_province,</if>
<if test="sendCity != null and sendCity != ''">send_city,</if>
<if test="sendCounty != null and sendCounty != ''">send_county,</if>
<if test="sendTown != null and sendTown != ''">send_town,</if>
<if test="sendPerson != null and sendPerson != ''">send_person,</if>
<if test="sendPhone != null and sendPhone != ''">send_phone,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="status != null and status != ''">status,</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="orderNum != null and orderNum != ''">order_num,</if>
<if test="firstSigningDay != null and firstSigningDay != ''">first_signing_day,</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="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="sendCountry != null and sendCountry != ''">#{sendCountry},</if>
<if test="sendProvince != null and sendProvince != ''">#{sendProvince},</if>
<if test="sendCity != null and sendCity != ''">#{sendCity},</if>
<if test="sendCounty != null and sendCounty != ''">#{sendCounty},</if>
<if test="sendTown != null and sendTown != ''">#{sendTown},</if>
<if test="sendPerson != null and sendPerson != ''">#{sendPerson},</if>
<if test="sendPhone != null and sendPhone != ''">#{sendPhone},</if>
<if test="postCode != null and postCode != ''">#{postCode},</if>
<if test="status != null and status != ''">#{status},</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="orderNum != null and orderNum != ''">#{orderNum},</if>
<if test="firstSigningDay != null and firstSigningDay != ''">#{firstSigningDay},</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="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="sendCountry != null and sendCountry != ''">send_country = #{sendCountry},</if>
<if test="sendProvince != null and sendProvince != ''">send_province = #{sendProvince},</if>
<if test="sendCity != null and sendCity != ''">send_city = #{sendCity},</if>
<if test="sendCounty != null and sendCounty != ''">send_county = #{sendCounty},</if>
<if test="sendTown != null and sendTown != ''">send_town = #{sendTown},</if>
<if test="sendPerson != null and sendPerson != ''">send_person = #{sendPerson},</if>
<if test="sendPhone != null and sendPhone != ''">send_phone = #{sendPhone},</if>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="status != null and status != ''">status = #{status},</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="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
<if test="firstSigningDay != null and firstSigningDay != ''">first_signing_day = #{firstSigningDay},</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 max(CONVERT(customer_code,SIGNED)) as code from emis_customer_user where owner_site = #{ownSiteCode}
</select>
</mapper>