记得上下班打卡 | 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
bc1ce400
Commit
bc1ce400
authored
Oct 25, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品列表
parent
f0d14263
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
StoneItemListVo.java
.../java/com/liquidnet/service/stone/vo/StoneItemListVo.java
+2
-2
StoneScoreLogsServiceImpl.java
...service/stone/service/impl/StoneScoreLogsServiceImpl.java
+1
-1
StoneMongoUtils.java
...ava/com/liquidnet/service/stone/util/StoneMongoUtils.java
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-stone-api/src/main/java/com/liquidnet/service/stone/vo/StoneItemListVo.java
View file @
bc1ce400
...
@@ -75,9 +75,9 @@ public class StoneItemListVo implements Serializable, Cloneable {
...
@@ -75,9 +75,9 @@ public class StoneItemListVo implements Serializable, Cloneable {
this
.
setPrice
(
source
.
getPrice
());
this
.
setPrice
(
source
.
getPrice
());
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
if
(
source
.
getStatus
()
==
2
)
{
if
(
source
.
getStatus
()
==
2
)
{
if
(
now
.
is
After
(
source
.
getStartTime
()))
{
//未上架
if
(
now
.
is
Before
(
source
.
getStartTime
()))
{
//未上架
this
.
setStatus
(
2
);
this
.
setStatus
(
2
);
}
else
if
(
now
.
is
Before
(
source
.
getEndTime
()))
{
//已下架
}
else
if
(
now
.
is
After
(
source
.
getEndTime
()))
{
//已下架
this
.
setStatus
(
7
);
this
.
setStatus
(
7
);
}
else
{
}
else
{
this
.
setStatus
(
1
);
//上架中
this
.
setStatus
(
1
);
//上架中
...
...
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/service/impl/StoneScoreLogsServiceImpl.java
View file @
bc1ce400
...
@@ -154,7 +154,7 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
...
@@ -154,7 +154,7 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
voList
=
stoneRedisUtils
.
getLogsList
(
uid
);
voList
=
stoneRedisUtils
.
getLogsList
(
uid
);
count
=
voList
.
size
();
count
=
voList
.
size
();
}
else
{
}
else
{
HashMap
<
String
,
Object
>
info
=
stoneMongoUtils
.
itemListPage
(
page
,
size
);
HashMap
<
String
,
Object
>
info
=
stoneMongoUtils
.
logList
(
uid
,
page
,
size
);
try
{
try
{
voList
=
(
List
<
StoneScoreLogs
>)
info
.
get
(
"data"
);
voList
=
(
List
<
StoneScoreLogs
>)
info
.
get
(
"data"
);
count
=
(
long
)
info
.
get
(
"total"
);
count
=
(
long
)
info
.
get
(
"total"
);
...
...
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/util/StoneMongoUtils.java
View file @
bc1ce400
...
@@ -75,7 +75,7 @@ public class StoneMongoUtils {
...
@@ -75,7 +75,7 @@ public class StoneMongoUtils {
// 排序 分页
// 排序 分页
Pageable
pageable
=
PageRequest
.
of
(
page
-
1
,
size
,
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"createdAt"
));
Pageable
pageable
=
PageRequest
.
of
(
page
-
1
,
size
,
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"createdAt"
));
//条件
//条件
Query
query
=
Query
.
query
(
Criteria
.
where
(
"status"
).
is
(
1
));
//.orOperator(Criteria.where("status").is(2).and("startTime").lt(now).and("endTime").gt
(now)));
Query
query
=
Query
.
query
(
new
Criteria
().
orOperator
(
Criteria
.
where
(
"status"
).
is
(
1
),
Criteria
.
where
(
"status"
).
is
(
2
).
and
(
"startTime"
).
lte
(
now
).
and
(
"endTime"
).
gte
(
now
)));
// 查询总数
// 查询总数
long
count
=
mongoTemplate
.
count
(
query
,
StoneScoreItems
.
class
,
StoneScoreItems
.
class
.
getSimpleName
());
long
count
=
mongoTemplate
.
count
(
query
,
StoneScoreItems
.
class
,
StoneScoreItems
.
class
.
getSimpleName
());
query
.
with
(
pageable
);
query
.
with
(
pageable
);
...
...
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