feat: 新增分享获得还功能

This commit is contained in:
mkm 2024-07-27 15:23:01 +08:00
parent b141ac8fad
commit 527dd756ec
3 changed files with 14 additions and 10 deletions

View File

@ -611,11 +611,13 @@ class OrderLogic extends BaseLogic
$financeFlowLogic->updateStatusUser($v['id'], $v['other_uid'], $v['number'], $v['order_id']);
}
}
if ($order['spread_uid'] > 0) {
$spread_find = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => 12, 'other_uid' => $order['spread_uid']])->find();
if ($spread_find) {
$financeFlowLogic->updateStatusUser($spread_find['id'], $order['spread_uid'], $spread_find['number'], $order['id']);
}
$spread_find = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => 12, 'other_uid' => $order['spread_uid']])->find();
if ($spread_find) {
$financeFlowLogic->updateStatusUser($spread_find['id'], $order['spread_uid'], $spread_find['number'], $order['id']);
}
$spread_find_two = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => 20])->find();
if ($spread_find_two) {
$financeFlowLogic->updateStatusUser($spread_find_two['id'], $spread_find_two['other_uid'], $spread_find_two['number'], $order['id']);
}
$deposit = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 0, 'financial_type' => 11])->value('number') ?? 0;
$money = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => 2])->value('number') ?? 0;

View File

@ -47,6 +47,7 @@ class OrderEnum
const PURCHASE_FUNDS = 18;//采购款收银
const USER_ORDER_REFUND = 19;//订单返还
const SHARE_ORDER_OBTAINS = 20;//分享获得还
const PAY_BACK =-1;
@ -166,7 +167,8 @@ class OrderEnum
self::ORDER_MARGIN=>'保证金',
self::VIP_ORDER_OBTAINS=>'会员',
self::OTHER_ORDER_OBTAINS=>'其他',
self::USER_ORDER_REFUND=>'订单返还'
self::USER_ORDER_REFUND=>'订单返还',
self::SHARE_ORDER_OBTAINS=>'分享'
];
if ($value === true) {

View File

@ -17,7 +17,7 @@ class CommissionLogic extends BaseLogic
{
self::user($order, 3, $transaction_id, $village_uid, 14); //村长
self::user($order, 0, $transaction_id, 0, 12); //会员、厨师
self::user($order, 5, $transaction_id, 0, 12); //个人店铺
self::user($order, 5, $transaction_id, 0, 20); //个人店铺
self::user($order, 4, $transaction_id, $brigade_uid, 15); //队长
self::platform($order, 2, $transaction_id); //平台
@ -33,7 +33,7 @@ class CommissionLogic extends BaseLogic
{
self::user($order, 4, $transaction_id, $brigade_uid, 15); //队长
self::user($order, 0, $transaction_id, 0, 12); ////会员、厨师
self::user($order, 5, $transaction_id, 0, 12); ////会员、厨师
self::user($order, 5, $transaction_id, 0, 20); ////会员、厨师
self::user($order, 3, $transaction_id, $village_uid, 14); //村长
self::platform($order, 2, $transaction_id); //平台
@ -53,7 +53,7 @@ class CommissionLogic extends BaseLogic
$uid=$order['spread_uid'];
}
self::user($order, 0, $transaction_id, $uid, 12); //会员、厨师
self::user($order, 5, $transaction_id, $uid, 12); //会员、厨师
self::user($order, 5, $transaction_id, $uid, 20); //会员、厨师
self::user($order, 3, $transaction_id, $village_uid, 14); //村长
self::user($order, 4, $transaction_id, $brigade_uid, 15); //队长
self::platform($order, 2, $transaction_id); //平台
@ -74,7 +74,7 @@ class CommissionLogic extends BaseLogic
$uid=$order['spread_uid'];
}
self::user($order, 0, $transaction_id, $uid, 12); //会员、厨师
self::user($order, 5, $transaction_id, $uid, 12); //会员、厨师
self::user($order, 5, $transaction_id, $uid, 20); //会员、厨师
self::user($order, 3, $transaction_id, $village_uid, 14); //村长
self::user($order, 4, $transaction_id, $brigade_uid, 15); //队长
self::platform($order, 2, $transaction_id); //平台