Commit 1f58e380 by zhiwj

修改bug

parent b3540830
......@@ -278,19 +278,29 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return ServiceResponse.success(totalClerk);
}
// private String getStoreIdByStoreInfoIds(List<Integer> storeInfoIdsBySearch, String search) {
// StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
// storeSearchDTO.setStoreInfoIds(StringUtils.join(storeInfoIdsBySearch, " "));
// storeSearchDTO.setSearch(search);
// Page<StoreDTO> page = storeApiService.listStore(storeSearchDTO, 1, Integer.MAX_VALUE).getResult();
// if (page == null) {
// return "";
// } else {
// return Optional.ofNullable(page.getResult()).orElse(Collections.emptyList()).stream().map(e -> e.getStoreId().toString())
// .reduce((x, y) -> x + " " + y).orElse("");
// }
// }
private String getStoreIdByStoreInfoIds(List<Integer> storeInfoIdsBySearch, String search) {
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setStoreInfoIds(StringUtils.join(storeInfoIdsBySearch, " "));
storeSearchDTO.setSearch(search);
Page<StoreDTO> page = storeApiService.listStore(storeSearchDTO, 1, Integer.MAX_VALUE).getResult();
if (page == null) {
return "";
} else {
return Optional.ofNullable(page.getResult()).orElse(Collections.emptyList()).stream().map(e -> e.getStoreId().toString())
.reduce((x, y) -> x + " " + y).orElse("");
}
StoreSearchDBDTO storeSearchDBDTO = new StoreSearchDBDTO();
storeSearchDBDTO.setStoreInfoIdList(storeInfoIdsBySearch);
storeSearchDBDTO.setSearch(search);
List<StoreDTO> dtos = storeService.listStore(storeSearchDBDTO, 1, Integer.MAX_VALUE);
return Optional.ofNullable(dtos).orElse(Collections.emptyList()).stream().map(e -> e.getStoreId().toString())
.reduce((x, y) -> x + " " + y).orElse("");
}
@SuppressWarnings("unchecked")
private ServiceResponse<Page<StoreDTO>> listStoreIds(ClerkSearchDTO clerkSearchDTO, Integer pageNum,
Integer pageSize) {
......
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