|
|
@@ -142,7 +142,7 @@ class PriceService extends BaseService
|
|
|
$lastPrice = $this->getTodayPrice($type);
|
|
|
|
|
|
// 昨日全网资产
|
|
|
- $lastPropertyTotal = isset($ptAccount['last_property'])?$ptAccount['last_property']:0;
|
|
|
+ $lastProperty = isset($ptAccount['last_property'])?$ptAccount['last_property']:0;
|
|
|
$ptProperty = isset($ptAccount['property'])?$ptAccount['property']:0; // 平台初始资产
|
|
|
|
|
|
// 今日新增资产
|
|
|
@@ -150,7 +150,8 @@ class PriceService extends BaseService
|
|
|
$todayProperty = AccountLogModel::where(['date'=>$date,'type'=>8,'account_type'=>2,'mark'=>1])->sum('money');
|
|
|
if($todayProperty>=0){
|
|
|
// 当日全网资产衰减后
|
|
|
- $propertyTotalByReduce = moneyFormat($lastPropertyTotal * 0.99,6);
|
|
|
+ $lastProperty = $lastProperty?$lastProperty:$ptProperty;
|
|
|
+ $propertyTotalByReduce = moneyFormat($lastProperty * 0.99,6);
|
|
|
|
|
|
// 当日全网总资产
|
|
|
$todayPropertyTotal = moneyFormat($propertyTotalByReduce + $todayProperty, 6);
|
|
|
@@ -173,7 +174,7 @@ class PriceService extends BaseService
|
|
|
'last_price'=> isset($lastPriceData['price'])?$lastPriceData['price'] : 0,
|
|
|
'pool_total'=>$poolTotal,
|
|
|
'today_pool'=>$todayPoolTotal,
|
|
|
- 'last_property'=>$lastPropertyTotal,
|
|
|
+ 'last_property'=>$lastProperty,
|
|
|
'today_property'=>$todayProperty,
|
|
|
'property_total'=>$todayPropertyTotal,
|
|
|
'date'=>$date,
|
|
|
@@ -190,7 +191,7 @@ class PriceService extends BaseService
|
|
|
|
|
|
$updateData = [
|
|
|
'property_price'=> $price,
|
|
|
- 'last_property'=> $lastPropertyTotal,
|
|
|
+ 'last_property'=> $todayPropertyTotal,
|
|
|
'today_property'=> 0,
|
|
|
'today_pool'=> 0,
|
|
|
'update_time'=>time()
|