修改日志名称
This commit is contained in:
@@ -47,7 +47,7 @@ class IndexController extends AdminController
|
|||||||
$filter->equal('thirdPartyGoodsId', '优惠政策')->select(ActivityRule::pluck('title', 'code'));
|
$filter->equal('thirdPartyGoodsId', '优惠政策')->select(ActivityRule::pluck('title', 'code'));
|
||||||
});
|
});
|
||||||
$filter->column(1 / 2, function ($filter) {
|
$filter->column(1 / 2, function ($filter) {
|
||||||
$filter->like('redemptionCode', '平安券编号');
|
$filter->like('redemptionCode', '卡券编号');
|
||||||
$filter->where(function ($query) {
|
$filter->where(function ($query) {
|
||||||
$query->whereHas('outlet', function ($query) {
|
$query->whereHas('outlet', function ($query) {
|
||||||
$query->whereHas('info', function ($query) {
|
$query->whereHas('info', function ($query) {
|
||||||
@@ -75,7 +75,7 @@ class IndexController extends AdminController
|
|||||||
return $this->outlet ? $this->outlet->nickname : $this->outletId;
|
return $this->outlet ? $this->outlet->nickname : $this->outletId;
|
||||||
});
|
});
|
||||||
|
|
||||||
$grid->column('redemptionCode', '平安券编号');
|
$grid->column('redemptionCode', '卡券编号');
|
||||||
$grid->column('couponName', '优惠政策');
|
$grid->column('couponName', '优惠政策');
|
||||||
$grid->column('price', '核销金额');
|
$grid->column('price', '核销金额');
|
||||||
$grid->column('资金通道结算')->display(function () {
|
$grid->column('资金通道结算')->display(function () {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use Encore\Admin\Widgets\Table;
|
|||||||
class IndexController extends AdminController
|
class IndexController extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $title = 'api 日志22';
|
protected $title = 'api接口日志';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notes:
|
* Notes:
|
||||||
@@ -26,10 +26,7 @@ class IndexController extends AdminController
|
|||||||
$grid->disableActions();
|
$grid->disableActions();
|
||||||
|
|
||||||
$grid->filter(function ($filter) {
|
$grid->filter(function ($filter) {
|
||||||
$filter->equal('type', '接口类型')->select([
|
$filter->equal('type', '接口类型')->select(Log::TYPES);
|
||||||
'pingan' => '平安',
|
|
||||||
'self' => '自己',
|
|
||||||
]);
|
|
||||||
$filter->where(function ($query) {
|
$filter->where(function ($query) {
|
||||||
$query->where("out_source->data->profitOfferItemVersion", $this->input);
|
$query->where("out_source->data->profitOfferItemVersion", $this->input);
|
||||||
}, '券类型')->select([
|
}, '券类型')->select([
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class UserController extends Controller
|
|||||||
$res = $this->checkSign($request);
|
$res = $this->checkSign($request);
|
||||||
$inputdata['jiemi'] = $res;
|
$inputdata['jiemi'] = $res;
|
||||||
|
|
||||||
$log = $this->createLog($request->url(), 'POST', $inputdata, 'grant'); //添加日志
|
$log = $this->createLog($request->url(), 'POST', $inputdata, 'query'); //添加日志
|
||||||
|
|
||||||
if (is_string($res)) {
|
if (is_string($res)) {
|
||||||
return $this->error($res, $log);
|
return $this->error($res, $log);
|
||||||
@@ -121,7 +121,7 @@ class UserController extends Controller
|
|||||||
$inputdata = $request->all();
|
$inputdata = $request->all();
|
||||||
$res = $this->checkSign($request);
|
$res = $this->checkSign($request);
|
||||||
$inputdata['jiemi'] = $res;
|
$inputdata['jiemi'] = $res;
|
||||||
$log = $this->createLog($request->url(), 'POST', $inputdata, 'grant'); //添加日志
|
$log = $this->createLog($request->url(), 'POST', $inputdata, 'destroy'); //添加日志
|
||||||
|
|
||||||
if (is_string($res)) {
|
if (is_string($res)) {
|
||||||
return $this->error($res, $log);
|
return $this->error($res, $log);
|
||||||
@@ -156,7 +156,7 @@ class UserController extends Controller
|
|||||||
$res = $this->checkSign($request);
|
$res = $this->checkSign($request);
|
||||||
$inputdata['jiemi'] = $res;
|
$inputdata['jiemi'] = $res;
|
||||||
//插入日志表
|
//插入日志表
|
||||||
$log = $this->createLog($request->url(), 'POST', $inputdata, 'self'); //添加日志
|
$log = $this->createLog($request->url(), 'POST', $inputdata, 'freezecoupon'); //添加日志
|
||||||
|
|
||||||
if (!is_array($res)) {
|
if (!is_array($res)) {
|
||||||
return $this->error($res, $log);
|
return $this->error($res, $log);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class TestController
|
|||||||
{
|
{
|
||||||
|
|
||||||
use ApiResponse;
|
use ApiResponse;
|
||||||
|
public $baseUrl = 'http://pac.ysd-bs.com/api/V1/';
|
||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
@@ -53,7 +54,7 @@ class TestController
|
|||||||
|
|
||||||
$data = $this->jiami($data);
|
$data = $this->jiami($data);
|
||||||
|
|
||||||
$url = 'http://pac.ysd-bs.com/api/V1/user/grant';
|
$url = $this->baseUrl.'user/grant';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
|
|
||||||
// if (isset($res['data'])) {
|
// if (isset($res['data'])) {
|
||||||
@@ -79,7 +80,7 @@ class TestController
|
|||||||
|
|
||||||
$data = $this->jiami($request->all());
|
$data = $this->jiami($request->all());
|
||||||
|
|
||||||
$url = 'http://pac.ysd-bs.com/api/V1/user/grant';
|
$url = $this->baseUrl.'user/grant';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
@@ -100,7 +101,7 @@ class TestController
|
|||||||
|
|
||||||
$data = $this->jiami($request->all());
|
$data = $this->jiami($request->all());
|
||||||
|
|
||||||
$url = 'http://pac.ysd-bs.com/api/V1/user/query';
|
$url = $this->baseUrl.'user/query';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
@@ -124,7 +125,7 @@ class TestController
|
|||||||
$redemptionCode = $request->redemptionCode;
|
$redemptionCode = $request->redemptionCode;
|
||||||
$data = $this->jiami($request->all());
|
$data = $this->jiami($request->all());
|
||||||
|
|
||||||
$url = 'http://pac.ysd-bs.com/api/V1/user/destroy';
|
$url = $this->baseUrl.'user/destroy';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
|
|
||||||
dump($this->getElapsedTime());
|
dump($this->getElapsedTime());
|
||||||
@@ -155,7 +156,7 @@ class TestController
|
|||||||
'orderid' => $request->orderid,
|
'orderid' => $request->orderid,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$url = 'http://pac.ysd-bs.com/api/V1/user/freezecoupon';
|
$url = $this->baseUrl.'user/freezecoupon';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
|||||||
@@ -18,6 +18,16 @@ class Log extends Model
|
|||||||
'out_source' => 'array',
|
'out_source' => 'array',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const TYPE_FREEZECOUPON = 'freezecoupon';
|
||||||
|
const TYPE_DESTROY = 'destroy';
|
||||||
|
const TYPE_QUERY = 'query';
|
||||||
|
const TYPE_GRANT = 'grant';
|
||||||
|
const TYPES = [
|
||||||
|
self::TYPE_FREEZECOUPON => '核销',
|
||||||
|
self::TYPE_DESTROY => '作废',
|
||||||
|
self::TYPE_QUERY => '查询',
|
||||||
|
self::TYPE_GRANT => '发券',
|
||||||
|
];
|
||||||
public function __construct(array $attributes = [])
|
public function __construct(array $attributes = [])
|
||||||
{
|
{
|
||||||
parent::__construct($attributes);
|
parent::__construct($attributes);
|
||||||
|
|||||||
Reference in New Issue
Block a user