记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
2aa30b4e
Commit
2aa30b4e
authored
Nov 02, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~api:正在下单-参与活动的SPU:搜索排序调整;
parent
4fcb6947
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
GoblinStoreZhengzaiServiceImpl.java
...e/goblin/service/impl/GoblinStoreZhengzaiServiceImpl.java
+11
-5
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinStoreZhengzaiServiceImpl.java
View file @
2aa30b4e
...
@@ -17,6 +17,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -17,6 +17,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -84,13 +85,18 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi
...
@@ -84,13 +85,18 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi
}
}
List
<
GoblinMarketRelationVo
>
relationVo
=
redisUtils
.
getMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
(),
marketId
);
List
<
GoblinMarketRelationVo
>
relationVo
=
redisUtils
.
getMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
(),
marketId
);
List
<
String
>
spuIdList
=
relationVo
.
stream
().
map
(
GoblinMarketRelationVo:
:
getSpuId
).
collect
(
Collectors
.
toList
());
List
<
String
>
spuIdList
=
relationVo
.
stream
().
map
(
GoblinMarketRelationVo:
:
getSpuId
).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotBlank
(
keyword
))
{
spuIdList
=
mongoUtils
.
getSpuIdListBySpuIdListAndKeyword
(
spuIdList
,
keyword
);
// 支持搜索SPU
}
boolean
toSearchFlg
=
StringUtils
.
isNotBlank
(
keyword
);
List
<
String
>
hitSpuIdList
=
toSearchFlg
?
mongoUtils
.
getSpuIdListBySpuIdListAndKeyword
(
spuIdList
,
keyword
)
:
null
;
List
<
GoblinZhengzaiGoodVo
>
voList
=
ObjectUtil
.
getGoblinZhengzaiGoodVoArrayList
();
List
<
GoblinZhengzaiGoodVo
>
voList
=
ObjectUtil
.
getGoblinZhengzaiGoodVoArrayList
();
if
(
toSearchFlg
&&
CollectionUtils
.
isEmpty
(
hitSpuIdList
))
{
return
ResponseDto
.
success
(
voList
);
}
for
(
String
spuId
:
spuIdList
)
{
for
(
String
spuId
:
spuIdList
)
{
GoblinGoodsInfoVo
vo
=
redisUtils
.
getGoodsInfoVo
(
spuId
)
;
GoblinGoodsInfoVo
vo
=
!
toSearchFlg
||
hitSpuIdList
.
contains
(
spuId
)
?
redisUtils
.
getGoodsInfoVo
(
spuId
)
:
null
;
if
(
vo
.
getShelvesStatus
().
equals
(
"3"
)
&&
vo
.
getStoreId
().
equals
(
storeId
))
{
if
(
null
!=
vo
&&
vo
.
getShelvesStatus
().
equals
(
"3"
)
&&
vo
.
getStoreId
().
equals
(
storeId
))
{
GoblinZhengzaiGoodVo
returnVo
=
GoblinZhengzaiGoodVo
.
getNew
();
GoblinZhengzaiGoodVo
returnVo
=
GoblinZhengzaiGoodVo
.
getNew
();
BeanUtils
.
copyProperties
(
vo
,
returnVo
);
BeanUtils
.
copyProperties
(
vo
,
returnVo
);
voList
.
add
(
returnVo
);
voList
.
add
(
returnVo
);
...
...
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