rushfee/resource/db/customer_sql.xml

1 line
2.9 KiB
XML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sqls SYSTEM "sql_definition.dtd"> <sqls> <sql group="rushfee_customer"> <i id="getContactByCustomer"><![CDATA[ select t.contact,t.mobile,t.vital,t.is_default,t.addrid,t.source,t.id,t.mobile_mark from v_customer_contact_test t where t.customer_id={customer_id} order by t.source ,t.is_default desc ]]></i> <i id="getContact"><![CDATA[ select t.contact,t.mobile,t.vital,t.is_default,t.addrid,t.source,t.id,DECODE(t.flag, 'add', '添加','0','无','delete','删除','modify','修改') flag, case when t.flag='delete' then '' else t.mobile_mark end as mobile_mark ,operate_date from v_contact t where t.customer_id={customer_id} order by t.source ,t.is_default desc ]]></i> <i id="updateContact"><![CDATA[ update RUSH_CONTACT set contact={contact}, mobile_mark={mobile_mark} where customer_id={customer_id} and mobile={mobile} ]]></i> <i id="updateContactcompany"><![CDATA[ update RUSH_CONTACT set contact={contact},mobile={mobile} , mobile_mark={mobile_mark},flag = {flag},operate_date={operate_date} where customer_id={customer_id} and mobile={mobile} ]]></i> <i id="updateContactById"><![CDATA[ update RUSH_CONTACT set contact={contact},mobile={mobile} , mobile_mark={mobile_mark},flag = {flag} where id={rush_contact_id} ]]></i> <i id="updateContactFlagByAddId"><![CDATA[ update RUSH_CONTACT set flag={flag} where customer_id={customer_id} and mobile ={mobile} ]]></i> <i id="queryContact"><![CDATA[ select * from rush_contact where customer_id={customer_id} and mobile={mobile} and flag!='delete' ]]></i> <i id="querydeleteContact"><![CDATA[ select * from rush_contact where customer_id={customer_id} and mobile={mobile} ]]></i> <i id="deleteContact"><![CDATA[ select * from rush_contact where customer_id={customer_id} and mobile={mobile} and flag='delete' ]]></i> <i id="delete"><![CDATA[ delete from rush_contact where customer_id={customer_id} and mobile={mobile} and flag='delete' ]]></i> <i id="queryRushContact"><![CDATA[ select * from v_customer_contact_test t where t.customer_id ={customer_id} and t.mobile ={mobile} ]]></i> <i id="queryContactById"><![CDATA[ select * from RUSH_CONTACT where id={rush_contact_id} ]]></i> <i id="addContact"><![CDATA[ insert into RUSH_CONTACT (id, addr_id, customer_id, contact, mobile, is_default, source, flag, mobile_mark, vital, operator_code, operator_name, operate_date) values ({contact_id}, {addrid}, {customer_id}, {contact}, {mobile}, {is_default}, {source}, {flag}, {mobile_mark}, {vital}, {operator_code}, {operator_name}, {operate_date}) ]]></i> </sql> </sqls>