diff --git a/app/Admin/Controllers/Log/IndexController.php b/app/Admin/Controllers/Log/IndexController.php index f02107e..9445041 100644 --- a/app/Admin/Controllers/Log/IndexController.php +++ b/app/Admin/Controllers/Log/IndexController.php @@ -49,6 +49,7 @@ class IndexController extends AdminController }); $grid->column('id', '#ID#'); + // $grid->column('path', '请求地址'); $grid->column('请求地址')->display(function ($title, $column) { return '展开'; @@ -58,6 +59,8 @@ class IndexController extends AdminController return new Table($header, $array); }); + $grid->column('created_at', '提交时间'); + $grid->column('method', '模式'); // $grid->column('in_source', '请求参数') // ->display(function ($title, $column) { @@ -96,7 +99,6 @@ class IndexController extends AdminController return $out_source; }); - $grid->column('created_at', '提交时间'); return $grid; } diff --git a/app/Models/Log.php b/app/Models/Log.php index 761fff7..7c11b33 100644 --- a/app/Models/Log.php +++ b/app/Models/Log.php @@ -40,9 +40,9 @@ class Log extends Model Schema::create($this->table, function (Blueprint $table) { $table->increments('id'); $table->string('path', 255); - $table->string('method', 15); + $table->string('method', 15)->index(); $table->text('in_source'); - $table->string('type', 20); + $table->string('type', 20)->index(); $table->text('out_source')->nullable(); $table->timestamps(); }); diff --git a/config/unionpay.php b/config/unionpay.php index 1860d7f..34fa28a 100644 --- a/config/unionpay.php +++ b/config/unionpay.php @@ -8,8 +8,12 @@ return [ ], //不进行sign校验 'nosign' => [ - 'openid', - 'code', + // '002025',//查询 + // '002100',//核销 + // '002101',//冲正 + // '002102',//撤销 + 'openid',//获取openid 封装数据 + 'code',//微信测获取优惠券 ], //分配的渠道号 'msg_sender' => '660134', @@ -37,6 +41,7 @@ return [ 'public' => storage_path('cert/unionpay/public_rsa.pem'), ], ], + //接口类型 'type' => [ '002025' => '查询', '002100' => '交易', @@ -47,6 +52,7 @@ return [ '012100' => '核销通知', 'code' => '生活请求发券', ], + //日志类型对应 'log_type' => [ '002025' => 'query', '002100' => 'freezecoupon', diff --git a/config/xuanchen_coupon.php b/config/xuanchen_coupon.php index 1575429..2a31974 100644 --- a/config/xuanchen_coupon.php +++ b/config/xuanchen_coupon.php @@ -3,18 +3,23 @@ return [ 'coupon_model' => \App\Models\Coupon::class, 'rules' => [ - 'ysd' => [ + 'ysd' => [ // 'pattern' => '/^YSD\d{12}/', 'pattern' => '/^YSD/', 'model' => \XuanChen\Coupon\Action\YsdAction::class, ], - 'pingan' => [ + 'unionpay' => [ + // 'pattern' => '/^YSD\d{12}/', + 'pattern' => '/^66406/', + 'model' => \XuanChen\Coupon\Action\YsdAction::class, + ], + 'pingan' => [ 'pattern' => '/^\d{12}$/', 'model' => \XuanChen\Coupon\Action\PinganAction::class, ], ], - + 'froms' => [ 'bsshop',//本时商城 'bslive',//本时生活