Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
fcf3e909
Commit
fcf3e909
authored
Dec 10, 2020
by
unset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-chw-bug' into master-chw
parents
7da8e31f
42f5dc2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
34 deletions
+32
-34
SearchBiz.java
...r/src/main/java/com/xxfc/platform/uccn/biz/SearchBiz.java
+18
-20
SearchController.java
...in/java/com/xxfc/platform/uccn/rest/SearchController.java
+14
-14
No files found.
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/SearchBiz.java
View file @
fcf3e909
...
...
@@ -2,7 +2,6 @@ package com.xxfc.platform.uccn.biz;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
...
...
@@ -12,7 +11,6 @@ import com.xxfc.platform.campsite.vo.CampsiteShopPageVo;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.uccn.comstnt.ServiceConstant
;
import
com.xxfc.platform.uccn.entity.Article
;
import
com.xxfc.platform.uccn.vo.SearchResultVo
;
import
com.xxfc.platform.uccn.vo.ServiceResultVo
;
import
com.xxfc.platform.uccn.vo.SummitActivityVo
;
...
...
@@ -199,24 +197,24 @@ public class SearchBiz {
}
});
//新闻
threadPoolTaskExecutor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
ServiceResultVo
<
Article
>
articleServiceResultVo
=
new
ServiceResultVo
<>();
PageInfo
articleList
=
articleBiz
.
getArticleList
(
1
,
ServiceConstant
.
NEWS_LIMIT
,
1
,
keyWord
);
List
<
Article
>
result
=
articleList
==
null
?
Collections
.
EMPTY_LIST
:
articleList
.
getList
()
==
null
?
Collections
.
EMPTY_LIST
:
articleList
.
getList
();
articleServiceResultVo
.
setData
(
result
);
articleServiceResultVo
.
setTotalCount
(
articleList
.
getTotal
());
searchResultVo
.
put
(
ServiceConstant
.
NEWS
,
articleServiceResultVo
);
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
}
finally
{
latch
.
countDown
();
}
}
});
//
threadPoolTaskExecutor.execute(new Runnable() {
//
@Override
//
public void run() {
//
try {
//
ServiceResultVo<Article> articleServiceResultVo = new ServiceResultVo<>();
//
PageInfo articleList = articleBiz.getArticleList(1, ServiceConstant.NEWS_LIMIT, 1, keyWord);
//
List<Article> result = articleList == null ? Collections.EMPTY_LIST : articleList.getList() == null ? Collections.EMPTY_LIST : articleList.getList();
//
articleServiceResultVo.setData(result);
//
articleServiceResultVo.setTotalCount(articleList.getTotal());
//
searchResultVo.put(ServiceConstant.NEWS, articleServiceResultVo);
//
} catch (Exception ex) {
//
ex.printStackTrace();
//
} finally {
//
latch.countDown();
//
}
//
//
}
//
});
try
{
latch
.
await
();
}
catch
(
InterruptedException
e
)
{
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/SearchController.java
View file @
fcf3e909
package
com
.
xxfc
.
platform
.
uccn
.
rest
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.campsite.vo.CampsiteShopPageVo
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.uccn.biz.SearchBiz
;
import
com.xxfc.platform.uccn.comstnt.ServiceConstant
;
import
com.xxfc.platform.uccn.entity.Article
;
import
com.xxfc.platform.uccn.vo.SearchResultVo
;
import
com.xxfc.platform.uccn.vo.ServiceResultVo
;
import
com.xxfc.platform.uccn.vo.SummitActivityVo
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelQueryCondition
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelVo
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
...
...
@@ -19,7 +16,10 @@ import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyListVO;
import
io.swagger.annotations.Api
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
...
...
@@ -106,16 +106,16 @@ public class SearchController {
campsiteSearchResultVo
.
put
(
ServiceConstant
.
CAMPSITE
,
campsiteShopPageVoServiceResultVo
);
return
ObjectRestResponse
.
succ
(
campsiteSearchResultVo
);
case
ServiceConstant
.
NEWS
:
ObjectRestResponse
articleresult
=
articleController
.
getArticleList
(
page
,
limit
,
1
,
keyWord
);
PageInfo
<
Article
>
articlePageDataVO
=
(
PageInfo
<
Article
>)
articleresult
.
getData
();
List
<
Article
>
articleList
=
articlePageDataVO
.
getList
();
Long
articleTotalCount
=
articlePageDataVO
.
getTotal
();
ServiceResultVo
<
Article
>
articleServiceResultVo
=
new
ServiceResultVo
<>();
articleServiceResultVo
.
setTotalCount
(
articleTotalCount
);
articleServiceResultVo
.
setData
(
articleList
);
SearchResultVo
articleSearchResult
=
new
SearchResultVo
();
articleSearchResult
.
put
(
ServiceConstant
.
NEWS
,
articleServiceResultVo
);
return
ObjectRestResponse
.
succ
(
articleSearchResult
);
//
ObjectRestResponse articleresult = articleController.getArticleList(page, limit, 1, keyWord);
//
PageInfo<Article> articlePageDataVO = (PageInfo<Article>)articleresult.getData();
//
List<Article> articleList = articlePageDataVO.getList();
//
Long articleTotalCount = articlePageDataVO.getTotal();
//
ServiceResultVo<Article> articleServiceResultVo = new ServiceResultVo<>();
//
articleServiceResultVo.setTotalCount(articleTotalCount);
//
articleServiceResultVo.setData(articleList);
//
SearchResultVo articleSearchResult= new SearchResultVo();
//
articleSearchResult.put(ServiceConstant.NEWS,articleServiceResultVo);
//
return ObjectRestResponse.succ(articleSearchResult);
case
ServiceConstant
.
ACTIVITY
:
ObjectRestResponse
<
PageDataVO
<
SummitActivityVo
>>
summitActivityWithPage
=
summitActivityController
.
findSummitActivityWithPage
(
page
,
limit
,
null
,
keyWord
);
List
<
SummitActivityVo
>
summitActivityVos
=
summitActivityWithPage
.
getData
().
getData
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment