记得上下班打卡 | 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
ef02988e
Commit
ef02988e
authored
Feb 25, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:用户端获取商品活动优惠券+约束条件:根据是否开放领取来返回活动详情;
parent
0f6b0414
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+6
-2
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinCouponImpl.java
View file @
ef02988e
...
@@ -42,8 +42,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -42,8 +42,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
spuId
=
spuId
.
split
(
pre
)[
0
];
spuId
=
spuId
.
split
(
pre
)[
0
];
}
}
List
<
GoblinStoreCouponVo
>
listVo
=
goblinRedisUtils
.
getGoodsMarketsForCoupon
(
spuId
,
storeId
);
List
<
GoblinStoreCouponVo
>
listVo
=
goblinRedisUtils
.
getGoodsMarketsForCoupon
(
spuId
,
storeId
);
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinStoreCouponVo
vo
:
listVo
)
{
for
(
GoblinStoreCouponVo
vo
:
listVo
)
{
if
(!
returnList
.
contains
(
vo
.
getType
())
&&
LocalDateTime
.
now
().
isAfter
(
vo
.
getStartTime
())
&&
LocalDateTime
.
now
().
isBefore
(
vo
.
getEndTime
()))
{
if
(!
returnList
.
contains
(
vo
.
getType
())
&&
"1"
.
equals
(
vo
.
getReceiveCurb
())
&&
now
.
isAfter
(
vo
.
getStartTime
())
&&
now
.
isBefore
(
vo
.
getEndTime
()))
{
returnList
.
add
(
vo
.
getType
());
returnList
.
add
(
vo
.
getType
());
}
}
}
}
...
@@ -58,8 +60,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -58,8 +60,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
spuId
=
spuId
.
split
(
pre
)[
0
];
spuId
=
spuId
.
split
(
pre
)[
0
];
}
}
List
<
GoblinStoreCouponVo
>
listVo
=
goblinRedisUtils
.
getGoodsMarketsForCoupon
(
spuId
,
storeId
);
List
<
GoblinStoreCouponVo
>
listVo
=
goblinRedisUtils
.
getGoodsMarketsForCoupon
(
spuId
,
storeId
);
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinStoreCouponVo
vo
:
listVo
)
{
for
(
GoblinStoreCouponVo
vo
:
listVo
)
{
if
(
vo
.
getType
().
equals
(
type
)
&&
LocalDateTime
.
now
().
isAfter
(
vo
.
getStartTime
())
&&
LocalDateTime
.
now
().
isBefore
(
vo
.
getEndTime
()))
{
if
(
vo
.
getType
().
equals
(
type
)
&&
"1"
.
equals
(
vo
.
getReceiveCurb
())
&&
now
.
isAfter
(
vo
.
getStartTime
())
&&
now
.
isBefore
(
vo
.
getEndTime
()))
{
vo
.
setStock
(
null
);
vo
.
setStock
(
null
);
returnList
.
add
(
vo
);
returnList
.
add
(
vo
);
}
}
...
...
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