fix(overview): 锁定核心高价值套装并修复未查询空值误判
- 高价值套装精确匹配「套装-兔兔白日梦」与「套装-狂战萌兔」,排除头盔/背包/手榴弹散件干扰 - 增加 is_suit_queried_expr,未查询或 NULL 账号严禁误判为双套均可兑换 - 修复前后端序列化空值保持,完善列表与详情页准入状态和判定依据展示 - 新增头盔排除与 NULL 统计防错回归单测,全量通过 689 个用例
This commit is contained in:
@@ -756,27 +756,24 @@ export default function AccountsPage() {
|
||||
dataIndex: 'high_value_owned',
|
||||
...sortProps('high_value', '两个都可兑换在前,未查询在后'),
|
||||
width: 170,
|
||||
render: (owned: string[] | undefined, record: AccountItem) => {
|
||||
const used = owned ?? [];
|
||||
// 没查过 ≠ 没兑换:必须分开说,否则会把"没数据"当成"高价值"
|
||||
// 「有没有查过」看查询时间:只看 owned 是否为空的话,
|
||||
// 「查过但没兑换」(高价值)和「没查过」(未知)就分不开了。
|
||||
const queried = Boolean(record.overview_queried_at);
|
||||
if (!queried) {
|
||||
render: (owned: string[] | null | undefined, record: AccountItem) => {
|
||||
// 没查过 ≠ 没兑换:
|
||||
// 只有 high_value_owned 明确为数组且有查询时间时,才算有效查过高价值
|
||||
if (owned === null || owned === undefined || !record.overview_queried_at) {
|
||||
return (
|
||||
<Tooltip title="还没做过一键查询,点工具栏「批量一键查询」">
|
||||
<Tooltip title="尚未查询高价值套装准入状态,点工具栏「批量一键查询」">
|
||||
<Text type="secondary">未查询</Text>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
if (used.length === 0) {
|
||||
if (owned.length === 0) {
|
||||
return <Tag color="green">两个都可兑换</Tag>;
|
||||
}
|
||||
return (
|
||||
<Space size={4} wrap>
|
||||
{used.map((n) => (
|
||||
{owned.map((n) => (
|
||||
<Tag key={n} color="orange">
|
||||
{n.replace(/^套装-/, '')} 已兑换
|
||||
{n.replace(/^套装-/, '')} 已达上限
|
||||
</Tag>
|
||||
))}
|
||||
</Space>
|
||||
|
||||
Reference in New Issue
Block a user