微调
This commit is contained in:
@@ -7,6 +7,8 @@ use App\Admin\Actions\User\Profit;
|
|||||||
use App\Admin\Actions\User\ReCode;
|
use App\Admin\Actions\User\ReCode;
|
||||||
use App\Admin\Actions\User\RefD3Key;
|
use App\Admin\Actions\User\RefD3Key;
|
||||||
use App\Admin\Exporters\UsersExport;
|
use App\Admin\Exporters\UsersExport;
|
||||||
|
use App\Admin\Renderable\Unionpay\InData;
|
||||||
|
use App\Admin\Renderable\Unionpay\OutData;
|
||||||
use App\Models\Area;
|
use App\Models\Area;
|
||||||
use App\Models\UnionpayLog;
|
use App\Models\UnionpayLog;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
@@ -52,42 +54,30 @@ class IndexController extends AdminController
|
|||||||
->using(config('unionpay.type'))
|
->using(config('unionpay.type'))
|
||||||
->label();
|
->label();
|
||||||
|
|
||||||
$grid->column('msg_crrltn_id', '消息关联号');
|
// $grid->column('msg_crrltn_id', '消息关联号');
|
||||||
$grid->column('msg_time', '报文日期');
|
$grid->column('msg_time', '报文日期');
|
||||||
$grid->column('mkt_code', '券码');
|
$grid->column('mkt_code', '券码');
|
||||||
$grid->column('msg_sys_sn', '平台流水号');
|
$grid->column('msg_sys_sn', '平台流水号');
|
||||||
$grid->column('req_serial_no', '查询流水号');
|
$grid->column('req_serial_no', '流水号');
|
||||||
|
$grid->column('orig_req_serial_no', '原流水号');
|
||||||
$grid->column('status', '状态')
|
$grid->column('status', '状态')
|
||||||
->using(UnionpayLog::STATUS)
|
->using(UnionpayLog::STATUS)
|
||||||
->label();
|
->label([
|
||||||
|
0 => 'success',
|
||||||
|
1 => 'warning',
|
||||||
|
]);
|
||||||
|
|
||||||
// $grid->column('请求参数')->display(function ($title, $column) {
|
$grid->column('in_source', '请求参数')
|
||||||
// return '点击展开';
|
->display(function ($title, $column) {
|
||||||
// })->modal(function ($model) {
|
return '点击展开';
|
||||||
// $in_source = $this->in_source;
|
})->modal(InData::class);
|
||||||
// if (is_array($in_source) && count($in_source) > 1) {
|
|
||||||
// foreach ($in_source as $key => $item) {
|
|
||||||
// dump($this->id);
|
|
||||||
// $title[] = $key;
|
|
||||||
// $data[] = $item;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return new Table($title, $data);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
$grid->column('请求参数')->display(function () {
|
$grid->column('out_source', '返回参数')
|
||||||
$in_source = $this->in_source;
|
->display(function ($title, $column) {
|
||||||
|
return '点击展开';
|
||||||
return $in_source;
|
})->modal(OutData::class);
|
||||||
})->hide();
|
|
||||||
|
|
||||||
$grid->column('返回信息')->display(function () {
|
|
||||||
$out_source = $this->out_source;
|
|
||||||
|
|
||||||
return $out_source;
|
|
||||||
})->hide();
|
|
||||||
|
|
||||||
|
// $grid->column('sett_date', '清算日期');
|
||||||
$grid->column('created_at', '注册时间');
|
$grid->column('created_at', '注册时间');
|
||||||
$grid->disableExport(false);
|
$grid->disableExport(false);
|
||||||
|
|
||||||
|
|||||||
26
app/Admin/Renderable/Unionpay/InData.php
Normal file
26
app/Admin/Renderable/Unionpay/InData.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Admin\Renderable\Unionpay;
|
||||||
|
|
||||||
|
use App\Models\UnionpayLog;
|
||||||
|
use App\Models\User;
|
||||||
|
use Encore\Admin\Widgets\Table;
|
||||||
|
use Illuminate\Contracts\Support\Renderable;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class InData implements Renderable
|
||||||
|
{
|
||||||
|
|
||||||
|
public function render($key = null)
|
||||||
|
{
|
||||||
|
$log = UnionpayLog::find($key);
|
||||||
|
$in_source = $log->in_source;
|
||||||
|
|
||||||
|
if (is_array($in_source) && count($in_source) > 1) {
|
||||||
|
$table = new Table(['名称', '值'], $in_source, ['panel', ' panel-default']);
|
||||||
|
|
||||||
|
return $table->render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
25
app/Admin/Renderable/Unionpay/OutData.php
Normal file
25
app/Admin/Renderable/Unionpay/OutData.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Admin\Renderable\Unionpay;
|
||||||
|
|
||||||
|
use App\Models\UnionpayLog;
|
||||||
|
use Encore\Admin\Widgets\Table;
|
||||||
|
use Illuminate\Contracts\Support\Renderable;
|
||||||
|
|
||||||
|
class OutData implements Renderable
|
||||||
|
{
|
||||||
|
|
||||||
|
public function render($key = null)
|
||||||
|
{
|
||||||
|
$log = UnionpayLog::find($key);
|
||||||
|
$out_source = $log->out_source;
|
||||||
|
|
||||||
|
if (is_array($out_source) && count($out_source) > 1) {
|
||||||
|
unset($out_source['sign']);
|
||||||
|
$table = new Table(['名称', '值'], $out_source, ['panel ', 'panel-success']);
|
||||||
|
|
||||||
|
return $table->render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -103,7 +103,7 @@ return [
|
|||||||
"msg_type",
|
"msg_type",
|
||||||
"msg_txn_code",
|
"msg_txn_code",
|
||||||
"msg_crrltn_id",
|
"msg_crrltn_id",
|
||||||
"msg_flg",
|
// "msg_flg",
|
||||||
"msg_sender",
|
"msg_sender",
|
||||||
"msg_time",
|
"msg_time",
|
||||||
"msg_ver",
|
"msg_ver",
|
||||||
@@ -115,7 +115,7 @@ return [
|
|||||||
"msg_type",
|
"msg_type",
|
||||||
"msg_txn_code",
|
"msg_txn_code",
|
||||||
"msg_crrltn_id",
|
"msg_crrltn_id",
|
||||||
"msg_flg",
|
// "msg_flg",
|
||||||
"msg_sender",
|
"msg_sender",
|
||||||
"msg_time",
|
"msg_time",
|
||||||
"msg_sys_sn",
|
"msg_sys_sn",
|
||||||
@@ -128,7 +128,7 @@ return [
|
|||||||
"msg_type",
|
"msg_type",
|
||||||
"msg_txn_code",
|
"msg_txn_code",
|
||||||
"msg_crrltn_id",
|
"msg_crrltn_id",
|
||||||
"msg_flg",
|
// "msg_flg",
|
||||||
"msg_sender",
|
"msg_sender",
|
||||||
"msg_time",
|
"msg_time",
|
||||||
"msg_sys_sn",
|
"msg_sys_sn",
|
||||||
@@ -140,7 +140,7 @@ return [
|
|||||||
"msg_type",
|
"msg_type",
|
||||||
"msg_txn_code",
|
"msg_txn_code",
|
||||||
"msg_crrltn_id",
|
"msg_crrltn_id",
|
||||||
"msg_flg",
|
// "msg_flg",
|
||||||
"msg_sender",
|
"msg_sender",
|
||||||
"msg_time",
|
"msg_time",
|
||||||
"msg_sys_sn",
|
"msg_sys_sn",
|
||||||
|
|||||||
8
packages/coupon/README.md
Normal file
8
packages/coupon/README.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# coupon 优惠券接口
|
||||||
|
## 接口地址:http://pac.ysd-bs.com/api/V1
|
||||||
|
|
||||||
|
|
||||||
|
### 发券地址:http://pac.ysd-bs.com/api/V1/user/grant
|
||||||
|
### 查询接口:http://pa.ysd-bs.com/api/V1/user/query
|
||||||
|
### 核销地址:http://pa.ysd-bs.com/api/V1/user/freezecoupon
|
||||||
|
### 作废地址:http://pa.ysd-bs.com/api/V1/user/destroy
|
||||||
11
packages/unionpay/README.md
Normal file
11
packages/unionpay/README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Unionpay 对接银联接口
|
||||||
|
|
||||||
|
002025 聚合营销优惠查询接口
|
||||||
|
|
||||||
|
002100 销账交易接口
|
||||||
|
|
||||||
|
002101 销账冲正通知接口
|
||||||
|
|
||||||
|
002102 销账撤销通知接口
|
||||||
|
|
||||||
|
接口地址:http://pac.ysd-bs.com/api/V1/unionpay/query
|
||||||
Reference in New Issue
Block a user