|
|
@@ -64,10 +64,10 @@ class Order extends Api
|
|
|
//直推收益: pv* ×10%
|
|
|
if($order_info['pv'] > 0 && $this->auth->parent_id > 0 && $userModel::getUserRwaNum($this->auth->parent_id) > 0){
|
|
|
$pv = bcmul(($order_info['pv'] * $areaNum), getConfig('pv_rate'), 2);
|
|
|
- $ledgerWalletModel->changeWalletAccount($this->auth->parent_id, Asset::TOKEN, $pv, $ledgerWalletModel::Direct, $this->auth->id);
|
|
|
+ if($pv > 0) $ledgerWalletModel->changeWalletAccount($this->auth->parent_id, Asset::TOKEN, $pv, $ledgerWalletModel::Direct, $this->auth->id);
|
|
|
//社区奖励
|
|
|
$pvs = bcmul(($order_info['pv'] * $areaNum), config('community_ratio'), 2);
|
|
|
- $userModel::setCommunityRewards($this->auth->id, $pvs, Asset::TOKEN);
|
|
|
+ if($pvs > 0)$userModel::setCommunityRewards($this->auth->id, $pvs, Asset::TOKEN);
|
|
|
}
|
|
|
|
|
|
//更新Rwa持有数量
|