|
|
@@ -1463,6 +1463,7 @@ class StoreOrderRepository extends BaseRepository
|
|
1463
|
1463
|
// Db::name('log')->insert(['data'=>json_encode($groupOrder)]);
|
|
1464
|
1464
|
//修改订单状态
|
|
1465
|
1465
|
|
|
|
1466
|
+ Db::startTrans();
|
|
1466
|
1467
|
try {
|
|
1467
|
1468
|
|
|
1468
|
1469
|
// Db::name('log')->insert(['data'=>json_encode($groupOrder)]);
|
|
|
@@ -1506,8 +1507,8 @@ class StoreOrderRepository extends BaseRepository
|
|
1506
|
1507
|
$order->save();
|
|
1507
|
1508
|
|
|
1508
|
1509
|
//增加消费分
|
|
1509
|
|
- $merchantRepository = app()->make(m::class);
|
|
1510
|
|
- $merchantRepository->consumptionScoreLog($order->mer_id, 0, $order->pay_price, '用户app消费', 0, 1, $order->order_id, 0);
|
|
|
1510
|
+// $merchantRepository = app()->make(m::class);
|
|
|
1511
|
+// $merchantRepository->consumptionScoreLog($order->mer_id, 0, $order->pay_price, '用户app消费', 0, 1, $order->order_id, 0);
|
|
1511
|
1512
|
|
|
1512
|
1513
|
$orderStatus[] = [
|
|
1513
|
1514
|
'order_id' => $order->order_id,
|
|
|
@@ -1627,7 +1628,7 @@ class StoreOrderRepository extends BaseRepository
|
|
1627
|
1628
|
$financialRecordRepository->insertAll($finance);
|
|
1628
|
1629
|
app()->make(StoreOrderStatusRepository::class)->insertAll($orderStatus);
|
|
1629
|
1630
|
$groupOrder->save();
|
|
1630
|
|
-
|
|
|
1631
|
+ Db::commit();
|
|
1631
|
1632
|
} catch (\Exception $exception) {
|
|
1632
|
1633
|
// 回滚事务
|
|
1633
|
1634
|
Db::rollback();
|
|
|
@@ -10619,22 +10620,22 @@ class StoreOrderRepository extends BaseRepository
|
|
10619
|
10620
|
*/
|
|
10620
|
10621
|
private function recordIndependentAccount($member_id, $platform_member_id, $group_order, $requestId, $merchant_profit, $platform_profit)
|
|
10621
|
10622
|
{
|
|
10622
|
|
- $insertData = [
|
|
10623
|
|
- [
|
|
|
10623
|
+ $insertData[] = [
|
|
10624
|
10624
|
'mid' => $member_id,
|
|
10625
|
10625
|
'requestId' => $requestId,
|
|
10626
|
10626
|
'group_order_id' => $group_order['group_order_sn'],
|
|
10627
|
10627
|
'splitAmount' => $merchant_profit,
|
|
10628
|
10628
|
'status' => 0
|
|
10629
|
|
- ],
|
|
10630
|
|
- [
|
|
10631
|
|
- 'mid' => $platform_member_id,
|
|
10632
|
|
- 'requestId' => $requestId,
|
|
10633
|
|
- 'group_order_id' => $group_order['group_order_sn'],
|
|
10634
|
|
- 'splitAmount' => $platform_profit,
|
|
10635
|
|
- 'status' => 0
|
|
10636
|
|
- ],
|
|
10637
|
10629
|
];
|
|
|
10630
|
+ if ($platform_member_id){
|
|
|
10631
|
+ $insertData[] = [
|
|
|
10632
|
+ 'mid' => $platform_member_id,
|
|
|
10633
|
+ 'requestId' => $requestId,
|
|
|
10634
|
+ 'group_order_id' => $group_order['group_order_sn'],
|
|
|
10635
|
+ 'splitAmount' => $platform_profit,
|
|
|
10636
|
+ 'status' => 0
|
|
|
10637
|
+ ];
|
|
|
10638
|
+ }
|
|
10638
|
10639
|
Db::name("store_split_order")->insertAll($insertData);
|
|
10639
|
10640
|
}
|
|
10640
|
10641
|
|