|
|
@@ -85,36 +85,13 @@ class BonusController extends BaseController {
|
|
|
$country = Countries::getById($user['COUNTRY_ID']);
|
|
|
$currency = Currency::getById($country['LOCAL_CURRENCY_ID']);
|
|
|
|
|
|
- // TODO: PRP账户
|
|
|
- $userPerformance = UserPerformance::find()->select('SUM(AMOUNTS) AS AMOUNT_SUM')->where('USER_ID=:USER_ID AND STATUS_ID<(:STATUS_ID)', [':USER_ID' => $user['ID'], ':STATUS_ID' => UserPerformance::FINISHED])->asArray()->one();
|
|
|
- $data['PRP'] = $userPerformance['AMOUNT_SUM'] ?? 0;
|
|
|
+ // PRP账户
|
|
|
+ $userPerformance = UserPerformance::getAmountByUserId($userId);
|
|
|
+ $data['PRP'] = $userPerformance['AMOUNTS'] ?? 0;
|
|
|
|
|
|
$wallet[] = ['walletType' => 'bonus', 'walletName' => Yii::t('app', 'memberBonus'), 'amount' => Tool::formatPrice($data['BONUS'])];//会员奖金
|
|
|
$wallet[] = ['walletType' => 'cash', 'walletName' => Yii::t('app', 'memberEcoin'), 'amount' => Tool::formatPrice($data['CASH']), 'coin' => $currency['CODE']];//会员余额
|
|
|
- $wallet[] = ['walletType' => 'prp', 'walletName' => Yii::t('app', 'memberPrp'), 'amount' => Tool::formatPrice($data['PRP']), 'coin' => $currency['CODE']];//会员余额
|
|
|
-// $wallet[] = ['walletType' => 'point', 'walletName' => '会员积分', 'amount' => Tool::formatPrice($data['RECONSUME_POINTS'])];
|
|
|
-// $wallet[] = ['walletType' => 'exchange', 'walletName' => 'Exchange points', 'amount' => Tool::formatPrice($data['EXCHANGE_POINTS'])];//兑换点数
|
|
|
-// $wallet[] = ['walletType' => 'tourism_points', 'walletName' => 'Travel points', 'amount' => Tool::formatPrice($data['TOURISM_POINTS'])];//旅游积分
|
|
|
-// $wallet[] = ['walletType' => 'garage_points', 'walletName' => Yii::t('app', 'carPoints'), 'amount' => Tool::formatPrice($data['GARAGE_POINTS'])];//车奖积分
|
|
|
-// $wallet[] = ['walletType' => 'villa_points', 'walletName' => Yii::t('app', 'villaPoints'), 'amount' => Tool::formatPrice($data['VILLA_POINTS'])];//房奖积分
|
|
|
-// if ($showCFLX) {
|
|
|
-// $wallet[] = ['walletType' => 'cf', 'walletName' => '福利积分一', 'amount' => Tool::formatPrice($data['CF'])];
|
|
|
-// $wallet[] = ['walletType' => 'lx', 'walletName' => '福利积分二', 'amount' => Tool::formatPrice($data['LX'])];
|
|
|
-// }
|
|
|
- //是否显示报单中心
|
|
|
-// $showBt = true;
|
|
|
-// $showFl = true;
|
|
|
-// $userInfo = User::getEnCodeInfo(\Yii::$app->user->id);
|
|
|
-// if ($userInfo['IS_DEC'] != 1) {
|
|
|
-// $showBt = false;
|
|
|
-// $showFl = false;
|
|
|
-// }else{
|
|
|
-// $sysConfig = Cache::getSystemConfig();
|
|
|
-// if(!$sysConfig['openBT']['VALUE']&&!$sysConfig['openPROD']['VALUE']) $showBt = false;
|
|
|
-// if(!$sysConfig['openFL']['VALUE']) $showFl = false;
|
|
|
-// $decRole = DecRole::find()->where('1=1')->indexBy('ID')->asArray()->all()[$userInfo['DEC_ROLE_ID']];
|
|
|
-// if ($decRole['GOODS_SUBSIDY'] <= 0) $showFl = false;
|
|
|
-// }
|
|
|
+ $wallet[] = ['walletType' => 'prp', 'walletName' => Yii::t('app', 'memberPrp'), 'amount' => Tool::formatPrice($data['PRP']), 'coin' => $currency['CODE']];//绩效奖金
|
|
|
|
|
|
$dealSwitch = isset(Cache::getSystemConfig()['dealSwitch']) ? Cache::getSystemConfig()['dealSwitch']['VALUE'] : '';
|
|
|
|