提现显示问题处理

This commit is contained in:
evoxwht 2023-03-29 10:57:59 +08:00
parent f6de7c1f64
commit f3b3f38e13
3 changed files with 14 additions and 11 deletions

View File

@ -148,11 +148,12 @@ class UserExtractServices extends BaseServices
/**
* 通过提现申请
* @param $id
* @param int $id
* @param $userExtract
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function changeSuccess(int $id, $userExtract)
{
@ -164,11 +165,7 @@ class UserExtractServices extends BaseServices
$userType = $userServices->value(['uid' => $userExtract['uid']], 'user_type');
$nickname = $userServices->value(['uid' => $userExtract['uid']], 'nickname');
$phone = $userServices->value(['uid' => $userExtract['uid']], 'phone');
event('NoticeListener', [['uid' => $userExtract['uid'], 'userType' => strtolower($userType), 'extractNumber' => $extractNumber, 'nickname' => $nickname], 'user_extract']);
if (!$this->dao->update($id, ['status' => 1])) {
throw new AdminException(100007);
}
switch ($userExtract['extract_type']) {
case 'bank':
$order_id = $userExtract['bank_code'];
@ -246,6 +243,12 @@ class UserExtractServices extends BaseServices
'nickname' => $insertData['nickname'],
'phone' => $insertData['phone']
], 'extract');
if (!$this->dao->update($id, ['status' => 1])) {
throw new AdminException(100007);
}
event('NoticeListener', [['uid' => $userExtract['uid'], 'userType' => strtolower($userType), 'extractNumber' => $extractNumber, 'nickname' => $nickname], 'user_extract']);
return true;
}
@ -339,8 +342,10 @@ class UserExtractServices extends BaseServices
/**
* 通过
* @param $id
* @param int $id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
*/
public function adopt(int $id)
{

View File

@ -392,7 +392,7 @@ class WechatService
if ($result->return_code == 'SUCCESS' && $result->result_code != 'FAIL') {
return true;
} else {
throw new ApiException(410089);
throw new ApiException($result->err_code_des ?? 400658);
}
}

View File

@ -146,7 +146,7 @@ class V3WechatPay extends BasePay implements PayInterface
*/
public function merchantPay(string $openid, string $orderId, string $amount, array $options = [])
{
$res = $this->instance->v3pay->setType($options['type'])->batches(
return $this->instance->v3pay->setType($options['type'])->batches(
$orderId,
$amount,
$options['batch_name'],
@ -160,8 +160,6 @@ class V3WechatPay extends BasePay implements PayInterface
]
]
);
return $res;
}
/**