记得上下班打卡 | 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
48a045a6
Commit
48a045a6
authored
Aug 30, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 会员礼包券列表
parent
92bd61c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
ICandyCouponService.java
.../liquidnet/service/candy/service/ICandyCouponService.java
+2
-0
CandyCouponController.java
...idnet/service/candy/controller/CandyCouponController.java
+10
-0
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+21
-1
No files found.
liquidnet-bus-api/liquidnet-service-candy-api/src/main/java/com/liquidnet/service/candy/service/ICandyCouponService.java
View file @
48a045a6
...
@@ -23,6 +23,8 @@ public interface ICandyCouponService {
...
@@ -23,6 +23,8 @@ public interface ICandyCouponService {
CandyMyCouponListVo
myCoupon
(
Integer
type
);
CandyMyCouponListVo
myCoupon
(
Integer
type
);
List
<
CandyCouponVo
>
memberCoupon
(
String
mCouponId
);
CandyMyCouponListVo
preUsePerformanceCoupon
(
BigDecimal
priceTotal
,
String
performanceId
,
String
timeId
,
String
ticketId
,
Integer
type
);
CandyMyCouponListVo
preUsePerformanceCoupon
(
BigDecimal
priceTotal
,
String
performanceId
,
String
timeId
,
String
ticketId
,
Integer
type
);
Integer
preCanUsePerformanceCoupon
(
BigDecimal
priceTotal
,
String
performanceId
,
String
timeId
,
String
ticketId
);
Integer
preCanUsePerformanceCoupon
(
BigDecimal
priceTotal
,
String
performanceId
,
String
timeId
,
String
ticketId
);
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyCouponController.java
View file @
48a045a6
...
@@ -50,6 +50,16 @@ public class CandyCouponController {
...
@@ -50,6 +50,16 @@ public class CandyCouponController {
return
ResponseDto
.
success
(
candyCouponService
.
myCoupon
(
type
));
return
ResponseDto
.
success
(
candyCouponService
.
myCoupon
(
type
));
}
}
//我的券列表
@GetMapping
(
"member"
)
@ApiOperation
(
"会员权益券列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"mCouponId"
,
value
=
"mCouponId"
,
required
=
true
),
})
public
ResponseDto
<
List
<
CandyCouponVo
>>
myCoupon
(
@RequestParam
(
"mCouponId"
)
@NotNull
@NotBlank
String
mCouponId
)
{
return
ResponseDto
.
success
(
candyCouponService
.
memberCoupon
(
mCouponId
));
}
//要使用券列表 - 演出
//要使用券列表 - 演出
@GetMapping
(
"preUse/performance"
)
@GetMapping
(
"preUse/performance"
)
@ApiOperation
(
"要使用券列表 - 演出"
)
@ApiOperation
(
"要使用券列表 - 演出"
)
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
48a045a6
...
@@ -74,6 +74,26 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -74,6 +74,26 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
return
vo
;
return
vo
;
}
}
@Override
public
List
<
CandyCouponVo
>
memberCoupon
(
String
mCouponId
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
List
<
CandyUserCouponBasicDto
>
dtoList
=
redisDataUtils
.
getCouponByUid
(
uid
);
List
<
CandyCouponVo
>
memberCoupon
=
ObjectUtil
.
getCandyCouponVoArrayList
();
for
(
CandyUserCouponBasicDto
dtoItem
:
dtoList
)
{
if
(!
mCouponId
.
equals
(
dtoItem
.
getMcouponId
()))
{
continue
;
}
CandyCouponVo
baseVo
=
CouponBaseUtil
.
getBaseCouponUserVo
(
dtoItem
);
if
(
dtoItem
.
getExclusive
().
equals
(
1
))
{
//会员券
memberCoupon
.
add
(
baseVo
);
}
}
//排序 可用->金额->类型->过期时间
memberCoupon
.
sort
(
Comparator
.
comparing
(
CandyCouponVo:
:
getState
));
return
memberCoupon
;
}
@Override
@Override
public
CandyMyCouponListVo
preUsePerformanceCoupon
(
BigDecimal
priceTotal
,
String
performanceId
,
String
timeId
,
String
ticketId
,
Integer
type
)
{
public
CandyMyCouponListVo
preUsePerformanceCoupon
(
BigDecimal
priceTotal
,
String
performanceId
,
String
timeId
,
String
ticketId
,
Integer
type
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
...
@@ -261,7 +281,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
...
@@ -261,7 +281,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
@Override
@Override
public
Boolean
useBackCoupon
(
List
<
BackCouponParam
>
backCouponParams
)
{
public
Boolean
useBackCoupon
(
List
<
BackCouponParam
>
backCouponParams
)
{
for
(
BackCouponParam
item
:
backCouponParams
)
{
for
(
BackCouponParam
item
:
backCouponParams
)
{
String
uid
=
item
.
getUid
();
String
uid
=
item
.
getUid
();
ArrayList
<
String
>
uCouponIdList
=
new
ArrayList
(
Arrays
.
asList
(
item
.
getuCouponIds
().
split
(
","
)));
ArrayList
<
String
>
uCouponIdList
=
new
ArrayList
(
Arrays
.
asList
(
item
.
getuCouponIds
().
split
(
","
)));
List
<
CandyUserCouponBasicDto
>
dtoList
=
CouponBaseUtil
.
backCoupon
(
redisDataUtils
.
getCouponByUid
(
uid
),
uCouponIdList
);
List
<
CandyUserCouponBasicDto
>
dtoList
=
CouponBaseUtil
.
backCoupon
(
redisDataUtils
.
getCouponByUid
(
uid
),
uCouponIdList
);
if
(
dtoList
==
null
)
{
if
(
dtoList
==
null
)
{
...
...
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