|
|
@@ -17,6 +17,8 @@ use common\helpers\user\Balance;
|
|
|
use common\helpers\user\Info;
|
|
|
use common\helpers\user\Reconsume;
|
|
|
use common\libs\api\sms\SmsApi;
|
|
|
+use common\models\Countries;
|
|
|
+use common\models\CurrencyConversions;
|
|
|
use common\models\DealType;
|
|
|
use common\models\EliteLevel;
|
|
|
use common\models\FlowRemainPv;
|
|
|
@@ -339,7 +341,15 @@ class BonusSend extends BaseObject {
|
|
|
|
|
|
// 绩效奖金发放
|
|
|
if ($data['BONUS_PB'] > 0) {
|
|
|
- UserPerformance::sentUserPerformance($data['USER_ID'], $data['BONUS_PB'], $data['PERIOD_NUM']);
|
|
|
+ // 汇率
|
|
|
+ $countryId = User::getEnCodeInfo($data['USER_ID'])['COUNTRY_ID'];
|
|
|
+ $currencyId = Countries::getById($countryId)['LOCAL_CURRENCY_ID'];
|
|
|
+ $bonusConversions = CurrencyConversions::getToUSDRate($currencyId, 'bonus');
|
|
|
+
|
|
|
+ // 奖金转化为会员所在国家汇率后进行发放
|
|
|
+ $localAmount = $data['BONUS_PB'] * $bonusConversions;
|
|
|
+ // 奖金发放
|
|
|
+ UserPerformance::sentUserPerformance($data['USER_ID'], $localAmount, $data['PERIOD_NUM']);
|
|
|
}
|
|
|
|
|
|
// 把记录标记为已发放状态
|