|
|
@@ -1247,16 +1247,21 @@ class StoreOrderRepository extends BaseRepository
|
|
|
if ($type==5){
|
|
|
$oil = app()->make(OilLevel::class);
|
|
|
$oil->checkLevel($order['uid']);
|
|
|
+ @file_put_contents('quanju2.txt', "-路径检查1\r\n", 8);
|
|
|
$ratio = systemConfig('energy_saving_oil_ratio', 10);
|
|
|
$jackpot = bcmul($order['pay_price'], $ratio, 2);
|
|
|
$awardLake->addOrderLakes(1,$jackpot,$order['order_id']);
|
|
|
+ @file_put_contents('quanju2.txt', "-路径检查3\r\n", 8);
|
|
|
}elseif ($type==6){
|
|
|
$gift = app()->make(GiftLevel::class);
|
|
|
$gift->checkLevel($order['uid']);
|
|
|
+ @file_put_contents('quanju2.txt', "-路径检查2\r\n", 8);
|
|
|
$ratio = systemConfig('gift_pack_ratio', 10);
|
|
|
$jackpot = bcmul($order['pay_price'], $ratio, 2);
|
|
|
$awardLake->addOrderLakes(2,$jackpot,$order['order_id']);
|
|
|
+ @file_put_contents('quanju2.txt', "-路径检查4\r\n", 8);
|
|
|
}
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
//礼包购买数
|
|
|
@@ -1265,6 +1270,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
// 增加礼包购买数
|
|
|
$pack_count = User::where('uid', $uid)->value('pack_count');
|
|
|
User::where('uid', $uid)->update(['pack_count' => bcadd($pack_count,1,0)]);
|
|
|
+ return true;
|
|
|
}
|
|
|
// 上级推荐奖励的分红积分
|
|
|
public function getSpreadIntegral($order, $type,$user)
|