package com.tanpu.fund.utils; import com.tanpu.common.model.product.resp.ProductLabel; import com.tanpu.common.resp.CommonResp; import com.tanpu.fund.feign.user.FeignClientForFatools; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class LabelUtil { public Map<String, List<ProductLabel>> getMap(List<String> ls, FeignClientForFatools fatools) { CommonResp<Map<String, List<ProductLabel>>> resp = fatools.batchGetLabelByIdInfo(ls); if (resp.isSuccess()) { return resp.getAttributes(); } return new HashMap<>(0); } public List<ProductLabel> getList(Map<String, List<ProductLabel>> map, String id) { if (!map.isEmpty()) { return map.get(id); } return new ArrayList<>(0); } }