添加购物卡自动发货
This commit is contained in:
parent
61b141c33c
commit
fecac3d818
@ -361,6 +361,19 @@ class StoreOrderRepository extends BaseRepository
|
||||
// "惠农供销,谱写数字新篇章"活动首单分润,商户和村、小组合伙人
|
||||
$financeDao = (new CommissionDao())->firstOrderCommission($order, $financeDao);
|
||||
}
|
||||
|
||||
//判断是否是平台购物卡
|
||||
$merchantCate = $order->orderProduct[0]->product->merCateId;
|
||||
if (!empty($merchantCate) && in_array(env('PLATFORM_CARD_CATE_ID'), array_column($merchantCate->toArray(), 'mer_cate_id'))) {
|
||||
//购物卡自动发货
|
||||
$deliveryData = [
|
||||
'delivery_type' => 3,
|
||||
'remark' => '',
|
||||
'delivery_name' => '',
|
||||
'delivery_id' => '',
|
||||
];
|
||||
$this->runDelivery($order['order_id'], $order['mer_id'], $deliveryData, ['is_split' => 0, 'split' => []], 'delivery');
|
||||
}
|
||||
}
|
||||
//分销判断
|
||||
// if ($groupOrder->user->spread_uid) {
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
namespace crmeb\listens;
|
||||
|
||||
use app\common\dao\store\consumption\StoreConsumptionDao;
|
||||
use app\common\dao\store\consumption\StoreConsumptionUserDao;
|
||||
use app\common\model\store\consumption\StoreConsumption;
|
||||
use app\common\model\store\consumption\StoreConsumptionUser;
|
||||
use app\common\repositories\store\coupon\StoreCouponRepository;
|
||||
use app\common\repositories\store\coupon\StoreCouponUserRepository;
|
||||
use crmeb\interfaces\ListenerInterface;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user