Commit c98b7db1 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev' into dev

parents b705afdb 96f3b76b
...@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
...@@ -65,7 +66,7 @@ public class SearchBiz { ...@@ -65,7 +66,7 @@ public class SearchBiz {
/** /**
* 业务个数 * 业务个数
*/ */
private static final int SERVICE_COUNT = 5; private static final int SERVICE_COUNT = 6;
private final ThreadPoolTaskExecutor threadPoolTaskExecutor; private final ThreadPoolTaskExecutor threadPoolTaskExecutor;
...@@ -95,8 +96,11 @@ public class SearchBiz { ...@@ -95,8 +96,11 @@ public class SearchBiz {
pageDataVOs.getData().forEach(v -> { pageDataVOs.getData().forEach(v -> {
v.setUccnCataList(initUccnCataCollect(v.getConfig())); v.setUccnCataList(initUccnCataCollect(v.getConfig()));
}); });
vehicleModelVoServiceResultVo.setTotalCount(pageDataVOs.getTotalCount());
vehicleModelVoServiceResultVo.setData(pageDataVOs.getData()); long totalCount = pageDataVOs==null?0:pageDataVOs.getTotalCount()==null?0:pageDataVOs.getTotalCount();
List<VehicleModelVo> result = pageDataVOs == null ? Collections.EMPTY_LIST : pageDataVOs.getData() == null ? Collections.EMPTY_LIST : pageDataVOs.getData();
vehicleModelVoServiceResultVo.setTotalCount(totalCount);
vehicleModelVoServiceResultVo.setData(result);
searchResultVo.put(ServiceConstant.VEHICLE, vehicleModelVoServiceResultVo); searchResultVo.put(ServiceConstant.VEHICLE, vehicleModelVoServiceResultVo);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
...@@ -116,8 +120,11 @@ public class SearchBiz { ...@@ -116,8 +120,11 @@ public class SearchBiz {
branchCompanyFindDTO.setLimit(ServiceConstant.BRANCH_COMPANY_LIMIT); branchCompanyFindDTO.setLimit(ServiceConstant.BRANCH_COMPANY_LIMIT);
branchCompanyFindDTO.setName(keyWord); branchCompanyFindDTO.setName(keyWord);
PageDataVO<BranchCompanyListVO> branchCompanyWithPage = vehicleFeign.findBranchCompanyWithPage(branchCompanyFindDTO); PageDataVO<BranchCompanyListVO> branchCompanyWithPage = vehicleFeign.findBranchCompanyWithPage(branchCompanyFindDTO);
branchCompanyListVOServiceResultVo.setTotalCount(branchCompanyWithPage.getTotalCount());
branchCompanyListVOServiceResultVo.setData(branchCompanyWithPage.getData()); long totalCount = branchCompanyWithPage==null?0:branchCompanyWithPage.getTotalCount()==null?0:branchCompanyWithPage.getTotalCount();
List<BranchCompanyListVO> result = branchCompanyWithPage == null ? Collections.EMPTY_LIST : branchCompanyWithPage.getData() == null ? Collections.EMPTY_LIST : branchCompanyWithPage.getData();
branchCompanyListVOServiceResultVo.setTotalCount(totalCount);
branchCompanyListVOServiceResultVo.setData(result);
searchResultVo.put(ServiceConstant.BRANCH_COMPANY, branchCompanyListVOServiceResultVo); searchResultVo.put(ServiceConstant.BRANCH_COMPANY, branchCompanyListVOServiceResultVo);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
...@@ -134,8 +141,10 @@ public class SearchBiz { ...@@ -134,8 +141,10 @@ public class SearchBiz {
ServiceResultVo<TourGood> tourGoodServiceResultVo = new ServiceResultVo<>(); ServiceResultVo<TourGood> tourGoodServiceResultVo = new ServiceResultVo<>();
ObjectRestResponse<PageDataVO<TourGood>> goodList = tourFeign.getGoodList(1, ServiceConstant.TOUR_LIMIT, null, keyWord); ObjectRestResponse<PageDataVO<TourGood>> goodList = tourFeign.getGoodList(1, ServiceConstant.TOUR_LIMIT, null, keyWord);
PageDataVO<TourGood> data = goodList.getData(); PageDataVO<TourGood> data = goodList.getData();
tourGoodServiceResultVo.setData(data.getData()); long totalCount = data==null?0:data.getTotalCount()==null?0:data.getTotalCount();
tourGoodServiceResultVo.setTotalCount(data.getTotalCount()); List<TourGood> result = data == null ? Collections.EMPTY_LIST : data.getData() == null ? Collections.EMPTY_LIST : data.getData();
tourGoodServiceResultVo.setData(result);
tourGoodServiceResultVo.setTotalCount(totalCount);
searchResultVo.put(ServiceConstant.TROUR, tourGoodServiceResultVo); searchResultVo.put(ServiceConstant.TROUR, tourGoodServiceResultVo);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
...@@ -158,8 +167,10 @@ public class SearchBiz { ...@@ -158,8 +167,10 @@ public class SearchBiz {
campsiteShopFindDTO.setName(keyWord); campsiteShopFindDTO.setName(keyWord);
ObjectRestResponse<PageDataVO<CampsiteShopPageVo>> campsiteShopPageForUncc = campsiteFeign.findCampsiteShopPageForUncc(campsiteShopFindDTO); ObjectRestResponse<PageDataVO<CampsiteShopPageVo>> campsiteShopPageForUncc = campsiteFeign.findCampsiteShopPageForUncc(campsiteShopFindDTO);
PageDataVO<CampsiteShopPageVo> data = campsiteShopPageForUncc.getData(); PageDataVO<CampsiteShopPageVo> data = campsiteShopPageForUncc.getData();
campsiteShopPageVoServiceResultVo.setData(data.getData()); long totalCount = data==null?0:data.getTotalCount()==null?0:data.getTotalCount();
campsiteShopPageVoServiceResultVo.setTotalCount(data.getTotalCount()); List<CampsiteShopPageVo> result = data == null ? Collections.EMPTY_LIST : data.getData() == null ? Collections.EMPTY_LIST : data.getData();
campsiteShopPageVoServiceResultVo.setData(result);
campsiteShopPageVoServiceResultVo.setTotalCount(totalCount);
searchResultVo.put(ServiceConstant.CAMPSITE, campsiteShopPageVoServiceResultVo); searchResultVo.put(ServiceConstant.CAMPSITE, campsiteShopPageVoServiceResultVo);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
...@@ -175,8 +186,10 @@ public class SearchBiz { ...@@ -175,8 +186,10 @@ public class SearchBiz {
try { try {
ServiceResultVo<SummitActivityVo> activityVoServiceResultVo = new ServiceResultVo<>(); ServiceResultVo<SummitActivityVo> activityVoServiceResultVo = new ServiceResultVo<>();
PageDataVO<SummitActivityVo> summitActivityWithPage = summitActivityBiz.findSummitActivityWithPage(1, ServiceConstant.ACTIVITY_LIMIT, null, keyWord); PageDataVO<SummitActivityVo> summitActivityWithPage = summitActivityBiz.findSummitActivityWithPage(1, ServiceConstant.ACTIVITY_LIMIT, null, keyWord);
activityVoServiceResultVo.setTotalCount(summitActivityWithPage.getTotalCount()); long totalCount = summitActivityWithPage==null?0:summitActivityWithPage.getTotalCount()==null?0:summitActivityWithPage.getTotalCount();
activityVoServiceResultVo.setData(summitActivityWithPage.getData()); List<SummitActivityVo> result = summitActivityWithPage == null ? Collections.EMPTY_LIST : summitActivityWithPage.getData() == null ? Collections.EMPTY_LIST : summitActivityWithPage.getData();
activityVoServiceResultVo.setTotalCount(totalCount);
activityVoServiceResultVo.setData(result);
searchResultVo.put(ServiceConstant.ACTIVITY, activityVoServiceResultVo); searchResultVo.put(ServiceConstant.ACTIVITY, activityVoServiceResultVo);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
...@@ -192,7 +205,8 @@ public class SearchBiz { ...@@ -192,7 +205,8 @@ public class SearchBiz {
try { try {
ServiceResultVo<Article> articleServiceResultVo = new ServiceResultVo<>(); ServiceResultVo<Article> articleServiceResultVo = new ServiceResultVo<>();
PageInfo articleList = articleBiz.getArticleList(1, ServiceConstant.NEWS_LIMIT, 1, keyWord); PageInfo articleList = articleBiz.getArticleList(1, ServiceConstant.NEWS_LIMIT, 1, keyWord);
articleServiceResultVo.setData(articleList.getList()); List<Article> result = articleList == null ? Collections.EMPTY_LIST : articleList.getList() == null ? Collections.EMPTY_LIST : articleList.getList();
articleServiceResultVo.setData(result);
articleServiceResultVo.setTotalCount(articleList.getTotal()); articleServiceResultVo.setTotalCount(articleList.getTotal());
searchResultVo.put(ServiceConstant.NEWS, articleServiceResultVo); searchResultVo.put(ServiceConstant.NEWS, articleServiceResultVo);
} catch (Exception ex) { } catch (Exception ex) {
......
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