Commit da2f810a by guojx

赛区列表接口完善

parent 4bb5d169
......@@ -56,7 +56,7 @@ public class StoreRankController {
*/
@RequestMapping(value = "sales-structure")
@ResponseBody
public RestResponse<List<IndexVO>> salesStructure(String enterpriseId) {
public RestResponse<List<IndexVO>> salesStructure(String enterpriseId, String storeId) {
Map<String, Object> queryMap = new HashMap<>();
queryMap.put(ORDER_FIELD, "indexSort");
queryMap.put(ORDER_FIELD_DESC, 1);
......@@ -82,6 +82,19 @@ public class StoreRankController {
}
Set<String> set = enterpriseIndexList.stream().map(e -> e.getIndexCode()).collect(Collectors.toSet());
indexList = indexList.stream().filter(e -> set.contains(e.getIndexCode())).collect(Collectors.toList());
List<IndexVO> resultList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(indexList) && StringUtils.isNotBlank(storeId)) {
PageQo pageQo = new PageQo();
pageQo.setPageNum(1);
pageQo.setPageSize(1);
for (IndexVO temp : indexList) {
if (listStoreRankArea(pageQo, enterpriseId, temp.getIndexCode(), storeId).getResult().getTotalCount() > 0) {
resultList.add(temp);
}
}
return RestResponse.successResult(resultList);
}
return RestResponse.successResult(indexList);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment