|
|
@@ -509,19 +509,27 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$this->autoPrinter($order->order_id, $order->mer_id, 1);
|
|
|
@file_put_contents('quanju4.txt',"-支付能传到这里吗6\r\n",8);
|
|
|
app()->make(StoreOrderRepository::class)->getOrderAward($order);
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗13\r\n",8);
|
|
|
+
|
|
|
app()->make(StoreOrderRepository::class)->spreadOrder($order['uid'], $order['order_id']); //查找上级是否有冻结份额
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗10\r\n",8);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if ($groupOrder->user && $groupOrder->user->spread_uid) {
|
|
|
Queue::push(UserBrokerageLevelJob::class, ['uid' => $groupOrder->user->spread_uid, 'type' => 'spread_pay_num', 'inc' => 1]);
|
|
|
Queue::push(UserBrokerageLevelJob::class, ['uid' => $groupOrder->user->spread_uid, 'type' => 'spread_money', 'inc' => $groupOrder->pay_price]);
|
|
|
}
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗11\r\n",8);
|
|
|
+
|
|
|
app()->make(UserRepository::class)->update($groupOrder->uid, [
|
|
|
'pay_count' => Db::raw('pay_count+' . count($groupOrder->orderList)),
|
|
|
'pay_price' => Db::raw('pay_price+' . $groupOrder->pay_price),
|
|
|
'svip_save_money' => Db::raw('svip_save_money+' . $svipDiscount),
|
|
|
]);
|
|
|
$this->giveIntegral($groupOrder);
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗12\r\n",8);
|
|
|
+
|
|
|
if (count($profitsharing)) {
|
|
|
$storeOrderProfitsharingRepository->insertAll($profitsharing);
|
|
|
}
|
|
|
@@ -530,11 +538,14 @@ class StoreOrderRepository extends BaseRepository
|
|
|
if (count($groupOrder['give_coupon_ids']) > 0)
|
|
|
$groupOrder['give_coupon_ids'] = app()->make(StoreCouponRepository::class)->getGiveCoupon($groupOrder['give_coupon_ids'])->column('coupon_id');
|
|
|
$groupOrder->save();
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗14\r\n",8);
|
|
|
+
|
|
|
});
|
|
|
//满额分销
|
|
|
if ($groupOrder->user && !$groupOrder->user->is_promoter && systemConfig('promoter_type') == 3) {
|
|
|
app()->make(UserRepository::class)->meetWithPromoter($groupOrder->user->uid);
|
|
|
}
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗15\r\n",8);
|
|
|
|
|
|
if (count($groupOrder['give_coupon_ids']) > 0) {
|
|
|
try {
|
|
|
@@ -1118,7 +1129,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$type = 6;
|
|
|
}
|
|
|
$price = app()->make(AwardIntegralPriceRepository::class)->awardIntegralPrice(); //分红积分价格
|
|
|
- @file_put_contents('quanju.txt', json_encode($price) . "-积分金额1\r\n", 8);
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗15\r\n",8);
|
|
|
// 创建用户账单仓库实例
|
|
|
$make = app()->make(UserBillRepository::class);
|
|
|
$user = User::where('uid', $order['uid'])->find();
|
|
|
@@ -1257,7 +1268,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
// }
|
|
|
// }
|
|
|
//份额和积分变动时触发
|
|
|
- @file_put_contents('quanju.txt', "-村上春树3\r\n", 8);
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗16\r\n",8);
|
|
|
$UserRepository = app()->make(UserRepository::class);
|
|
|
$UserRepository->checkAward($order['uid']);
|
|
|
// 上级推荐奖励的分红积分
|
|
|
@@ -1306,6 +1317,8 @@ class StoreOrderRepository extends BaseRepository
|
|
|
User::where('uid', $user['uid'])->update(['brokerage_price' => $after]);
|
|
|
}
|
|
|
}
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗17\r\n",8);
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -1472,6 +1485,8 @@ class StoreOrderRepository extends BaseRepository
|
|
|
@file_put_contents('quanju2.txt', $order_id . "-没有冻结份额订单id\r\n", 8);
|
|
|
$spread_uid = User::where('uid', $uid)->value('spread_uid');
|
|
|
@file_put_contents('quanju2.txt', $spread_uid . "-上级uid\r\n", 8);
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗17\r\n",8);
|
|
|
+
|
|
|
if ($spread_uid > 0) {
|
|
|
$user = User::where('uid', $spread_uid)->find();
|
|
|
@file_put_contents('quanju2.txt', $user['unclaimed_range'] . "-冻结额度\r\n", 8);
|
|
|
@@ -1501,6 +1516,9 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$UserRepository->extractBrokerage($spread_uid);
|
|
|
}
|
|
|
}
|
|
|
+ @file_put_contents('quanju4.txt',"-支付能传到这里吗18\r\n",8);
|
|
|
+
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
// 分发团队奖励 type 1 节能油 2 礼包
|