记得上下班打卡 | 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
826b9cf9
Commit
826b9cf9
authored
Oct 19, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
券列表分页
提前 演出 商品 我的(不分页)
parent
e8e4ab2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
12 deletions
+79
-12
liquidnet-service-candy-dev.yml
...s-config/liquidnet-config/liquidnet-service-candy-dev.yml
+2
-2
CandyCouponController.java
...idnet/service/candy/controller/CandyCouponController.java
+77
-10
No files found.
liquidnet-bus-config/liquidnet-config/liquidnet-service-candy-dev.yml
View file @
826b9cf9
...
@@ -16,7 +16,7 @@ liquidnet:
...
@@ -16,7 +16,7 @@ liquidnet:
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
debug
level
:
debug
mysql
:
mysql
:
database-name
:
dev
_ln_scene
database-name
:
test
_ln_scene
mongodb
:
mongodb
:
sslEnabled
:
false
sslEnabled
:
false
database
:
dev
_ln_scene
database
:
test
_ln_scene
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyCouponController.java
View file @
826b9cf9
...
@@ -8,6 +8,7 @@ import com.liquidnet.commons.lang.util.JsonUtils;
...
@@ -8,6 +8,7 @@ import com.liquidnet.commons.lang.util.JsonUtils;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.candy.param.BackCouponParam
;
import
com.liquidnet.service.candy.param.BackCouponParam
;
import
com.liquidnet.service.candy.service.ICandyCouponService
;
import
com.liquidnet.service.candy.service.ICandyCouponService
;
import
com.liquidnet.service.candy.util.ObjectUtil
;
import
com.liquidnet.service.candy.vo.CandyCouponPreVo
;
import
com.liquidnet.service.candy.vo.CandyCouponPreVo
;
import
com.liquidnet.service.candy.vo.CandyCouponVo
;
import
com.liquidnet.service.candy.vo.CandyCouponVo
;
import
com.liquidnet.service.candy.vo.CandyMyCouponListVo
;
import
com.liquidnet.service.candy.vo.CandyMyCouponListVo
;
...
@@ -52,8 +53,24 @@ public class CandyCouponController {
...
@@ -52,8 +53,24 @@ public class CandyCouponController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1可用 2过期/已使用 "
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1可用 2过期/已使用 "
,
required
=
true
),
})
})
public
ResponseDto
<
CandyMyCouponListVo
>
myCoupon
(
@RequestParam
(
"type"
)
@NotNull
Integer
type
)
{
public
ResponseDto
<
CandyMyCouponListVo
>
myCoupon
(
@RequestParam
(
"type"
)
@NotNull
Integer
type
,
@RequestParam
(
required
=
false
,
name
=
"page"
)
Integer
page
)
{
return
ResponseDto
.
success
(
candyCouponService
.
myCoupon
(
type
));
CandyMyCouponListVo
vo
=
candyCouponService
.
myCoupon
(
type
);
// List<CandyCouponVo> list = vo.getMyCoupon();
// List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
// if (page == null || page == 0) {
// page = 1;
// }
// int size = 40;
// int initSize = (page - 1) * size;
// int forSize = page * size;
// if (forSize >= list.size()) {
// forSize = list.size();
// }
// for (int i = initSize; i < forSize; i++) {
// listVo.add(list.get(i));
// }
// vo.setMyCoupon(listVo);
return
ResponseDto
.
success
(
vo
);
}
}
//我的会员权益券统计
//我的会员权益券统计
...
@@ -87,8 +104,25 @@ public class CandyCouponController {
...
@@ -87,8 +104,25 @@ public class CandyCouponController {
@RequestParam
(
"performanceId"
)
@NotNull
@NotBlank
String
performanceId
,
@RequestParam
(
"performanceId"
)
@NotNull
@NotBlank
String
performanceId
,
@RequestParam
(
"timeId"
)
@NotNull
@NotBlank
String
timeId
,
@RequestParam
(
"timeId"
)
@NotNull
@NotBlank
String
timeId
,
@RequestParam
(
"ticketId"
)
@NotNull
@NotBlank
String
ticketId
,
@RequestParam
(
"ticketId"
)
@NotNull
@NotBlank
String
ticketId
,
@RequestParam
(
"type"
)
@NotNull
Integer
type
)
{
@RequestParam
(
"type"
)
@NotNull
Integer
type
,
return
ResponseDto
.
success
(
candyCouponService
.
preUsePerformanceCoupon
(
priceTotal
,
performanceId
,
timeId
,
ticketId
,
type
));
@RequestParam
(
required
=
false
,
name
=
"page"
)
Integer
page
)
{
CandyMyCouponListVo
vo
=
candyCouponService
.
preUsePerformanceCoupon
(
priceTotal
,
performanceId
,
timeId
,
ticketId
,
type
);
List
<
CandyCouponVo
>
list
=
vo
.
getMyCoupon
();
List
<
CandyCouponVo
>
listVo
=
ObjectUtil
.
getCandyCouponVoArrayList
();
if
(
page
==
null
||
page
==
0
)
{
page
=
1
;
}
int
size
=
10
;
int
initSize
=
(
page
-
1
)
*
size
;
int
forSize
=
page
*
size
;
if
(
forSize
>=
list
.
size
())
{
forSize
=
list
.
size
();
}
for
(
int
i
=
initSize
;
i
<
forSize
;
i
++)
{
listVo
.
add
(
list
.
get
(
i
));
}
vo
.
setMyCoupon
(
listVo
);
return
ResponseDto
.
success
(
vo
);
}
}
// 是否可用券演出
// 是否可用券演出
...
@@ -120,8 +154,25 @@ public class CandyCouponController {
...
@@ -120,8 +154,25 @@ public class CandyCouponController {
})
})
public
ResponseDto
<
CandyMyCouponListVo
>
preUseGoodCoupon
(
@RequestParam
(
"priceTotal"
)
@NotNull
BigDecimal
priceTotal
,
public
ResponseDto
<
CandyMyCouponListVo
>
preUseGoodCoupon
(
@RequestParam
(
"priceTotal"
)
@NotNull
BigDecimal
priceTotal
,
@RequestParam
(
"goodId"
)
@NotNull
@NotBlank
String
goodId
,
@RequestParam
(
"goodId"
)
@NotNull
@NotBlank
String
goodId
,
@RequestParam
(
"type"
)
@NotNull
Integer
type
)
{
@RequestParam
(
"type"
)
@NotNull
Integer
type
,
return
ResponseDto
.
success
(
candyCouponService
.
preUseGoodCoupon
(
priceTotal
,
goodId
,
type
));
@RequestParam
(
required
=
false
,
name
=
"page"
)
Integer
page
)
{
CandyMyCouponListVo
vo
=
candyCouponService
.
preUseGoodCoupon
(
priceTotal
,
goodId
,
type
);
List
<
CandyCouponVo
>
list
=
vo
.
getMyCoupon
();
List
<
CandyCouponVo
>
listVo
=
ObjectUtil
.
getCandyCouponVoArrayList
();
if
(
page
==
null
||
page
==
0
)
{
page
=
1
;
}
int
size
=
10
;
int
initSize
=
(
page
-
1
)
*
size
;
int
forSize
=
page
*
size
;
if
(
forSize
>=
list
.
size
())
{
forSize
=
list
.
size
();
}
for
(
int
i
=
initSize
;
i
<
forSize
;
i
++)
{
listVo
.
add
(
list
.
get
(
i
));
}
vo
.
setMyCoupon
(
listVo
);
return
ResponseDto
.
success
(
vo
);
}
}
//是否可用券 - 商品
//是否可用券 - 商品
...
@@ -145,8 +196,24 @@ public class CandyCouponController {
...
@@ -145,8 +196,24 @@ public class CandyCouponController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"performanceId"
,
value
=
"演出id"
,
required
=
true
)
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"performanceId"
,
value
=
"演出id"
,
required
=
true
)
})
})
public
ResponseDto
<
List
<
CandyCouponVo
>>
myAdvanceCoupon
(
@RequestParam
(
"performanceId"
)
@NotNull
@NotBlank
String
performanceId
)
{
public
ResponseDto
<
List
<
CandyCouponVo
>>
myAdvanceCoupon
(
@RequestParam
(
"performanceId"
)
@NotNull
@NotBlank
String
performanceId
,
return
ResponseDto
.
success
(
candyCouponService
.
myAdvanceCoupon
(
performanceId
));
@RequestParam
(
required
=
false
,
name
=
"page"
)
Integer
page
)
{
List
<
CandyCouponVo
>
list
=
candyCouponService
.
myAdvanceCoupon
(
performanceId
);
List
<
CandyCouponVo
>
listVo
=
ObjectUtil
.
getCandyCouponVoArrayList
();
if
(
page
==
null
||
page
==
0
)
{
page
=
1
;
}
int
size
=
10
;
int
initSize
=
(
page
-
1
)
*
size
;
int
forSize
=
page
*
size
;
if
(
forSize
>=
list
.
size
())
{
forSize
=
list
.
size
();
}
for
(
int
i
=
initSize
;
i
<
forSize
;
i
++)
{
listVo
.
add
(
list
.
get
(
i
));
}
return
ResponseDto
.
success
();
}
}
// //判断券是否可用
// //判断券是否可用
...
@@ -187,11 +254,11 @@ public class CandyCouponController {
...
@@ -187,11 +254,11 @@ public class CandyCouponController {
@RequestParam
(
"timeId"
)
@NotNull
@NotBlank
String
timeId
,
@RequestParam
(
"timeId"
)
@NotNull
@NotBlank
String
timeId
,
@RequestParam
(
"ticketId"
)
@NotNull
@NotBlank
String
ticketId
@RequestParam
(
"ticketId"
)
@NotNull
@NotBlank
String
ticketId
)
{
)
{
CandyUseResultVo
result
=
candyCouponService
.
useCoupon
(
uCouponId
,
content
,
totalPrice
,
performanceId
,
timeId
,
ticketId
,
goodId
);
CandyUseResultVo
result
=
candyCouponService
.
useCoupon
(
uCouponId
,
content
,
totalPrice
,
performanceId
,
timeId
,
ticketId
,
goodId
);
if
(
result
==
null
)
{
if
(
result
==
null
)
{
return
ResponseDto
.
failure
();
return
ResponseDto
.
failure
();
}
}
result
.
setValue
(
result
.
getValue
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
result
.
setValue
(
result
.
getValue
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
...
...
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