记得上下班打卡 | 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
ec330de0
Commit
ec330de0
authored
Feb 25, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交bug
parent
9357af17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
GoblinStoreOrderListSkuVo.java
...dnet/service/goblin/dto/vo/GoblinStoreOrderListSkuVo.java
+2
-0
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+13
-6
GoblinStoreOrderServiceImpl.java
...blin/service/impl/manage/GoblinStoreOrderServiceImpl.java
+1
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinStoreOrderListSkuVo.java
View file @
ec330de0
...
@@ -13,6 +13,8 @@ public class GoblinStoreOrderListSkuVo implements Cloneable {
...
@@ -13,6 +13,8 @@ public class GoblinStoreOrderListSkuVo implements Cloneable {
private
String
orderSkuId
;
private
String
orderSkuId
;
@ApiModelProperty
(
value
=
"skuId"
)
@ApiModelProperty
(
value
=
"skuId"
)
private
String
skuId
;
private
String
skuId
;
@ApiModelProperty
(
value
=
"spu名称"
)
private
String
spuName
;
@ApiModelProperty
(
value
=
"sku名称"
)
@ApiModelProperty
(
value
=
"sku名称"
)
private
String
skuName
;
private
String
skuName
;
@ApiModelProperty
(
value
=
"款式"
)
@ApiModelProperty
(
value
=
"款式"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinCouponImpl.java
View file @
ec330de0
...
@@ -128,7 +128,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -128,7 +128,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
for
(
GoblinUserCouponVo
vo
:
voList
)
{
for
(
GoblinUserCouponVo
vo
:
voList
)
{
//判断券状态 和 触发金额
//判断券状态 和 触发金额
if
(
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
>
=
0
)
{
if
(
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<
=
0
)
{
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
//判断是否在可用商品内
//判断是否在可用商品内
for
(
String
item
:
spuIds
)
{
for
(
String
item
:
spuIds
)
{
...
@@ -138,8 +138,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -138,8 +138,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
tempPrice
=
vo
.
getValFace
();
tempPrice
=
vo
.
getValFace
();
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
tempPrice
=
totalPrice
.
multiply
(
vo
.
getDeduction
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
tempPrice
=
totalPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
else
if
(
vo
.
getType
().
equals
(
"3"
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
>=
0
)
{
//满减
if
(
tempPrice
.
compareTo
(
vo
.
getDeduction
())
>
0
)
{
tempPrice
=
vo
.
getDeduction
();
}
}
else
if
(
vo
.
getType
().
equals
(
"3"
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
//满减
tempPrice
=
vo
.
getValMinus
();
tempPrice
=
vo
.
getValMinus
();
}
}
if
(
maxPrice
.
compareTo
(
tempPrice
)
<
0
)
{
if
(
maxPrice
.
compareTo
(
tempPrice
)
<
0
)
{
...
@@ -183,7 +186,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -183,7 +186,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
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
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<
=
0
)
{
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
//判断是否在可用商品内
//判断是否在可用商品内
for
(
String
item
:
spuIds
)
{
for
(
String
item
:
spuIds
)
{
...
@@ -193,9 +196,13 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -193,9 +196,13 @@ public class GoblinCouponImpl implements GoblinCouponService {
returnVo
.
setValue
(
vo
.
getValFace
());
returnVo
.
setValue
(
vo
.
getValFace
());
returnVo
.
setCouType
(
vo
.
getType
());
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
}
else
if
(
vo
.
getType
().
equals
(
"2"
))
{
//折扣
returnVo
.
setValue
(
totalPrice
.
multiply
(
vo
.
getDeduction
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
BigDecimal
tempPrice
=
totalPrice
.
multiply
(
vo
.
getDiscount
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
tempPrice
.
compareTo
(
vo
.
getDeduction
())
>
0
)
{
tempPrice
=
vo
.
getDeduction
();
}
returnVo
.
setValue
(
tempPrice
);
returnVo
.
setCouType
(
vo
.
getType
());
returnVo
.
setCouType
(
vo
.
getType
());
}
else
if
(
vo
.
getType
().
equals
(
"3"
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
>
=
0
)
{
//满减
}
else
if
(
vo
.
getType
().
equals
(
"3"
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<
=
0
)
{
//满减
returnVo
.
setValue
(
vo
.
getValMinus
());
returnVo
.
setValue
(
vo
.
getValMinus
());
returnVo
.
setCouType
(
vo
.
getType
());
returnVo
.
setCouType
(
vo
.
getType
());
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreOrderServiceImpl.java
View file @
ec330de0
...
@@ -85,6 +85,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
...
@@ -85,6 +85,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
itemSkuVo
.
setOrderSkuId
(
orderSkuVo
.
getOrderSkuId
());
itemSkuVo
.
setOrderSkuId
(
orderSkuVo
.
getOrderSkuId
());
itemSkuVo
.
setSkuId
(
orderSkuVo
.
getSkuId
());
itemSkuVo
.
setSkuId
(
orderSkuVo
.
getSkuId
());
itemSkuVo
.
setSkuName
(
orderSkuVo
.
getSkuName
());
itemSkuVo
.
setSkuName
(
orderSkuVo
.
getSkuName
());
itemSkuVo
.
setSpuName
(
orderSkuVo
.
getSpuName
());
itemSkuVo
.
setSkuPriceActual
(
orderSkuVo
.
getSkuPriceActual
());
itemSkuVo
.
setSkuPriceActual
(
orderSkuVo
.
getSkuPriceActual
());
itemSkuVo
.
setSkuSpecs
(
orderSkuVo
.
getSkuSpecs
());
itemSkuVo
.
setSkuSpecs
(
orderSkuVo
.
getSkuSpecs
());
itemSkuVo
.
setSkuImage
(
orderSkuVo
.
getSkuImage
());
itemSkuVo
.
setSkuImage
(
orderSkuVo
.
getSkuImage
());
...
...
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