|
|
@@ -54,24 +54,34 @@ class UserModel extends BaseModel
|
|
|
$info['gender_name'] = config('admin.gender_list')[$info['gender']];
|
|
|
}
|
|
|
|
|
|
- // 账户和钱包地址
|
|
|
+ // 交易员承兑商账户和钱包地址
|
|
|
$userId = isset($info['user_id'])? $info['user_id'] : 0;
|
|
|
- $memberInfo = $userId? MemberService::make()->getInfo($userId) : [];
|
|
|
- $info['usdt_num'] = isset($memberInfo['usdt_num'])? floatval($memberInfo['usdt_num']) : '0.00';
|
|
|
- $info['trc_address'] = isset($memberInfo['trc_address'])? trim($memberInfo['trc_address']) : '';
|
|
|
- $info['erc_hexaddress'] = isset($memberInfo['erc_hexaddress'])? trim($memberInfo['erc_hexaddress']) : '';
|
|
|
- $info['credit'] = isset($memberInfo['credit'])? intval($memberInfo['credit']) : 0;
|
|
|
- $info['exception_num'] = isset($memberInfo['exception_num'])? intval($memberInfo['exception_num']) : 0;
|
|
|
+ $userType = isset($info['user_type'])? $info['user_type'] : 0;
|
|
|
+ if($userType == 2){
|
|
|
+ $memberInfo = $userId? MemberService::make()->getInfo($userId) : [];
|
|
|
+ $info['usdt_num'] = isset($memberInfo['usdt_num'])? floatval($memberInfo['usdt_num']) : '0.00';
|
|
|
+ $info['trc_address'] = isset($memberInfo['trc_address'])? trim($memberInfo['trc_address']) : '';
|
|
|
+ $info['erc_hexaddress'] = isset($memberInfo['erc_hexaddress'])? trim($memberInfo['erc_hexaddress']) : '';
|
|
|
+ $info['credit'] = isset($memberInfo['credit'])? intval($memberInfo['credit']) : 0;
|
|
|
+ $info['exception_num'] = isset($memberInfo['exception_num'])? intval($memberInfo['exception_num']) : 0;
|
|
|
+
|
|
|
+ // 钱包余额
|
|
|
+ $info['trc_num'] = '0.00';
|
|
|
+ $info['trc_usdt_num'] = '0.00';
|
|
|
+ $info['erc_num'] = '0.00';
|
|
|
+ $info['erc_usdt_num'] = '0.00';
|
|
|
+ if($memberInfo){
|
|
|
+ $trcNum = UsdtWalletService::make()->getTrxBalance($memberInfo['trc_address']);
|
|
|
+ $info['trc_num'] = floatval($trcNum);
|
|
|
+ $trcUsdtNum = UsdtWalletService::make()->getTrc20Usdt($memberInfo['trc_address']);
|
|
|
+ $info['trc_usdt_num'] = floatval($trcUsdtNum);
|
|
|
+ $ercNum = UsdtWalletService::make()->getErcBalance($memberInfo['erc_hexaddress']);
|
|
|
+ $info['erc_num'] = floatval($ercNum);
|
|
|
+ $ercUsdtNum = UsdtWalletService::make()->getErc20Usdt($memberInfo['erc_hexaddress']);
|
|
|
+ $info['erc_usdt_num'] = floatval($ercUsdtNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // 钱包余额
|
|
|
- $trcNum = UsdtWalletService::make()->getTrxBalance($memberInfo['trc_address']);
|
|
|
- $info['trc_num'] = floatval($trcNum);
|
|
|
- $trcUsdtNum = UsdtWalletService::make()->getTrc20Usdt($memberInfo['trc_address']);
|
|
|
- $info['trc_usdt_num'] = floatval($trcUsdtNum);
|
|
|
- $ercNum = UsdtWalletService::make()->getErcBalance($memberInfo['erc_hexaddress']);
|
|
|
- $info['erc_num'] = floatval($ercNum);
|
|
|
- $ercUsdtNum = UsdtWalletService::make()->getErc20Usdt($memberInfo['erc_hexaddress']);
|
|
|
- $info['erc_usdt_num'] = floatval($ercUsdtNum);
|
|
|
|
|
|
// 获取用户角色列表
|
|
|
$userRoleService = new UserRoleService();
|