This commit is contained in:
aozhiwei 2023-08-29 11:48:00 +08:00
parent 162210ea2e
commit e2c9db5c2d

View File

@ -223,11 +223,10 @@ class Staking extends BaseModel {
)));*/ )));*/
if ($dto['remain_days'] <= 0 ) { if ($dto['remain_days'] <= 0 ) {
$dto['cec_rewards'] = $dto['daily_rewards'] * $saveDays; $dto['cec_rewards'] = $dto['daily_rewards'] * $saveDays;
$dto['total_rewards'] = $dto['daily_rewards'] * $saveDays;
} else { } else {
$dto['cec_rewards'] = 0; $dto['cec_rewards'] = 0;
$dto['total_rewards'] = $dto['daily_rewards'] * ($saveDays - $passedDays);
} }
$dto['total_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']);
return $dto; return $dto;
} }