记得上下班打卡 | 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
09f8c60e
Commit
09f8c60e
authored
Feb 15, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改vo
parent
ff0327fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
GoblinFrontController.java
...dnet/service/goblin/controller/GoblinFrontController.java
+2
-2
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+10
-4
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinFrontController.java
View file @
09f8c60e
...
...
@@ -122,8 +122,8 @@ public class GoblinFrontController {
return
ResponseDto
.
success
(
goblinFrontService
.
getStoreGoodes
(
storeId
,
categoryId
,
name
));
}
@GetMapping
(
"searchGoodesName"
)
@ApiOperation
(
"搜索商品名字"
)
public
ResponseDto
<
List
<
GoblinGoodsInfoVo
>>
searchGoodesName
(
@RequestParam
(
name
=
"name"
,
required
=
true
)
String
name
)
throws
ParseException
{
@ApiOperation
(
"搜索商品名字
、或商铺名字
"
)
public
ResponseDto
<
List
<
GoblinGoodsInfo
List
Vo
>>
searchGoodesName
(
@RequestParam
(
name
=
"name"
,
required
=
true
)
String
name
)
throws
ParseException
{
if
(
StringUtil
.
isNotBlank
(
name
)){
return
ResponseDto
.
success
(
goblinFrontService
.
searchGoodesName
(
name
));
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
09f8c60e
...
...
@@ -401,7 +401,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
return
goblinCategoryzfVo
;
}
public
List
<
GoblinGoodsInfoVo
>
searchGoodesName
(
String
name
){
public
List
<
GoblinGoodsInfo
List
Vo
>
searchGoodesName
(
String
name
){
List
<
String
>
listStore
=
mongoUtils
.
getStoreInfoVoRegexName
(
name
);
Pattern
pattern
=
Pattern
.
compile
(
"^.*"
+
name
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
Query
query
=
new
Query
();
...
...
@@ -416,25 +416,31 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
Sort
.
Order
.
desc
(
"createdAt"
)
));
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
ArrayList
<
GoblinGoodsInfo
Vo
>
list1
=
ObjectUtil
.
goblinGoodsInfoVoArrayList
();
ArrayList
<
GoblinGoodsInfo
ListVo
>
list1
=
ObjectUtil
.
getGoblinGoodsInfoListVo
();
//遍历
for
(
GoblinGoodsInfoVo
goblinGoodsInfoVo:
list
){
//有音乐人的放前面
if
(
null
!=
goblinGoodsInfoVo
.
getExtagVoList
()&&
goblinGoodsInfoVo
.
getExtagVoList
().
size
()>
0
){
GoblinStoreInfoVo
goblinStoreInfoVo
=
goblinRedisUtils
.
getStoreInfoVo
(
goblinGoodsInfoVo
.
getStoreId
());
if
(
null
!=
goblinStoreInfoVo
){
goblinGoodsInfoVo
.
setStoreName
(
goblinStoreInfoVo
.
getStoreName
());
}
list1
.
add
(
goblinGoodsInfoVo
);
GoblinGoodsInfoListVo
goblinGoodsInfoListVo
=
GoblinGoodsInfoListVo
.
getNew
();
BeanUtils
.
copyProperties
(
goblinGoodsInfoVo
,
goblinGoodsInfoListVo
);
list1
.
add
(
goblinGoodsInfoListVo
);
}
}
for
(
GoblinGoodsInfoVo
goblinGoodsInfoVo:
list
){
if
(
null
!=
goblinGoodsInfoVo
.
getExtagVoList
()&&
goblinGoodsInfoVo
.
getExtagVoList
().
size
()>
0
){
}
else
{
//无音乐人标签的
GoblinStoreInfoVo
goblinStoreInfoVo
=
goblinRedisUtils
.
getStoreInfoVo
(
goblinGoodsInfoVo
.
getStoreId
());
if
(
null
!=
goblinStoreInfoVo
){
goblinGoodsInfoVo
.
setStoreName
(
goblinStoreInfoVo
.
getStoreName
());
}
list1
.
add
(
goblinGoodsInfoVo
);
GoblinGoodsInfoListVo
goblinGoodsInfoListVo
=
GoblinGoodsInfoListVo
.
getNew
();
BeanUtils
.
copyProperties
(
goblinGoodsInfoVo
,
goblinGoodsInfoListVo
);
list1
.
add
(
goblinGoodsInfoListVo
);
}
}
return
list1
;
...
...
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