记得上下班打卡 | 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
111172ef
Commit
111172ef
authored
May 23, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存回滚定时任务,增加 开售后所有库存回滚
parent
e6815080
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
24 deletions
+28
-24
GoblinNftJobServiceImpl.java
...ce/goblin/service/impl/inner/GoblinNftJobServiceImpl.java
+1
-1
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+27
-23
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/inner/GoblinNftJobServiceImpl.java
View file @
111172ef
...
@@ -286,7 +286,7 @@ public class GoblinNftJobServiceImpl {
...
@@ -286,7 +286,7 @@ public class GoblinNftJobServiceImpl {
List
<
GoblinNftGoodsSkuListJobVo
>
notStartSkuInfoVos
=
mongoTemplate
.
find
(
query1
,
GoblinNftGoodsSkuListJobVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
List
<
GoblinNftGoodsSkuListJobVo
>
notStartSkuInfoVos
=
mongoTemplate
.
find
(
query1
,
GoblinNftGoodsSkuListJobVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
for
(
GoblinNftGoodsSkuListJobVo
item
:
notStartSkuInfoVos
)
{
for
(
GoblinNftGoodsSkuListJobVo
item
:
notStartSkuInfoVos
)
{
goblinRedisUtils
.
goblinNftListStock
(
now
,
item
.
getSkuId
());
goblinRedisUtils
.
goblinNftListStock
(
now
,
item
.
getSkuId
()
,
item
.
getSaleStartTime
()
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
111172ef
...
@@ -881,37 +881,41 @@ public class GoblinRedisUtils {
...
@@ -881,37 +881,41 @@ public class GoblinRedisUtils {
* @param skuId
* @param skuId
* @return
* @return
*/
*/
public
GoblinListCollectVo
goblinNftListStock
(
LocalDateTime
now
,
String
skuId
)
{
public
void
goblinNftListStock
(
LocalDateTime
now
,
String
skuId
,
LocalDateTime
saleStartTime
)
{
GoblinListCollectVo
collectVo
=
null
;
GoblinListCollectVo
collectVo
=
null
;
GoblinListCollectVo
collectTemp
=
null
;
GoblinListCollectVo
collectTemp
=
null
;
List
<
GoblinListCollectVo
>
collectVos
=
getGoblinListCollect
(
skuId
);
List
<
GoblinListCollectVo
>
collectVos
=
getGoblinListCollect
(
skuId
);
for
(
int
i
=
0
;
i
<
collectVos
.
size
();
i
++)
{
if
(
now
.
isAfter
(
saleStartTime
)){
GoblinListCollectVo
collectVoItem
=
collectVos
.
get
(
i
);
lastStockToLastStock
(
0
,
collectVos
,
null
,
skuId
);
if
(
now
.
isAfter
(
collectVoItem
.
getTimeStart
())
&&
collectVoItem
.
getTimeEnd
()
==
null
)
{
}
else
{
if
(
collectTemp
==
null
||
collectTemp
.
getTimeStart
().
isBefore
(
collectVoItem
.
getTimeStart
()))
{
for
(
int
i
=
0
;
i
<
collectVos
.
size
();
i
++)
{
collectTemp
=
collectVoItem
;
GoblinListCollectVo
collectVoItem
=
collectVos
.
get
(
i
);
if
(
now
.
isAfter
(
collectVoItem
.
getTimeStart
())
&&
collectVoItem
.
getTimeEnd
()
==
null
)
{
if
(
collectTemp
==
null
||
collectTemp
.
getTimeStart
().
isBefore
(
collectVoItem
.
getTimeStart
()))
{
collectTemp
=
collectVoItem
;
}
}
else
if
(
now
.
isAfter
(
collectVoItem
.
getTimeStart
())
&&
now
.
isBefore
(
collectVoItem
.
getTimeEnd
()))
{
collectVo
=
collectVoItem
;
break
;
}
else
if
(
collectVoItem
.
getTimeEnd
()
!=
null
&&
now
.
isAfter
(
collectVoItem
.
getTimeEnd
()))
{
collectTemp
=
null
;
}
}
}
else
if
(
now
.
isAfter
(
collectVoItem
.
getTimeStart
())
&&
now
.
isBefore
(
collectVoItem
.
getTimeEnd
()))
{
collectVo
=
collectVoItem
;
break
;
}
else
if
(
collectVoItem
.
getTimeEnd
()
!=
null
&&
now
.
isAfter
(
collectVoItem
.
getTimeEnd
()))
{
collectTemp
=
null
;
}
}
}
if
(
collectVo
==
null
)
{
if
(
collectVo
==
null
)
{
collectVo
=
collectTemp
;
collectVo
=
collectTemp
;
}
}
if
(
collectVo
==
null
)
{
if
(
collectVo
==
null
)
{
GoblinListCollectVo
collectNext
=
getCollectByNowNext
(
now
,
skuId
);
GoblinListCollectVo
collectNext
=
getCollectByNowNext
(
now
,
skuId
);
if
(
collectNext
==
null
)
{
if
(
collectNext
==
null
)
{
lastStockToLastStock
(
0
,
collectVos
,
null
,
skuId
);
lastStockToLastStock
(
0
,
collectVos
,
null
,
skuId
);
}
else
{
lastStockToLastStock
(
1
,
collectVos
,
collectNext
,
skuId
);
}
}
else
{
}
else
{
lastStockToLastStock
(
1
,
collectVos
,
collect
Next
,
skuId
);
lastStockToLastStock
(
1
,
collectVos
,
collect
Vo
,
skuId
);
}
}
}
else
{
lastStockToLastStock
(
1
,
collectVos
,
collectVo
,
skuId
);
}
}
return
collectVo
;
//
return collectVo;
}
}
/**
/**
...
...
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