fix(settlement): 操作记录分页、流水动作与坏账幂等加固
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled

- 新增 settlement-operations 合并列表 API,收付/调账接口改为标准分页
- actionable_only 流水在内存过滤后正确分页
- 已结账单流水不再展示补差/冲正快捷动作
- 坏账核销支持 idempotency_key 并写入 result_bill_id
- 补充操作记录、流水与坏账幂等相关测试
This commit is contained in:
2026-06-26 16:40:46 +08:00
parent 7ec8f4c5a2
commit c83343e989
20 changed files with 1045 additions and 212 deletions

View File

@@ -2,10 +2,12 @@
namespace App\Http\Controllers\Api\V1\E2E;
use App\Services\AdminCaptchaService;
use App\Lottery\ErrorCode;
use App\Support\ApiResponse;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use App\Http\Controllers\Controller;
use App\Services\AdminCaptchaService;
/**
* E2E 辅助peek captcha bypass 码。
@@ -14,14 +16,15 @@ use Illuminate\Http\Request;
* 改用 e2e 约定captcha_code == "LOTTERY_E2E_BYPASS" LOTTERY_E2E=true 时视为通过。
* 本端点不返回任何"答案",仅返回约定码提示。
*/
final class E2ECaptchaPeekController extends \App\Http\Controllers\Controller
final class E2ECaptchaPeekController extends Controller
{
public function player(Request $request): JsonResponse
{
$key = (string) $request->input('captcha_key', '');
if ($key === '') {
return ApiResponse::error('captcha_key required', 'e2e_invalid_input', null, 422);
return ApiResponse::error('captcha_key required', ErrorCode::ValidationFailed->value, null, 422);
}
return $this->peek($key, AdminCaptchaService::SCOPE_PLAYER);
}
@@ -29,8 +32,9 @@ final class E2ECaptchaPeekController extends \App\Http\Controllers\Controller
{
$key = (string) $request->input('captcha_key', '');
if ($key === '') {
return ApiResponse::error('captcha_key required', 'e2e_invalid_input', null, 422);
return ApiResponse::error('captcha_key required', ErrorCode::ValidationFailed->value, null, 422);
}
return $this->peek($key, AdminCaptchaService::SCOPE_ADMIN);
}