Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-wx-store-sharer
Overview
Overview
Details
Activity
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
wx
yanxuan-wx-store-sharer
Commits
60e2ba88
Commit
60e2ba88
authored
Mar 17, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品列表检索为空,返回参处理
parent
998af54f
Pipeline
#71669
passed with stages
in 1 minute 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
ProductServiceImpl.java
.../wx/store/sharer/biz/service/impl/ProductServiceImpl.java
+6
-5
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/ProductServiceImpl.java
View file @
60e2ba88
...
@@ -57,10 +57,11 @@ public class ProductServiceImpl implements IProductService {
...
@@ -57,10 +57,11 @@ public class ProductServiceImpl implements IProductService {
pageQuery
.
getNextKey
(),
pageQuery
.
getPageSize
());
pageQuery
.
getNextKey
(),
pageQuery
.
getPageSize
());
log
.
info
(
"商品列表查询结束:{}"
,
System
.
currentTimeMillis
());
log
.
info
(
"商品列表查询结束:{}"
,
System
.
currentTimeMillis
());
pageVO
.
setHasMore
(
false
);
pageVO
.
setHasMore
(
false
);
List
<
ProductListVO
>
productList
=
new
ArrayList
<>(
0
);
// 商品列表
// 商品列表
if
(!
CollectionUtils
.
isEmpty
(
productListVO
.
getProduct_list
()))
{
if
(!
CollectionUtils
.
isEmpty
(
productListVO
.
getProduct_list
()))
{
// 使用异步多线程处理
// 使用异步多线程处理
List
<
ProductListVO
>
productList
=
AsyncUtils
.
processListAsync
(
productListVO
.
getProduct_list
(),
item
->
{
productList
=
AsyncUtils
.
processListAsync
(
productListVO
.
getProduct_list
(),
item
->
{
WeChatPromoteProductDetailVO
detailVO
=
getProductDetailCache
(
item
.
getShop_appid
(),
item
.
getProduct_id
());
WeChatPromoteProductDetailVO
detailVO
=
getProductDetailCache
(
item
.
getShop_appid
(),
item
.
getProduct_id
());
WeChatPromoteProductDetailVO
.
WeChatPromoteProductVO
product
=
detailVO
.
getProduct
();
WeChatPromoteProductDetailVO
.
WeChatPromoteProductVO
product
=
detailVO
.
getProduct
();
if
(
null
==
product
)
{
if
(
null
==
product
)
{
...
@@ -127,11 +128,11 @@ public class ProductServiceImpl implements IProductService {
...
@@ -127,11 +128,11 @@ public class ProductServiceImpl implements IProductService {
.
stream
()
.
stream
()
.
filter
(
Objects:
:
nonNull
)
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
boolean
isEmpty
=
CollectionUtils
.
isEmpty
(
productList
);
pageVO
.
setList
(
isEmpty
?
new
ArrayList
<>(
0
)
:
productList
);
pageVO
.
setHasMore
(!
isEmpty
&&
productList
.
size
()
>=
pageQuery
.
getPageSize
());
pageVO
.
setNextKey
(
productListVO
.
getNext_key
());
}
}
boolean
isEmpty
=
CollectionUtils
.
isEmpty
(
productList
);
pageVO
.
setList
(
isEmpty
?
new
ArrayList
<>(
0
)
:
productList
);
pageVO
.
setHasMore
(!
isEmpty
&&
productList
.
size
()
>=
pageQuery
.
getPageSize
());
pageVO
.
setNextKey
(
productListVO
.
getNext_key
());
log
.
info
(
"商品列表查询返回:{}"
,
System
.
currentTimeMillis
());
log
.
info
(
"商品列表查询返回:{}"
,
System
.
currentTimeMillis
());
return
pageVO
;
return
pageVO
;
}
}
...
...
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