|
|
@@ -1081,6 +1081,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
// 订单赠送的分红额度和积分处理还是礼包购买数处理,顺便检测升级
|
|
|
@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['id']); //查找上级是否有冻结份额
|
|
|
}
|
|
|
|
|
|
@@ -1123,9 +1124,11 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$number2 = systemConfig('award_integral_gift_pack', 1);
|
|
|
}
|
|
|
if ($type == 5||$type == 0) { //节能油商品和普通商品
|
|
|
+ @file_put_contents('quanju.txt', "-测试3\r\n", 8);
|
|
|
$number = systemConfig('award_energy_saving_oil', 1); //获得份额的基准线
|
|
|
if ($order['pay_price'] >= $number) {
|
|
|
$count = app()->make(User::class)->spread_order($order['uid']); //获取推荐下级订单数
|
|
|
+ @file_put_contents('quanju.txt', $count."-测试4\r\n", 8);
|
|
|
if ($count>0){
|
|
|
$order_award_range = bcmul($order['pay_price'], 3, 2);
|
|
|
}else{
|
|
|
@@ -1141,6 +1144,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
'link_id' => $order['order_id'],
|
|
|
'mark' => $user['nickname'] . '成功消费' .$mark.'商品'. floatval($order['pay_price']) . '元,奖励冻结分红额度' . $order_award_range,
|
|
|
]);
|
|
|
+
|
|
|
User::where('uid', $order['uid'])->update(['unclaimed_range' => $unclaimed_range_after]);
|
|
|
}
|
|
|
// 发放分红份额
|