fix(api): 修复 TP5.0 查询构造器复用与数组入参两处系统性缺陷

1) count() 后复用同一 Query 会清空 options,导致 alias/join/where 丢失
   (SQL 报错 Unknown column/table,或筛选静默失效)
   → 基类新增 pageQuery(callable) 助手,8 个分页接口全部改用闭包重建查询
2) TP5.0 Request::input() 对不含 / 的参数名做字符串强转,值若为数组会抛
   variable type error:array(影响 media[]/benefits[]/permissions[]/icons)
   → 基类 input()/inputs() 改用 post(false)/get(false) 取原始数组
3) 种子数据:佣金调整为 settled 336.4 / 未结算 950,使可提现余额 = 186.4(与前端 mock 对齐)
4) 测试脚本:P1 必填校验断言按 分类→标题→内容 顺序修正
这个提交包含在:
linda
2026-10-15 14:56:06 +08:00
父节点 a5e63087ef
当前提交 11174f8693
共有 13 个文件被更改,包括 191 次插入 和 108 次删除

查看文件

@@ -168,7 +168,10 @@ class AdminSetting extends V1
$this->setCfg('ui.logo', (string)$logo);
}
$icons = $this->input('icons', null);
// 注意:icons 可能是数组,不能走 $this->input()(TP5.0 Request::input 默认按字符串强转,
// 传入数组会抛 "variable type error:array" 导致 HTTP 500);统一从 inputs() 取原始值。
$allInputs = $this->inputs();
$icons = array_key_exists('icons', $allInputs) ? $allInputs['icons'] : null;
if ($icons !== null) {
if (is_string($icons)) {
$icons = json_decode($icons, true);