修改处理

This commit is contained in:
邹景立 2021-05-08 15:47:14 +08:00
parent 8faf8827ff
commit 2cdefb1932
2 changed files with 2 additions and 2 deletions

View File

@ -304,7 +304,7 @@ class Order extends Auth
// 读取支付通道配置 // 读取支付通道配置
$query = $this->app->db->name('BaseUserPayment')->where(['status' => 1, 'deleted' => 0]); $query = $this->app->db->name('BaseUserPayment')->where(['status' => 1, 'deleted' => 0]);
$query->whereIn('code', str2arr($payments))->whereIn('type', PaymentService::getTypeApi($this->type)); $query->whereIn('code', str2arr($payments))->whereIn('type', PaymentService::getTypeApi($this->type));
$result = $query->order('sort desc,id desc')->column('type,code,name,cover,content', 'code'); $result = $query->order('sort desc,id desc')->column('type,code,name,cover,content,remark', 'code');
foreach ($result as &$vo) $vo['content'] = ['voucher_qrcode' => json_decode($vo['content'])->voucher_qrcode ?? '']; foreach ($result as &$vo) $vo['content'] = ['voucher_qrcode' => json_decode($vo['content'])->voucher_qrcode ?? ''];
$this->success('获取支付参数数据', array_values($result)); $this->success('获取支付参数数据', array_values($result));
} }

View File

@ -254,7 +254,7 @@ abstract class PaymentService
foreach (self::TYPES as $type => $attr) { foreach (self::TYPES as $type => $attr) {
if (in_array($api, $attr['bind'])) $types[] = $type; if (in_array($api, $attr['bind'])) $types[] = $type;
} }
return $types; return array_unique($types);
} }
/** /**