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

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

高老师9个月前 (01-03)大杂烩227

--- 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               ...

Git本地仓库学习

Git本地仓库学习

1.全局用户信息设置 git  config  --global  user.name  gaojiufeng git  config  --global  user.email  392223903...

PHP安装mongodb扩展

PHP安装mongodb扩展

在安装之前我们先看看官方给出的依赖关系.首先是dll文件和mongodb软件的依赖关系然后是PHP文件和dll的依赖关系我的是phpstudy的集成环境PHP5.4.45 NTS+Apache+Mysql【一】.安装mongodb3.0软件对比依赖关系下载mongodb3.0.msi软件,完整名称:...

Application的错误使用

Application的错误使用

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

Git从远程仓库更新文件

Git从远程仓库更新文件

 git   pull  https://git.oschina.net/392223903/learn.git   master   换为您的git地址...

Git日志查看和版本切换

Git日志查看和版本切换

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