|
|
@@ -635,15 +635,19 @@ class MerchantService extends BaseService
|
|
|
$this->error = 2404;
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- $userInfo = $this->model->with(['merchant'])
|
|
|
- ->where(['id'=> $userId,'mark'=>1])
|
|
|
- ->select(['id','nickname','usdt','trc_url','pay_password','status'])
|
|
|
+ $merchant = $this->model->with(['member'])->where(['user_id' => $userId, 'mark' => 1])
|
|
|
+ ->select(['id', 'realname', 'mobile', 'usdt', 'quota', 'trade_status', 'status'])
|
|
|
->first();
|
|
|
+
|
|
|
+ $userInfo = $merchant['member'];
|
|
|
$status = isset($userInfo['status'])? $userInfo['status'] : 0;
|
|
|
$userUsdt = isset($userInfo['usdt'])? $userInfo['usdt'] : 0;
|
|
|
- $userPayPassword = isset($userInfo['pay_password'])? $userInfo['pay_password'] : '';
|
|
|
- $merchant = isset($userInfo['merchant'])? $userInfo['merchant'] : [];
|
|
|
+ if(isset($userInfo['pay_password'])){
|
|
|
+ $userPayPassword = $userInfo['pay_password'];
|
|
|
+ }else{
|
|
|
+ $userPayPassword = DB::table('member')->where('id',$userId)->value('pay_password');
|
|
|
+ }
|
|
|
+
|
|
|
$merchantUsdt = isset($merchant['usdt'])? $merchant['usdt'] : 0;
|
|
|
$merchantId = isset($merchant['id'])? $merchant['id'] : 0;
|
|
|
$merchantTradeStatus = isset($merchant['trade_status'])? $merchant['trade_status'] : 0;
|
|
|
@@ -693,7 +697,7 @@ class MerchantService extends BaseService
|
|
|
$realUsdt = moneyFormat($money - $fee, 2);
|
|
|
$data = [
|
|
|
'order_no'=> $orderNo,
|
|
|
- 'user_id'=> $userType==1? $userId : $merchantId,
|
|
|
+ 'user_id'=> $userId,
|
|
|
'type'=> 2,
|
|
|
'user_type'=> $userType,
|
|
|
'coin_type'=> 1,
|