select thisTab.id, thisTab.customer_type, thisTab.customer_short_name, thisTab.customer_code, thisTab.customer_full_name, thisTab.business_license_no, thisTab.address, thisTab.contact_name, thisTab.contact_phone, thisTab.contact_email, thisTab.sign_company_id, thisTab.biz_contact_name, thisTab.sign_company_name, thisTab.biz_contact_phone, thisTab.biz_contact_email, thisTab.credit_rating, thisTab.credit_amount, thisTab.credit_order_limit, thisTab.business_status, thisTab.contract_status, thisTab.data_status, thisTab.create_time, thisTab.update_time, thisTab.remark from tms_customer_info AS thisTab
select count(0) from tms_customer_info as thisTab
and thisTab.customer_type = #{customerType}
and thisTab.customer_short_name like concat('%', #{customerShortName}, '%')
and thisTab.customer_code = #{customerCode}
and thisTab.contact_name like concat('%', #{contactName}, '%')
and thisTab.sign_company_id = #{signCompanyId}
and thisTab.biz_contact_name like concat('%', #{bizContactName}, '%')
and thisTab.sign_company_name like concat('%', #{signCompanyName}, '%')
and thisTab.credit_rating = #{creditRating}
and thisTab.credit_amount = #{creditAmount}
and thisTab.credit_order_limit = #{creditOrderLimit}
and thisTab.business_status = #{businessStatus}
and thisTab.contract_status = #{contractStatus}
and thisTab.data_status = #{dataStatus}
and thisTab.update_time = #{updateTime}
insert into tms_customer_info
customer_type,
customer_short_name,
customer_code,
customer_full_name,
business_license_no,
address,
contact_name,
contact_phone,
contact_email,
sign_company_id,
biz_contact_name,
sign_company_name,
biz_contact_phone,
biz_contact_email,
credit_rating,
credit_amount,
credit_order_limit,
business_status,
contract_status,
data_status,
create_time,
update_time,
remark,
#{customerType},
#{customerShortName},
#{customerCode},
#{customerFullName},
#{businessLicenseNo},
#{address},
#{contactName},
#{contactPhone},
#{contactEmail},
#{signCompanyId},
#{bizContactName},
#{signCompanyName},
#{bizContactPhone},
#{bizContactEmail},
#{creditRating},
#{creditAmount},
#{creditOrderLimit},
#{businessStatus},
#{contractStatus},
#{dataStatus},
#{createTime},
#{updateTime},
#{remark},
insert into tms_customer_info
id,customer_type,customer_short_name,customer_code,customer_full_name,business_license_no,address,contact_name,contact_phone,contact_email,sign_company_id,biz_contact_name,sign_company_name,biz_contact_phone,biz_contact_email,credit_rating,credit_amount,credit_order_limit,business_status,contract_status,data_status,create_time,update_time,remark,
#{item.id},#{item.customerType},#{item.customerShortName},#{item.customerCode},#{item.customerFullName},#{item.businessLicenseNo},#{item.address},#{item.contactName},#{item.contactPhone},#{item.contactEmail},#{item.signCompanyId},#{item.bizContactName},#{item.signCompanyName},#{item.bizContactPhone},#{item.bizContactEmail},#{item.creditRating},#{item.creditAmount},#{item.creditOrderLimit},#{item.businessStatus},#{item.contractStatus},#{item.dataStatus},#{item.createTime},#{item.updateTime},#{item.remark},
update tms_customer_info
customer_type = #{customerType},
customer_short_name = #{customerShortName},
customer_code = #{customerCode},
customer_full_name = #{customerFullName},
business_license_no = #{businessLicenseNo},
address = #{address},
contact_name = #{contactName},
contact_phone = #{contactPhone},
contact_email = #{contactEmail},
sign_company_id = #{signCompanyId},
biz_contact_name = #{bizContactName},
sign_company_name = #{signCompanyName},
biz_contact_phone = #{bizContactPhone},
biz_contact_email = #{bizContactEmail},
credit_rating = #{creditRating},
credit_amount = #{creditAmount},
credit_order_limit = #{creditOrderLimit},
business_status = #{businessStatus},
contract_status = #{contractStatus},
data_status = #{dataStatus},
create_time = #{createTime},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
update tms_customer_info
customer_type = #{item.customerType},
customer_short_name = #{item.customerShortName},
customer_code = #{item.customerCode},
customer_full_name = #{item.customerFullName},
business_license_no = #{item.businessLicenseNo},
address = #{item.address},
contact_name = #{item.contactName},
contact_phone = #{item.contactPhone},
contact_email = #{item.contactEmail},
sign_company_id = #{item.signCompanyId},
biz_contact_name = #{item.bizContactName},
sign_company_name = #{item.signCompanyName},
biz_contact_phone = #{item.bizContactPhone},
biz_contact_email = #{item.bizContactEmail},
credit_rating = #{item.creditRating},
credit_amount = #{item.creditAmount},
credit_order_limit = #{item.creditOrderLimit},
business_status = #{item.businessStatus},
contract_status = #{item.contractStatus},
data_status = #{item.dataStatus},
create_time = #{item.createTime},
update_time = #{item.updateTime},
remark = #{item.remark},
where id = #{item.id}
delete from tms_customer_info where id = #{id}
delete from tms_customer_info where id in
#{id}