|
|
@@ -136,6 +136,8 @@ class PriceService extends BaseService
|
|
|
$accountId = PtAccountModel::insertGetId($ptAccount);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// 昨日价格
|
|
|
$lastPrice = $this->getTodayPrice($type);
|
|
|
|
|
|
@@ -146,7 +148,7 @@ class PriceService extends BaseService
|
|
|
// 今日新增资产
|
|
|
$todayPropertyTotal = 0;
|
|
|
$todayProperty = AccountLogModel::where(['date'=>$date,'type'=>8,'account_type'=>2,'mark'=>1])->sum('money');
|
|
|
- if($todayProperty>=0 && $lastPropertyTotal>0){
|
|
|
+ if($todayProperty>=0){
|
|
|
// 当日全网资产衰减后
|
|
|
$propertyTotalByReduce = moneyFormat($lastPropertyTotal * 0.99,6);
|
|
|
|
|
|
@@ -206,6 +208,9 @@ class PriceService extends BaseService
|
|
|
RedisService::clear("caches:prices:data_{$type}_{$date}");
|
|
|
$this->error = '更新资产价格成功';
|
|
|
return ['date'=>$date,'price'=>$price,'pool_total'=>$poolTotal,'property'=>$todayPropertyTotal];
|
|
|
+ }else{
|
|
|
+ $this->error = '今日资产价格无需更新';
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
|