初始上传
This commit is contained in:
38
addon/fenxiao/event/OrderCreateAfter.php
Executable file
38
addon/fenxiao/event/OrderCreateAfter.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\fenxiao\event;
|
||||
|
||||
use addon\fenxiao\model\Fenxiao as FenxiaoModel;
|
||||
use app\model\order\OrderCommon;
|
||||
|
||||
/**
|
||||
* 订单创建事件
|
||||
*/
|
||||
class OrderCreateAfter
|
||||
{
|
||||
/**
|
||||
* 订单创建后绑定上下线关系
|
||||
* @param $param
|
||||
* @return array|void
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
$order_info = $param['create_data'] ?? [];
|
||||
if (!empty($order_info)) {
|
||||
$fenxiao_model = new FenxiaoModel();
|
||||
return $fenxiao_model->bindRelation([
|
||||
'site_id' => $order_info[ 'site_id' ],
|
||||
'member_id' => $order_info[ 'member_id' ],
|
||||
'action' => 'order_create',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user