Test #1

Merged
admin merged 1726 commits from test into main 2026-09-17 11:52:45 +08:00
Showing only changes of commit dfa3e8cc53 - Show all commits
@@ -23,7 +23,7 @@ import java.util.Locale;
public class PlatformPartnerQueryService {
private static final long PUBLIC_TENANT_ID = 0L;
private static final Set<String> ALLOWED_QUERY_TYPES = Set.of(
"CUSTOMER", "CARRIER", "SHIPPER", "CONSIGNEE");
"CARRIER", "SHIPPER", "CONSIGNEE");
@Resource
private PartnerRepository repository;
@@ -148,7 +148,7 @@ public class PlatformPartnerQueryService {
}
if (normalized.isEmpty()) throw new BizException(ResultCode.BAD_REQUEST, "请至少选择一个单位类型");
if (normalized.stream().anyMatch(type -> !ALLOWED_QUERY_TYPES.contains(type))) {
throw new BizException(ResultCode.VALIDATION_FAILED, "往来单位仅支持 CUSTOMER、CARRIER、SHIPPER、CONSIGNEE");
throw new BizException(ResultCode.VALIDATION_FAILED, "往来单位仅支持 CARRIER、SHIPPER、CONSIGNEE");
}
return List.copyOf(normalized);
}