调试平台手续费分润退款
This commit is contained in:
parent
f397a84949
commit
8e27d4bd39
@ -66,6 +66,7 @@ return [
|
|||||||
'order.paySuccessOrder'=>[\app\listener\paySuccessOrder::class],
|
'order.paySuccessOrder'=>[\app\listener\paySuccessOrder::class],
|
||||||
'product.create'=>[\app\listener\ProductCreate::class],
|
'product.create'=>[\app\listener\ProductCreate::class],
|
||||||
'product.sell'=>[\app\listener\CloudProduct::class], //商品上下架
|
'product.sell'=>[\app\listener\CloudProduct::class], //商品上下架
|
||||||
|
'refund.after'=>[\app\listener\AfterRefund::class],
|
||||||
],
|
],
|
||||||
|
|
||||||
'subscribe' => [],
|
'subscribe' => [],
|
||||||
|
@ -30,7 +30,7 @@ class AfterRefund
|
|||||||
}
|
}
|
||||||
if ($financialRecord['financial_type'] == 'auto_margin') {
|
if ($financialRecord['financial_type'] == 'auto_margin') {
|
||||||
//佣金类型的扣除保证金
|
//佣金类型的扣除保证金
|
||||||
ServeOrder::getInstance()->where('id', $financialRecord['order_id'])->update(['is_del' => 1]);
|
ServeOrder::getInstance()->where('store_order_id', $financialRecord['order_id'])->update(['is_del' => 1]);
|
||||||
$merchant = app()->make(MerchantDao::class)->get($financialRecord['mer_id']);
|
$merchant = app()->make(MerchantDao::class)->get($financialRecord['mer_id']);
|
||||||
$merchant->paid_margin = max(bcsub($merchant['paid_margin'], $financialRecord['number'], 2), 0);
|
$merchant->paid_margin = max(bcsub($merchant['paid_margin'], $financialRecord['number'], 2), 0);
|
||||||
$merchant->ot_margin = $merchant->paid_margin;
|
$merchant->ot_margin = $merchant->paid_margin;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user