|
@@ -218,11 +218,16 @@ class UserMiningMachine extends BaseModel
|
|
if (!$ratio) $ratio = MiningMachine::where('id', $mid)->value('service_ratio');
|
|
if (!$ratio) $ratio = MiningMachine::where('id', $mid)->value('service_ratio');
|
|
$num = bcdiv($num, bcsub(1, bcdiv($ratio, 100, 4), 4));
|
|
$num = bcdiv($num, bcsub(1, bcdiv($ratio, 100, 4), 4));
|
|
$res = true;
|
|
$res = true;
|
|
|
|
+ var_dump($ratio);
|
|
|
|
+ var_dump($num);
|
|
|
|
+ var_dump($user);
|
|
|
|
+ var_dump($spread);
|
|
// $send = 0;
|
|
// $send = 0;
|
|
$v = 0;
|
|
$v = 0;
|
|
while ($spread) {
|
|
while ($spread) {
|
|
$ratio2 = UserMiningService::where('uid', $spread['uid'])->where('mid', $mid)->value('ratio');
|
|
$ratio2 = UserMiningService::where('uid', $spread['uid'])->where('mid', $mid)->value('ratio');
|
|
if (!$ratio2) $ratio2 = MiningMachine::where('id', $mid)->value('service_ratio');
|
|
if (!$ratio2) $ratio2 = MiningMachine::where('id', $mid)->value('service_ratio');
|
|
|
|
+ var_dump($ratio2);
|
|
if ($ratio2 >= $ratio) {
|
|
if ($ratio2 >= $ratio) {
|
|
$spread = User::getUserInfo($spread['spread_uid']);
|
|
$spread = User::getUserInfo($spread['spread_uid']);
|
|
} else {
|
|
} else {
|