This commit is contained in:
aozhiwei 2023-08-30 15:13:24 +08:00
parent 9490ed4632
commit cec26567d4

View File

@ -52,6 +52,9 @@ class Staking extends BaseModel {
public static function getStakingTotalValue() public static function getStakingTotalValue()
{ {
if (SERVER_ENV != _ONLINE) {
myself()->_setTimeOffset(3600 * 24 * 31);
}
$totalValue = 0; $totalValue = 0;
$rows = self::all(myself()->_getAddress()); $rows = self::all(myself()->_getAddress());
foreach ($rows as $row) { foreach ($rows as $row) {
@ -59,6 +62,7 @@ class Staking extends BaseModel {
if ($stakingDto['status'] == self::STAKING_STATUS) { if ($stakingDto['status'] == self::STAKING_STATUS) {
if ($stakingDto['remain_days'] > 0) { if ($stakingDto['remain_days'] > 0) {
$totalValue += $stakingDto['cec_value']; $totalValue += $stakingDto['cec_value'];
} else {
} }
} }
} }