当前位置:首页 > 大杂烩 > 正文内容

X2-300电商平台订单表关联关系

高老师1年前 (2024-01-03)大杂烩258

--- Ec订单主表

SELECT * from  x3_ec_order_core  where platform_bills_id='894077742001259'

--- Ec订单明细表   core和core_sub 关联字段:platformType、platformBillsId

SELECT * from  x3_ec_order_core_sub  where platform_bills_id='894077742001259'

--- Ec订单数量控制表  关联字段: sub.systemId = control.systemId

SELECT * from  x3_order_nums_control  where system_id='Weimob.894077742001259.128826597156053.1'

--- Ec订单明细扩展表  关联字段: sub_ext.systemId = sub.systemId

SELECT * from  x3_ec_order_core_sub_ext where system_id='Weimob.894077742001259.128826597156053.1'

--- Ec订单明细履约计划扩展表  ext.systemId = sub.systemId

SELECT * from  x3_ec_order_core_sub_perf_ext where system_id='Weimob.894077742001259.128826597156053.1

--- 批量删除全部关联单据

--- 批量删除所有信息
declare
	var_bills_id varchar2(100);
begin

--- 定义要删除的订单编号
SELECT '894077742001259'  into  var_bills_id FROM dual;

--- 删除主单
execute immediate 'delete from x3_ec_order_core where platform_bills_id =:var_bills_id' using var_bills_id;

--- 删除数量控制
execute immediate 'delete from x3_order_nums_control where system_id in(  SELECT system_id from  x3_ec_order_core_sub  where platform_bills_id=:var_bills_id )' using var_bills_id;

--- 删除明细扩展表
execute immediate 'delete from x3_ec_order_core_sub_ext where system_id in(  SELECT system_id from  x3_ec_order_core_sub  where platform_bills_id=:var_bills_id )' using var_bills_id;

--- 删除明细履约计划扩展表
execute immediate 'delete from x3_ec_order_core_sub_perf_ext where system_id in(  SELECT system_id from  x3_ec_order_core_sub  where platform_bills_id=:var_bills_id )' using var_bills_id;

--- 删除明细表 
execute immediate 'delete from x3_ec_order_core_sub where platform_bills_id =:var_bills_id ' using var_bills_id;

end;
/

扫描二维码推送至手机访问。

版权声明:本文由高久峰个人博客发布,如需转载请注明出处。

本文链接:https://blog.20230611.cn/post/694.html

分享给朋友:

“X2-300电商平台订单表关联关系” 的相关文章

c#中string和StringBuilder效率对比

c#中string和StringBuilder效率对比

    c#中string和StringBuilder直接看看执行速度。(2).String类型累计赋值Test               ...

Application的错误使用

Application的错误使用

Application 对象用于存储和访问来自任意页面的变量,类似 Session 对象。不同之处在于所有的用户分享一个 Application 对象,而 session 对象和用户的关系是一一对应的。很多的书籍中介绍的Application对象都喜欢以统计在线人数来介绍Application 对象...

Git推送文件到远程仓库

Git推送文件到远程仓库

1.远程仓库的协作模式开发者把自己最新的版本推到线上仓库,同时把线上仓库的最新代码,拉到自己本地即可2.注册git帐号国外: http://www.github.com国内: http://git.oschina.net2.在码云创建项目,不要初始化readmegit push https://gi...

Git日志查看和版本切换

Git日志查看和版本切换

日志查看:git log版本切换:方式1:git  reset  --hard  HEAD^   倒退一个版本git  reset  --hard  HEAD^^  倒退两个版本方式2:(版本号的形式,建议版本号码补充完...

c#中文简体转换繁体

c#中文简体转换繁体

private const string fantizi = "高久峰是個程序員"; private const string jiantizi = "高久峰是个程序员...

 vsftp 命令,vsftp常用操作命令

vsftp 命令,vsftp常用操作命令

vsftp常用操作命令:1.启动vsftp: service vsftpd start 2.重启vsftp: service vsftpd restart3.修改用户密码:passwd lao8org4.创建用户:useradd -d /data/wwwroot/blog -s /sbin...