|
@@ -499,6 +499,9 @@ class StoreOrderRepository extends BaseRepository
|
|
|
}
|
|
}
|
|
|
//自动打印订单
|
|
//自动打印订单
|
|
|
$this->autoPrinter($order->order_id, $order->mer_id, 1);
|
|
$this->autoPrinter($order->order_id, $order->mer_id, 1);
|
|
|
|
|
+ @file_put_contents('quanju.txt', "-支付完成处理积分\r\n", 8);
|
|
|
|
|
+ app()->make(StoreOrderRepository::class)->getOrderAward($order);
|
|
|
|
|
+ app()->make(StoreOrderRepository::class)->spreadOrder($order['uid'],$order['order_id']); //查找上级是否有冻结份额
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($groupOrder->user && $groupOrder->user->spread_uid) {
|
|
if ($groupOrder->user && $groupOrder->user->spread_uid) {
|
|
@@ -1079,10 +1082,10 @@ class StoreOrderRepository extends BaseRepository
|
|
|
// 触发订单领取后的事件。
|
|
// 触发订单领取后的事件。
|
|
|
event('order.take', compact('order'));
|
|
event('order.take', compact('order'));
|
|
|
// 订单赠送的分红额度和积分处理还是礼包购买数处理,顺便检测升级
|
|
// 订单赠送的分红额度和积分处理还是礼包购买数处理,顺便检测升级
|
|
|
- @file_put_contents('quanju.txt', "-测试2\r\n", 8);
|
|
|
|
|
- $this->spreadOrder($order['uid'],$order['order_id']); //查找上级是否有冻结份额
|
|
|
|
|
- @file_put_contents('quanju.txt', "-村上春树1\r\n", 8);
|
|
|
|
|
- $this->getOrderAward($order); //订单收货赠送分红额度等等
|
|
|
|
|
|
|
+// @file_put_contents('quanju.txt', "-测试2\r\n", 8);
|
|
|
|
|
+// $this->spreadOrder($order['uid'],$order['order_id']); //查找上级是否有冻结份额
|
|
|
|
|
+// @file_put_contents('quanju.txt', "-村上春树1\r\n", 8);
|
|
|
|
|
+// $this->getOrderAward($order); //订单收货赠送分红额度等等
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 订单收货赠送分红额度
|
|
// 订单收货赠送分红额度
|
|
@@ -1283,7 +1286,10 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$order_award_range=0;
|
|
$order_award_range=0;
|
|
|
if ($user['spread_uid']>0){
|
|
if ($user['spread_uid']>0){
|
|
|
$make = app()->make(UserBillRepository::class);
|
|
$make = app()->make(UserBillRepository::class);
|
|
|
-
|
|
|
|
|
|
|
+ $award_range = User::where('uid', $user['spread_uid'])->value('award_range');
|
|
|
|
|
+ if ($award_range<=0){ //上级没有分红额度就不发放分红积分
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
switch ($type) {
|
|
switch ($type) {
|
|
|
case 0: //普通商品
|
|
case 0: //普通商品
|
|
|
$award_integral = User::where('uid',$user['spread_uid'])->value('award_integral');
|
|
$award_integral = User::where('uid',$user['spread_uid'])->value('award_integral');
|