feat(admin): 店铺重复检查导出「站点」列改「国家」中文显示;撞款抽屉按点击处定位
- 导出 CSV 列头 站点→国家,值映射中文(DE德国/UK英国/FR法国/IT意大利/ES西班牙,未知回退原值) - 撞款详情抽屉以触发元素为垂直锚点并钳制在视口内,不再贴区块/页面顶部导致看不见需上滑 - 同步 Java 静态托管副本;更新 Java/Python 相关断言
This commit is contained in:
+14
-5
@@ -183,13 +183,13 @@ public class ShopDataDuplicateCheckQueryService {
|
||||
List<DuplicateItem> cropped = cropItems(view.payload().items(), visibleKeys);
|
||||
List<DuplicateItem> matched = filterItems(cropped, monitor, filters);
|
||||
List<List<String>> rows = new ArrayList<>();
|
||||
rows.add(List.of("ASIN", "店铺数", "店铺", "分组", "站点", "上架时间", "价格", "品牌"));
|
||||
rows.add(List.of("ASIN", "店铺数", "店铺", "分组", "国家", "上架时间", "价格", "品牌"));
|
||||
List<Object[]> flat = new ArrayList<>();
|
||||
for (DuplicateItem item : matched) {
|
||||
String shopCount = String.valueOf(item.shopCount());
|
||||
for (DuplicateOccurrence occ : item.occurrences()) {
|
||||
flat.add(new Object[]{item.asin(), shopCount, occ.shopName(), occ.groupName(),
|
||||
effectiveSite(occ), safe(occ.date()), safe(occ.price()), safe(occ.brand())});
|
||||
effectiveCountryCn(occ), safe(occ.date()), safe(occ.price()), safe(occ.brand())});
|
||||
}
|
||||
}
|
||||
flat.sort(flatExportComparator());
|
||||
@@ -358,9 +358,18 @@ public class ShopDataDuplicateCheckQueryService {
|
||||
source == null ? "" : source);
|
||||
}
|
||||
|
||||
private String effectiveSite(DuplicateOccurrence occ) {
|
||||
/** 站点代码 → 中文国家名(导出「国家」列,与页面 DUP_SITE_LABELS 一致),未识别回退原值。 */
|
||||
private static final Map<String, String> SITE_CN_LABELS = Map.of(
|
||||
"DE", "德国", "UK", "英国", "FR", "法国", "IT", "意大利", "ES", "西班牙");
|
||||
|
||||
private static String siteCnLabel(String code) {
|
||||
String key = safe(code).trim().toUpperCase(Locale.ROOT);
|
||||
return SITE_CN_LABELS.containsKey(key) ? SITE_CN_LABELS.get(key) : safe(code);
|
||||
}
|
||||
|
||||
private String effectiveCountryCn(DuplicateOccurrence occ) {
|
||||
if (!safe(occ.country()).isEmpty()) {
|
||||
return occ.country().toUpperCase(Locale.ROOT);
|
||||
return siteCnLabel(occ.country());
|
||||
}
|
||||
List<String> codes = occ.countryCodes() == null ? List.of() : occ.countryCodes();
|
||||
if (codes.isEmpty()) {
|
||||
@@ -371,7 +380,7 @@ public class ShopDataDuplicateCheckQueryService {
|
||||
if (sb.length() > 0) {
|
||||
sb.append('、');
|
||||
}
|
||||
sb.append(safe(code).toUpperCase(Locale.ROOT));
|
||||
sb.append(siteCnLabel(code));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user