diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 77353be0..59e2cfee 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -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; diff --git a/app/common/enum/OrderEnum.php b/app/common/enum/OrderEnum.php index 6674b96a..156e2f14 100644 --- a/app/common/enum/OrderEnum.php +++ b/app/common/enum/OrderEnum.php @@ -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) { diff --git a/app/common/logic/CommissionLogic.php b/app/common/logic/CommissionLogic.php index 31403537..fc4936ec 100644 --- a/app/common/logic/CommissionLogic.php +++ b/app/common/logic/CommissionLogic.php @@ -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); //平台