feat(admin): redesign creator income page with status views and safer settlement
- Split PayIncome into shell + PayIncomeList flat sibling trait - Add policy callout, per-currency stats, status views, filter card - Show source post/order/buyer, base amount x ratio, expected settle time - Confirm single/batch settlement, selection count, double-submit guard - Redirect back preserving filters; report settled/failed counts - Revenue: add get_status_counts(), share admin_list_where(), drop dead settle() Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1273a0138e
commit
b25ebc5fff
6 files changed
+719
-247
No files matched your search
@@ -42,7 +42,7 @@ const pages = {
|
||||
orders: ['PayOrders', 'PayOrdersList', 'PayOrdersDetail'].map((f) => read(`src/Admin/Native/${f}.php`)).join('\n'),
|
||||
products: ['PayProducts', 'PayProductsList', 'PayProductsEditor'].map((f) => read(`src/Admin/Native/${f}.php`)).join('\n'),
|
||||
coupons: read('src/Admin/Native/PayCoupons.php'),
|
||||
income: read('src/Admin/Native/PayIncome.php'),
|
||||
income: ['PayIncome', 'PayIncomeList'].map((f) => read(`src/Admin/Native/${f}.php`)).join('\n'),
|
||||
withdrawals: read('src/Admin/Native/PayWithdrawals.php'),
|
||||
chargeCards,
|
||||
};
|
||||
@@ -135,10 +135,17 @@ test('每页都在查询前夹取页码,越界时重查一次', () => {
|
||||
'订单明细必须在查询列表前完成计数与页码夹取'
|
||||
);
|
||||
|
||||
// 创作分成同样先按状态计数夹取页码,再只查一次列表。
|
||||
assert.equal(count(pages.income, /\$svc->get_list\(/g), 1, '创作分成只应查询一次列表');
|
||||
assert.ok(
|
||||
pages.income.indexOf('get_status_counts(') < pages.income.indexOf('if ($page_num > $pages) {')
|
||||
&& pages.income.indexOf('if ($page_num > $pages) {') < pages.income.indexOf('$svc->get_list('),
|
||||
'创作分成必须在查询列表前完成计数与页码夹取'
|
||||
);
|
||||
|
||||
const requeries = {
|
||||
products: [/\$query\s*=\s*\$this->query_paid_posts\(/g],
|
||||
coupons: [/\$svc->get_list\(/g],
|
||||
income: [/\$svc->get_list\(/g],
|
||||
withdrawals: [/\$svc->get_all\(/g],
|
||||
chargeCards: [/\$svc->get_list\(/g],
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user