记得上下班打卡 | 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
441ba20b
Commit
441ba20b
authored
Jan 21, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改搜索条件
parent
3e1b1340
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+7
-5
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
441ba20b
...
...
@@ -309,9 +309,10 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
public
GoblinStoreInfoVo
getStore
(
String
storId
){
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storId
));
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storId
)
.
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
)
);
long
count
=
mongoTemplate
.
count
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
GoblinStoreInfoVo
goblinStoreInfoVo
=
goblinRedisUtils
.
getStoreInfoVo
(
storId
);
//GoblinStoreNoticeVo goblinStoreNoticeVo=goblinRedisUtils.getStoreNoticeVo(storId,LocalDateTime.now());
goblinStoreInfoVo
.
setCount
((
int
)
count
);
return
goblinStoreInfoVo
;
}
...
...
@@ -357,7 +358,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public
List
<
GoblinGoodsInfoVo
>
searchGoodesName
(
String
name
){
Pattern
pattern
=
Pattern
.
compile
(
"^.*"
+
name
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"name"
).
regex
(
pattern
));
query
.
addCriteria
(
Criteria
.
where
(
"name"
).
regex
(
pattern
)
.
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
)
);
query
.
with
(
Sort
.
by
(
Sort
.
Order
.
desc
(
"count"
),
Sort
.
Order
.
desc
(
"createdAt"
)
...
...
@@ -389,7 +390,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public
GoblinFrontCategoryListVo
getStoreGoodes
(
String
storeId
,
String
categoryId
,
String
name
){
//
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
));
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
)
.
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
)
);
if
(
StringUtil
.
isNotBlank
(
categoryId
)){
query
.
addCriteria
(
new
Criteria
().
orOperator
(
Criteria
.
where
(
"storeCateFid"
).
is
(
categoryId
),
...
...
@@ -431,7 +432,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
//
Query
query
=
new
Query
();
query
.
addCriteria
(
new
Criteria
().
orOperator
(
Criteria
.
where
(
"extagVoList.tagId"
).
is
(
tagId
)
Criteria
.
where
(
"extagVoList.tagId"
).
is
(
tagId
)
.
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
)
));
Pageable
pageable
=
null
;
//
...
...
@@ -484,6 +485,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
Criteria
.
where
(
"cateSid"
).
is
(
categoryId
),
Criteria
.
where
(
"cateTid"
).
is
(
categoryId
)
));
query
.
addCriteria
(
Criteria
.
where
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
));
Pageable
pageable
=
null
;
//
if
(
type
.
equals
(
"1"
)){
...
...
@@ -532,7 +534,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
if
(
StringUtil
.
isNotBlank
(
spuids
)){
query
.
addCriteria
(
Criteria
.
where
(
"spuId"
).
nin
(
spuids
.
split
(
","
)));
}
query
.
addCriteria
(
Criteria
.
where
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
));
query
.
addCriteria
(
Criteria
.
where
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
)
.
and
(
"spuAppear"
).
is
(
"0"
)
);
//redis里面获取排序规则 1、上架时间2、销量3、价格高到低4、价格低到高
int
sortType
=
0
;
...
...
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