货运代理列表排序修改

This commit is contained in:
tianfeng 2026-01-21 10:48:06 +08:00
parent cfdaad54e9
commit 844e5942fe

View File

@ -114,7 +114,7 @@ public class UserFreightBalanceRestServiceImpl implements UserFreightBalanceRest
// 构建国家代码到国旗URL的映射
Map<String, String> countryFlagMap = buildCountryFlagMap(appCountryCode);
return pagedResult.convert(dto -> {
PageResult<UserFreightBalanceCO> result = pagedResult.convert(dto -> {
UserFreightBalanceCO co = userFreightBalanceConvertor.toUserFreightBalanceCO(dto);
co.setBalance(dto.getBalance());
co.setIsFollow(userProfileGateway.checkFollow(appExtCommand.getReqUserId(), dto.getUserId()));
@ -142,6 +142,9 @@ public class UserFreightBalanceRestServiceImpl implements UserFreightBalanceRest
}
return co;
});
result.setRecords(result.getRecords().stream().sorted(Comparator.comparing(UserFreightBalanceCO::getTransactionCount).reversed()).collect(Collectors.toList()));
return result;
}
/**