记得上下班打卡 | 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
8c581be1
Commit
8c581be1
authored
Mar 29, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉券的处理
parent
6590205e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
GoblinNftOrderPayParam.java
...iquidnet/service/goblin/param/GoblinNftOrderPayParam.java
+2
-2
GoblinNftOrderServiceImpl.java
...service/order/service/impl/GoblinNftOrderServiceImpl.java
+9
-7
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/param/GoblinNftOrderPayParam.java
View file @
8c581be1
...
...
@@ -19,11 +19,11 @@ public class GoblinNftOrderPayParam {
@NotBlank
(
message
=
"skuId不能为空"
)
private
String
skuId
;
@ApiModelProperty
(
position
=
12
,
value
=
"平台券码"
)
/*
@ApiModelProperty(position = 12, value = "平台券码")
private String platVoucherCode;
@ApiModelProperty(position = 13, value = "商品券码")
private
String
storeVoucherCode
;
private String storeVoucherCode;
*/
@ApiModelProperty
(
position
=
14
,
required
=
true
,
value
=
"支付方式"
,
allowableValues
=
"alipay,wepay,douyinpay,unionpay"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
TRIPLE_PF_FOR_PAY
,
message
=
"支付方式无效"
)
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinNftOrderServiceImpl.java
View file @
8c581be1
...
...
@@ -78,11 +78,11 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
return
ResponseDto
.
failure
(
"该商品仅限特定用户购买~"
);
}
// 判断优惠券不能一起使用
String
platVoucherCode
=
payParam
.
getPlatVoucherCode
();
/*
String platVoucherCode = payParam.getPlatVoucherCode();
String storeVoucherCode = payParam.getStoreVoucherCode();
if (!StringUtils.isEmpty(platVoucherCode) && !StringUtils.isEmpty(storeVoucherCode)) {
return ResponseDto.failure("平台券与店铺券不可一起使用哦~");
}
}
*/
// 判断数量限购
int
limitCount
=
skuVo
.
getBuyLimit
();
...
...
@@ -107,13 +107,14 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
* 无论平台券还是店铺券都只支持代金券1的类型
*/
BigDecimal
voucherPrice
=
BigDecimal
.
ZERO
;
BigDecimal
storeVoucherPrice
=
BigDecimal
.
ZERO
;
String
orderId
=
IDGenerator
.
nextSnowId
();
String
orderCode
=
IDGenerator
.
storeCode
(
orderId
);
BigDecimal
totalPrice
=
skuVo
.
getPrice
();
if
(
isVip
)
{
// 会员价
totalPrice
=
skuVo
.
getPriceMember
();
}
if
(!
StringUtils
.
isEmpty
(
platVoucherCode
))
{
// 平台券
/*
if (!StringUtils.isEmpty(platVoucherCode)) {// 平台券
GoblinUseResultVo useResultVo = nftOrderUtils.useCoupon(platVoucherCode, "购买NFT商品[" + orderCode + "]", totalPrice, spuId, uid);
String typeVoucher = useResultVo.getCouType();
if (typeVoucher.equals("-1")) {
...
...
@@ -123,7 +124,6 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
voucherPrice = useResultVo.getValue();
}
}
BigDecimal
storeVoucherPrice
=
BigDecimal
.
ZERO
;
if (!StringUtils.isEmpty(storeVoucherCode)) {// 店铺券
GoblinUseResultVo storeCouponVo = nftOrderUtils.useStoreCoupon(storeVoucherCode, "购买NFT商品[" + orderCode + "]", totalPrice, spuId, uid);
String typeVoucher = storeCouponVo.getCouType();
...
...
@@ -133,7 +133,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
} else {
storeVoucherPrice = storeCouponVo.getValue();
}
}
}
*/
// 下单数据
GoblinNftOrder
nftOrder
=
order
(
payParam
,
skuVo
.
getStoreId
(),
uid
,
spuId
,
number
,
orderId
,
orderCode
,
totalPrice
,
voucherPrice
,
storeVoucherPrice
,
isVip
);
...
...
@@ -178,8 +178,10 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
nftOrder
.
setStorePriceCoupon
(
storeVoucherPrice
);
nftOrder
.
setPriceVoucher
(
voucherPrice
.
add
(
storeVoucherPrice
));
nftOrder
.
setStatus
(
GoblinStatusConst
.
NftStatus
.
ORDER_STATUS_1
.
getValue
());
nftOrder
.
setUcouponId
(
payParam
.
getPlatVoucherCode
());
nftOrder
.
setStoreCouponId
(
payParam
.
getStoreVoucherCode
());
/*nftOrder.setUcouponId(payParam.getPlatVoucherCode());
nftOrder.setStoreCouponId(payParam.getStoreVoucherCode());*/
nftOrder
.
setUcouponId
(
""
);
nftOrder
.
setStoreCouponId
(
""
);
nftOrder
.
setPayType
(
payParam
.
getPayType
());
nftOrder
.
setDeviceFrom
(
payParam
.
getDeviceFrom
());
nftOrder
.
setSource
(
source
);
...
...
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