fix(ledger): 分享收益筛选支持多类型(REWARD_TO_SETTLEABLE + REWARD_PENDING)
后端 entryType 筛选支持逗号分隔多值,前端"分享收益"同时查询两种类型, 解决未认种时收到的 REWARD_PENDING 分享权益在筛选中丢失的问题。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e4a2a0e37a
commit
d223671db7
|
|
@ -73,8 +73,9 @@ export class LedgerEntryRepositoryImpl implements ILedgerEntryRepository {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (filters?.entryType) {
|
if (filters?.entryType) {
|
||||||
// 如果用户指定了类型筛选,则使用用户指定的类型
|
// 支持逗号分隔的多类型筛选(如 REWARD_TO_SETTLEABLE,REWARD_PENDING)
|
||||||
where.entryType = filters.entryType;
|
const types = filters.entryType.split(',').map(t => t.trim()).filter(Boolean);
|
||||||
|
where.entryType = types.length === 1 ? types[0] : { in: types };
|
||||||
}
|
}
|
||||||
if (filters?.assetType) {
|
if (filters?.assetType) {
|
||||||
where.assetType = filters.assetType;
|
where.assetType = filters.assetType;
|
||||||
|
|
@ -140,8 +141,9 @@ export class LedgerEntryRepositoryImpl implements ILedgerEntryRepository {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (filters?.entryType) {
|
if (filters?.entryType) {
|
||||||
// 如果用户指定了类型筛选,则使用用户指定的类型
|
// 支持逗号分隔的多类型筛选(如 REWARD_TO_SETTLEABLE,REWARD_PENDING)
|
||||||
where.entryType = filters.entryType;
|
const types = filters.entryType.split(',').map(t => t.trim()).filter(Boolean);
|
||||||
|
where.entryType = types.length === 1 ? types[0] : { in: types };
|
||||||
}
|
}
|
||||||
if (filters?.assetType) {
|
if (filters?.assetType) {
|
||||||
where.assetType = filters.assetType;
|
where.assetType = filters.assetType;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class _LedgerDetailPageState extends ConsumerState<LedgerDetailPage>
|
||||||
{'value': 'TRANSFER_IN', 'label': '转入'},
|
{'value': 'TRANSFER_IN', 'label': '转入'},
|
||||||
{'value': 'TRANSFER_OUT', 'label': '转出'},
|
{'value': 'TRANSFER_OUT', 'label': '转出'},
|
||||||
{'value': 'PLANT_PAYMENT', 'label': '认种支付'},
|
{'value': 'PLANT_PAYMENT', 'label': '认种支付'},
|
||||||
{'value': 'REWARD_TO_SETTLEABLE', 'label': '分享收益'},
|
{'value': 'REWARD_TO_SETTLEABLE,REWARD_PENDING', 'label': '分享收益'},
|
||||||
{'value': 'SYSTEM_ALLOCATION', 'label': '权益收入'},
|
{'value': 'SYSTEM_ALLOCATION', 'label': '权益收入'},
|
||||||
{'value': 'REWARD_EXPIRED', 'label': '奖励过期'},
|
{'value': 'REWARD_EXPIRED', 'label': '奖励过期'},
|
||||||
{'value': 'WITHDRAWAL', 'label': '提现'},
|
{'value': 'WITHDRAWAL', 'label': '提现'},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue