This commit is contained in:
2026-08-08 15:05:33 +08:00
parent 102845874b
commit e395292cd5
11 changed files with 2771 additions and 8 deletions
@@ -148,7 +148,8 @@ public class OverseasStorageFeeService {
throw new BizException(ResultCode.VALIDATION_FAILED, "费用类型和计费单位不匹配");
}
List<OverseasStorageFeeDtos.TierRequest> tiers = new ArrayList<>(source);
tiers.sort(Comparator.comparing(OverseasStorageFeeDtos.TierRequest::feeType)
tiers.sort(Comparator.comparingInt((OverseasStorageFeeDtos.TierRequest tier) ->
"STORAGE".equals(tier.feeType()) ? 0 : 1)
.thenComparingInt(OverseasStorageFeeDtos.TierRequest::startDay));
for (String feeType : List.of("STORAGE", "RETURN_STORAGE")) {
List<OverseasStorageFeeDtos.TierRequest> group = tiers.stream().filter(t -> feeType.equals(t.feeType())).toList();