记得上下班打卡 | 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
e5efe9bf
Commit
e5efe9bf
authored
Mar 11, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~goblin:coupon.valid;
parent
ca2f0db7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+12
-5
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 @
e5efe9bf
...
@@ -110,17 +110,18 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -110,17 +110,18 @@ public class GoblinCouponImpl implements GoblinCouponService {
List
<
GoblinUserCouponVo
>
returnList
=
ObjectUtil
.
getGoblinUserCouponVo
();
List
<
GoblinUserCouponVo
>
returnList
=
ObjectUtil
.
getGoblinUserCouponVo
();
// HashMap<String, String> storeIdNameMap = CollectionUtil.mapStringString();
// HashMap<String, String> storeIdNameMap = CollectionUtil.mapStringString();
// GoblinStoreInfoVo storeInfoVoTmp;
// GoblinStoreInfoVo storeInfoVoTmp;
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinUserCouponVo
vo
:
voList
)
{
for
(
GoblinUserCouponVo
vo
:
voList
)
{
// if (StringUtils.isNotEmpty(vo.getStoreId())) {
// if (StringUtils.isNotEmpty(vo.getStoreId())) {
// storeInfoVoTmp = goblinRedisUtils.getStoreInfoVo(vo.getStoreId());
// storeInfoVoTmp = goblinRedisUtils.getStoreInfoVo(vo.getStoreId());
// vo.setStoreName(storeIdNameMap.getOrDefault(vo.getStoreId(), null == storeInfoVoTmp ? null : storeInfoVoTmp.getStoreName()));
// vo.setStoreName(storeIdNameMap.getOrDefault(vo.getStoreId(), null == storeInfoVoTmp ? null : storeInfoVoTmp.getStoreName()));
// }
// }
if
(
"1"
.
equals
(
type
))
{
if
(
"1"
.
equals
(
type
))
{
if
(
vo
.
getState
().
equals
(
1
))
{
if
(
vo
.
get
DuedAt
().
isAfter
(
now
)
&&
vo
.
get
State
().
equals
(
1
))
{
returnList
.
add
(
vo
);
returnList
.
add
(
vo
);
}
}
}
else
{
}
else
{
if
(
vo
.
getState
().
equals
(
3
)
||
vo
.
getState
().
equals
(
5
))
{
if
(
vo
.
get
DuedAt
().
isBefore
(
now
)
||
vo
.
get
State
().
equals
(
3
)
||
vo
.
getState
().
equals
(
5
))
{
returnList
.
add
(
vo
);
returnList
.
add
(
vo
);
}
}
}
}
...
@@ -134,9 +135,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -134,9 +135,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
BigDecimal
maxPrice
=
BigDecimal
.
ZERO
;
BigDecimal
maxPrice
=
BigDecimal
.
ZERO
;
GoblinUserCouponVo
returnVo
=
GoblinUserCouponVo
.
getNew
();
GoblinUserCouponVo
returnVo
=
GoblinUserCouponVo
.
getNew
();
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinUserCouponVo
vo
:
voList
)
{
for
(
GoblinUserCouponVo
vo
:
voList
)
{
//判断券状态 和 触发金额
//判断券状态 和 触发金额
if
(
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
&&
vo
.
getStoreId
().
equals
(
storeId
))
{
if
(
vo
.
get
DuedAt
().
isAfter
(
now
)
&&
vo
.
get
State
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
&&
vo
.
getStoreId
().
equals
(
storeId
))
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
BigDecimal
tempPrice
=
BigDecimal
.
ZERO
;
BigDecimal
tempPrice
=
BigDecimal
.
ZERO
;
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
...
@@ -189,9 +192,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -189,9 +192,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
public
List
<
GoblinUserCouponVo
>
useList
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
)
{
public
List
<
GoblinUserCouponVo
>
useList
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
)
{
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
List
<
GoblinUserCouponVo
>
returnList
=
ObjectUtil
.
getGoblinUserCouponVo
();
List
<
GoblinUserCouponVo
>
returnList
=
ObjectUtil
.
getGoblinUserCouponVo
();
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinUserCouponVo
vo
:
voList
)
{
for
(
GoblinUserCouponVo
vo
:
voList
)
{
//判断券状态 和 触发金额
//判断券状态 和 触发金额
if
(
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
if
(
vo
.
get
DuedAt
().
isAfter
(
now
)
&&
vo
.
get
State
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
returnList
.
add
(
vo
);
returnList
.
add
(
vo
);
}
else
{
}
else
{
...
@@ -220,10 +225,12 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -220,10 +225,12 @@ public class GoblinCouponImpl implements GoblinCouponService {
GoblinUseResultVo
returnVo
=
GoblinUseResultVo
.
getNew
();
GoblinUseResultVo
returnVo
=
GoblinUseResultVo
.
getNew
();
returnVo
.
setValue
(
BigDecimal
.
ZERO
);
returnVo
.
setValue
(
BigDecimal
.
ZERO
);
returnVo
.
setCouType
(
"-1"
);
returnVo
.
setCouType
(
"-1"
);
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinUserCouponVo
vo
:
voList
)
{
for
(
GoblinUserCouponVo
vo
:
voList
)
{
if
(
vo
.
getUcouponId
().
equals
(
ucouponId
))
{
if
(
vo
.
getUcouponId
().
equals
(
ucouponId
))
{
//判断券状态 和 触发金额
//判断券状态 和 触发金额
if
(
(
vo
.
getState
().
equals
(
1
)
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
if
(
vo
.
getDuedAt
().
isAfter
(
now
)
&&
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
returnVo
.
setValue
(
vo
.
getValFace
());
returnVo
.
setValue
(
vo
.
getValFace
());
...
...
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