Commit 8a15369a by zhiwj

修改bug

parent 2c4aa533
......@@ -274,12 +274,16 @@ public class ClerkApiServiceImpl implements ClerkApiService {
}
private String getStoreIdByStoreInfoIds(List<Integer> storeInfoIdsBySearch, String search) {
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("");
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("");
}
}
@SuppressWarnings("unchecked")
......@@ -290,7 +294,6 @@ public class ClerkApiServiceImpl implements ClerkApiService {
storeSearchDTO.setStoreGroupId(clerkSearchDTO.getStoreGroupId());
storeSearchDTO.setSearchJson(clerkSearchDTO.getSelectJson());
storeSearchDTO.setStoreIds(clerkSearchDTO.getStoreIds());
// storeSearchDTO.setSearch(clerkSearchDTO.getSearch());
return storeApiService.listStore(storeSearchDTO, pageNum, pageSize,
"storeId,storeName,storeCode,storeInfoId,ownType");
......
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