|
@@ -122,7 +122,7 @@ class AwardLake extends BaseModel
|
|
|
if (count($users) <= 0){
|
|
if (count($users) <= 0){
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
- $every = bcdiv($lake['num'], count($users), 2); //每个用户分得的奖励
|
|
|
|
|
|
|
+ $every = bcdiv($lake['num'], count($users), 2); //每个用户分得的奖励金额
|
|
|
if ($every <= 0) {
|
|
if ($every <= 0) {
|
|
|
self::where('id', $lake['id'])->update(['send_time' => time()]);
|
|
self::where('id', $lake['id'])->update(['send_time' => time()]);
|
|
|
return true;
|
|
return true;
|
|
@@ -130,7 +130,7 @@ class AwardLake extends BaseModel
|
|
|
$real_send = 0;
|
|
$real_send = 0;
|
|
|
$price = app()->make(AwardIntegralPriceRepository::class)->awardIntegralPrice(); //分红积分价格
|
|
$price = app()->make(AwardIntegralPriceRepository::class)->awardIntegralPrice(); //分红积分价格
|
|
|
@file_put_contents('quanju.txt',json_encode($price)."-分红积分价格\r\n",8);
|
|
@file_put_contents('quanju.txt',json_encode($price)."-分红积分价格\r\n",8);
|
|
|
- @file_put_contents('quanju.txt',$every."-每个用户分得的积分\r\n",8);
|
|
|
|
|
|
|
+ @file_put_contents('quanju.txt',$every."-每个用户分得的金额\r\n",8);
|
|
|
foreach ($users as $user) {
|
|
foreach ($users as $user) {
|
|
|
//todo 添加用户积分 用户分的奖励除以积分价格就是积分数量
|
|
//todo 添加用户积分 用户分的奖励除以积分价格就是积分数量
|
|
|
$integral = bcdiv($every, $price['price'], 2);
|
|
$integral = bcdiv($every, $price['price'], 2);
|
|
@@ -145,7 +145,7 @@ class AwardLake extends BaseModel
|
|
|
'balance' => $after,
|
|
'balance' => $after,
|
|
|
'status' => 1,
|
|
'status' => 1,
|
|
|
'link_id' => 0,
|
|
'link_id' => 0,
|
|
|
- 'mark' => $user['nickname'] . '获得' .$name.'分红积分'.$award_integral ,
|
|
|
|
|
|
|
+ 'mark' => $user['nickname'] . '获得' .$name.'分红积分'.$integral ,
|
|
|
]);
|
|
]);
|
|
|
User::where('uid', $user['uid'])->update(['award_integral' => $after]);
|
|
User::where('uid', $user['uid'])->update(['award_integral' => $after]);
|
|
|
|
|
|