记得上下班打卡 | 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
cae93ec2
Commit
cae93ec2
authored
Feb 25, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用券逻辑修改
parent
33c0f916
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
16 deletions
+20
-16
ICandyCouponService.java
.../liquidnet/service/candy/service/ICandyCouponService.java
+1
-1
CandyCouponController.java
...idnet/service/candy/controller/CandyCouponController.java
+11
-7
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+1
-2
GoblinOrderServiceImpl.java
...t/service/goblin/service/impl/GoblinOrderServiceImpl.java
+5
-5
GoblinOrderUtils.java
...a/com/liquidnet/service/goblin/util/GoblinOrderUtils.java
+2
-1
No files found.
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/service/ICandyCouponService.java
View file @
cae93ec2
...
...
@@ -40,7 +40,7 @@ public interface ICandyCouponService {
Integer
stateCoupon
(
String
uCouponId
);
CandyUseResultVo
useCoupon
(
String
uCouponId
,
String
content
,
String
totalPrice
,
String
performanceId
,
String
timesId
,
String
ticketId
,
String
goodIds
);
CandyUseResultVo
useCoupon
(
String
uCouponId
,
String
content
,
String
totalPrice
,
String
performanceId
,
String
timesId
,
String
ticketId
,
String
goodIds
,
String
uid
);
Boolean
useBackCoupon
(
List
<
BackCouponParam
>
backCouponParam
);
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyCouponController.java
View file @
cae93ec2
...
...
@@ -158,10 +158,10 @@ public class CandyCouponController {
@RequestParam
(
"type"
)
@NotNull
Integer
type
,
@RequestParam
(
required
=
false
,
name
=
"page"
)
Integer
page
,
@RequestParam
(
required
=
false
,
name
=
"uid"
)
String
uid
)
{
if
(
uid
==
null
)
{
if
(
uid
==
null
)
{
uid
=
CurrentUtil
.
getCurrentUid
();
}
CandyMyCouponListVo
vo
=
candyCouponService
.
preUseGoodCoupon
(
priceTotal
,
goodId
,
type
,
uid
);
CandyMyCouponListVo
vo
=
candyCouponService
.
preUseGoodCoupon
(
priceTotal
,
goodId
,
type
,
uid
);
List
<
CandyCouponVo
>
list
=
vo
.
getMyCoupon
();
List
<
CandyCouponVo
>
listVo
=
ObjectUtil
.
getCandyCouponVoArrayList
();
if
(
page
==
null
||
page
==
0
)
{
...
...
@@ -192,10 +192,10 @@ public class CandyCouponController {
@RequestParam
(
"goodId"
)
@NotNull
@NotBlank
String
goodId
,
@RequestParam
(
required
=
false
,
name
=
"uid"
)
String
uid
)
{
HashMap
<
String
,
Integer
>
hashMap
=
CollectionUtil
.
mapStringInteger
();
if
(
uid
==
null
)
{
if
(
uid
==
null
)
{
uid
=
CurrentUtil
.
getCurrentUid
();
}
hashMap
.
put
(
"canUse"
,
candyCouponService
.
preCanUseGoodCoupon
(
priceTotal
,
goodId
,
uid
));
hashMap
.
put
(
"canUse"
,
candyCouponService
.
preCanUseGoodCoupon
(
priceTotal
,
goodId
,
uid
));
return
ResponseDto
.
success
(
hashMap
);
}
...
...
@@ -254,17 +254,21 @@ public class CandyCouponController {
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"performanceId"
,
value
=
"演出id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"timeId"
,
value
=
"场次id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"ticketId"
,
value
=
"票id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"uid"
,
required
=
false
),
})
public
ResponseDto
<
CandyUseResultVo
>
useCoupon
(
@RequestParam
(
"uCouponId"
)
@NotNull
@NotBlank
String
uCouponId
,
@RequestParam
(
"content"
)
@NotNull
@NotBlank
String
content
,
@RequestParam
(
"totalPrice"
)
@NotNull
String
totalPrice
,
@RequestParam
(
"goodId"
)
@NotNull
@NotBlank
String
goodId
,
@RequestParam
(
"performanceId"
)
@NotNull
@NotBlank
String
performanceId
,
@RequestParam
(
"timeId"
)
@NotNull
@NotBlank
String
timeId
,
@RequestParam
(
"ticketId"
)
@NotNull
@NotBlank
String
ticketId
@RequestParam
(
"ticketId"
)
@NotNull
@NotBlank
String
ticketId
,
@RequestParam
(
value
=
"uid"
,
required
=
false
)
@NotNull
@NotBlank
String
uid
)
{
CandyUseResultVo
result
=
candyCouponService
.
useCoupon
(
uCouponId
,
content
,
totalPrice
,
performanceId
,
timeId
,
ticketId
,
goodId
);
if
(
uid
==
null
)
{
uid
=
CurrentUtil
.
getCurrentUid
();
}
CandyUseResultVo
result
=
candyCouponService
.
useCoupon
(
uCouponId
,
content
,
totalPrice
,
performanceId
,
timeId
,
ticketId
,
goodId
,
uid
);
if
(
result
==
null
)
{
return
ResponseDto
.
failure
();
}
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
cae93ec2
...
...
@@ -315,8 +315,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
}
@Override
public
CandyUseResultVo
useCoupon
(
String
uCouponId
,
String
content
,
String
totalPrice
,
String
performanceId
,
String
timesId
,
String
ticketId
,
String
goodId
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
public
CandyUseResultVo
useCoupon
(
String
uCouponId
,
String
content
,
String
totalPrice
,
String
performanceId
,
String
timesId
,
String
ticketId
,
String
goodId
,
String
uid
)
{
LocalDateTime
userCreateTime
;
try
{
userCreateTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
.
parse
(
CurrentUtil
.
getTokenClaims
().
get
(
CurrentUtil
.
TOKEN_UCREATED
).
toString
());
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderServiceImpl.java
View file @
cae93ec2
...
...
@@ -292,9 +292,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
if
(
pre
!=
null
)
{
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
().
split
(
pre
)[
0
]
);
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
().
split
(
pre
)[
0
]+
","
);
}
else
{
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
()
);
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
()+
","
);
}
}
if
(
tempCouponVo
!=
null
)
{
...
...
@@ -305,7 +305,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
}
else
{
HashMap
<
String
,
Object
>
hashMap
=
orderUtils
.
useCoupon
(
platVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
);
HashMap
<
String
,
Object
>
hashMap
=
orderUtils
.
useCoupon
(
platVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
,
uid
);
voucherPrice
=
(
BigDecimal
)
hashMap
.
get
(
"voucher"
);
Integer
typeVoucher
=
(
Integer
)
hashMap
.
get
(
"type"
);
if
(
typeVoucher
.
equals
(-
1
))
{
...
...
@@ -322,9 +322,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
if
(
pre
!=
null
)
{
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
().
split
(
pre
)[
0
]
);
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
().
split
(
pre
)[
0
]+
","
);
}
else
{
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
()
);
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
()+
","
);
}
}
GoblinUseResultVo
storeCouponVo
=
goblinCouponService
.
useCoupon
(
storeVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
,
uid
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinOrderUtils.java
View file @
cae93ec2
...
...
@@ -93,7 +93,7 @@ public class GoblinOrderUtils {
* @param totalPrice 订单总价
* @return
*/
public
HashMap
<
String
,
Object
>
useCoupon
(
String
uCouponId
,
String
content
,
BigDecimal
totalPrice
,
String
spuId
)
{
public
HashMap
<
String
,
Object
>
useCoupon
(
String
uCouponId
,
String
content
,
BigDecimal
totalPrice
,
String
spuId
,
String
uid
)
{
HashMap
<
String
,
Object
>
hashMap
=
CollectionUtil
.
mapStringObject
();
try
{
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
...
...
@@ -104,6 +104,7 @@ public class GoblinOrderUtils {
params
.
add
(
"performanceId"
,
"null"
);
params
.
add
(
"timeId"
,
"null"
);
params
.
add
(
"ticketId"
,
"null"
);
params
.
add
(
"uid"
,
uid
);
MultiValueMap
<
String
,
String
>
header
=
CollectionUtil
.
linkedMultiValueMapStringString
();
header
.
add
(
"Authorization"
,
"Bearer "
+
CurrentUtil
.
getToken
());
header
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
...
...
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