feat: 更新订单逻辑增加状态查询
This commit is contained in:
parent
18c58f58f5
commit
f464c497ab
@ -617,19 +617,15 @@ class OrderLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
$financeFlowLogic = new StoreFinanceFlowLogic();
|
$financeFlowLogic = new StoreFinanceFlowLogic();
|
||||||
//other_uid大于0的
|
//other_uid大于0的
|
||||||
$select_1 = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1])->where('other_uid','>',0)->select();
|
$select_1 = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1,'status'=>0])->where('other_uid','>',0)->select();
|
||||||
foreach ($select_1 as $k => $v) {
|
foreach ($select_1 as $k => $v) {
|
||||||
if ($v['other_uid'] > 0) {
|
if ($v['other_uid'] > 0) {
|
||||||
$financeFlowLogic->updateStatusUser($v['id'], $v['other_uid'], $v['number'], $v['order_id']);
|
$financeFlowLogic->updateStatusUser($v['id'], $v['other_uid'], $v['number'], $v['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']);
|
|
||||||
// }
|
|
||||||
|
|
||||||
$deposit = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 0, 'financial_type' => 11])->value('number') ?? 0;
|
$deposit = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 0, 'financial_type' => 11,'status'=>0])->value('number') ?? 0;
|
||||||
$money = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => 2])->value('number') ?? 0;
|
$money = $financeFlow->where(['order_id' => $order['id'], 'financial_pm' => 1, 'financial_type' => 2,'status'=>0])->value('number') ?? 0;
|
||||||
$financeFlowLogic->updateStatusStore($order['id'], $order['store_id'], $money, $deposit);
|
$financeFlowLogic->updateStatusStore($order['id'], $order['store_id'], $money, $deposit);
|
||||||
//积分结算
|
//积分结算
|
||||||
if ($order['is_storage'] == 0 && $order['source'] == 0) {
|
if ($order['is_storage'] == 0 && $order['source'] == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user