记得上下班打卡 | 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
4dd62c01
Commit
4dd62c01
authored
Jan 25, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺券
parent
c77893a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
CandyCouponController.java
...idnet/service/candy/controller/CandyCouponController.java
+45
-0
No files found.
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/controller/CandyCouponController.java
View file @
4dd62c01
...
@@ -340,4 +340,49 @@ public class CandyCouponController {
...
@@ -340,4 +340,49 @@ public class CandyCouponController {
// return ResponseDto.failure();
// return ResponseDto.failure();
// }
// }
}
}
//要使用券列表 - 商品
@PostMapping
(
"preUse/goods/store"
)
@ApiOperation
(
"要使用券列表 - 商品[商铺]"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"BigDecimal"
,
name
=
"priceTotal"
,
value
=
"待支付总金额"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"skuIds"
,
value
=
"商品id(逗号隔开的字符串)"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1可用 2过期/已使用 "
,
required
=
true
),
})
public
ResponseDto
<
List
<
CandyCouponVo
>>
preUseGoodStore
(
@RequestParam
(
"priceTotal"
)
@NotNull
BigDecimal
priceTotal
,
@RequestParam
(
"skuIds"
)
@NotNull
@NotBlank
String
skuIds
,
@RequestParam
(
"type"
)
@NotNull
Integer
type
,
@RequestParam
(
required
=
false
,
name
=
"page"
)
Integer
page
)
{
CandyMyCouponListVo
vo
=
candyCouponService
.
preUseGoodCoupon
(
priceTotal
,
skuIds
,
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
));
}
return
ResponseDto
.
success
(
listVo
);
}
//是否可用券 - 商品
@PostMapping
(
"preCanUse/goods/store"
)
@ApiOperation
(
"是否可用券 - 商品[商铺]"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"BigDecimal"
,
name
=
"priceTotal"
,
value
=
"待支付总金额"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"goodId"
,
value
=
"商品id(逗号隔开的字符串)"
,
required
=
true
)
})
public
ResponseDto
<
HashMap
<
String
,
Integer
>>
preCanUseGoodStore
(
@RequestParam
(
"priceTotal"
)
@NotNull
BigDecimal
priceTotal
,
@RequestParam
(
"skuIds"
)
@NotNull
@NotBlank
String
skuIds
)
{
HashMap
<
String
,
Integer
>
hashMap
=
CollectionUtil
.
mapStringInteger
();
hashMap
.
put
(
"canUse"
,
candyCouponService
.
preCanUseGoodCoupon
(
priceTotal
,
skuIds
));
return
ResponseDto
.
success
(
hashMap
);
}
}
}
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