mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-21 17:44:27 +08:00
重构初始化
This commit is contained in:
54
app/http/admin/controller/ops/ChannelDailyStatController.php
Normal file
54
app/http/admin/controller/ops/ChannelDailyStatController.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace app\http\admin\controller\ops;
|
||||
|
||||
use app\common\base\BaseController;
|
||||
use app\http\admin\validation\ChannelDailyStatValidator;
|
||||
use app\service\ops\stat\ChannelDailyStatService;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
|
||||
/**
|
||||
* 通道日统计控制器。
|
||||
*/
|
||||
class ChannelDailyStatController extends BaseController
|
||||
{
|
||||
/**
|
||||
* 构造函数,注入通道日统计服务。
|
||||
*/
|
||||
public function __construct(
|
||||
protected ChannelDailyStatService $channelDailyStatService
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询通道日统计列表。
|
||||
*/
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$data = $this->validated($request->all(), ChannelDailyStatValidator::class, 'index');
|
||||
|
||||
return $this->page(
|
||||
$this->channelDailyStatService->paginate(
|
||||
$data,
|
||||
(int) ($data['page'] ?? 1),
|
||||
(int) ($data['page_size'] ?? 10)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询通道日统计详情。
|
||||
*/
|
||||
public function show(Request $request, string $id): Response
|
||||
{
|
||||
$data = $this->validated(['id' => (int) $id], ChannelDailyStatValidator::class, 'show');
|
||||
$stat = $this->channelDailyStatService->findById((int) $data['id']);
|
||||
|
||||
if (!$stat) {
|
||||
return $this->fail('通道日统计不存在', 404);
|
||||
}
|
||||
|
||||
return $this->success($stat);
|
||||
}
|
||||
}
|
||||
54
app/http/admin/controller/ops/ChannelNotifyLogController.php
Normal file
54
app/http/admin/controller/ops/ChannelNotifyLogController.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace app\http\admin\controller\ops;
|
||||
|
||||
use app\common\base\BaseController;
|
||||
use app\http\admin\validation\ChannelNotifyLogValidator;
|
||||
use app\service\ops\log\ChannelNotifyLogService;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
|
||||
/**
|
||||
* 渠道通知日志控制器。
|
||||
*/
|
||||
class ChannelNotifyLogController extends BaseController
|
||||
{
|
||||
/**
|
||||
* 构造函数,注入渠道通知日志服务。
|
||||
*/
|
||||
public function __construct(
|
||||
protected ChannelNotifyLogService $channelNotifyLogService
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询渠道通知日志列表。
|
||||
*/
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$data = $this->validated($request->all(), ChannelNotifyLogValidator::class, 'index');
|
||||
|
||||
return $this->page(
|
||||
$this->channelNotifyLogService->paginate(
|
||||
$data,
|
||||
(int) ($data['page'] ?? 1),
|
||||
(int) ($data['page_size'] ?? 10)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询渠道通知日志详情。
|
||||
*/
|
||||
public function show(Request $request, string $id): Response
|
||||
{
|
||||
$data = $this->validated(['id' => (int) $id], ChannelNotifyLogValidator::class, 'show');
|
||||
$log = $this->channelNotifyLogService->findById((int) $data['id']);
|
||||
|
||||
if (!$log) {
|
||||
return $this->fail('渠道通知日志不存在', 404);
|
||||
}
|
||||
|
||||
return $this->success($log);
|
||||
}
|
||||
}
|
||||
54
app/http/admin/controller/ops/PayCallbackLogController.php
Normal file
54
app/http/admin/controller/ops/PayCallbackLogController.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace app\http\admin\controller\ops;
|
||||
|
||||
use app\common\base\BaseController;
|
||||
use app\http\admin\validation\PayCallbackLogValidator;
|
||||
use app\service\ops\log\PayCallbackLogService;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
|
||||
/**
|
||||
* 支付回调日志控制器。
|
||||
*/
|
||||
class PayCallbackLogController extends BaseController
|
||||
{
|
||||
/**
|
||||
* 构造函数,注入支付回调日志服务。
|
||||
*/
|
||||
public function __construct(
|
||||
protected PayCallbackLogService $payCallbackLogService
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付回调日志列表。
|
||||
*/
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$data = $this->validated($request->all(), PayCallbackLogValidator::class, 'index');
|
||||
|
||||
return $this->page(
|
||||
$this->payCallbackLogService->paginate(
|
||||
$data,
|
||||
(int) ($data['page'] ?? 1),
|
||||
(int) ($data['page_size'] ?? 10)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付回调日志详情。
|
||||
*/
|
||||
public function show(Request $request, string $id): Response
|
||||
{
|
||||
$data = $this->validated(['id' => (int) $id], PayCallbackLogValidator::class, 'show');
|
||||
$log = $this->payCallbackLogService->findById((int) $data['id']);
|
||||
|
||||
if (!$log) {
|
||||
return $this->fail('支付回调日志不存在', 404);
|
||||
}
|
||||
|
||||
return $this->success($log);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user