记得上下班打卡 | 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
d50cd351
Commit
d50cd351
authored
Mar 07, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用券接口增加店铺id
parent
5bcabf4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
GoblinCouponService.java
...liquidnet/service/goblin/service/GoblinCouponService.java
+1
-1
GoblinCouponController.java
...net/service/goblin/controller/GoblinCouponController.java
+5
-3
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+2
-2
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/GoblinCouponService.java
View file @
d50cd351
...
@@ -23,7 +23,7 @@ public interface GoblinCouponService {
...
@@ -23,7 +23,7 @@ public interface GoblinCouponService {
List
<
GoblinUserCouponVo
>
getList
(
String
type
);
List
<
GoblinUserCouponVo
>
getList
(
String
type
);
//是否可用券 [价格] [spuId逗号隔开] [uid]
//是否可用券 [价格] [spuId逗号隔开] [uid]
GoblinUserCouponVo
canUse
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
);
GoblinUserCouponVo
canUse
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
,
String
storeId
);
//可用券列表 [价格] [spuId逗号隔开] [uid]
//可用券列表 [价格] [spuId逗号隔开] [uid]
List
<
GoblinUserCouponVo
>
useList
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
);
List
<
GoblinUserCouponVo
>
useList
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinCouponController.java
View file @
d50cd351
...
@@ -117,8 +117,8 @@ public class GoblinCouponController {
...
@@ -117,8 +117,8 @@ public class GoblinCouponController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"UID"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"UID"
),
})
})
public
ResponseDto
<
GoblinUserCouponVo
>
fetched
(
@NotBlank
(
message
=
"店铺ID不能为空"
)
@RequestParam
(
"storeId"
)
String
storeId
,
public
ResponseDto
<
GoblinUserCouponVo
>
fetched
(
@NotBlank
(
message
=
"店铺ID不能为空"
)
@RequestParam
(
"storeId"
)
String
storeId
,
@NotBlank
(
message
=
"平台券ID不能为空"
)
@RequestParam
(
"storeCouponId"
)
String
storeCouponId
,
@NotBlank
(
message
=
"平台券ID不能为空"
)
@RequestParam
(
"storeCouponId"
)
String
storeCouponId
,
@NotBlank
(
message
=
"UID不能为空"
)
@RequestParam
(
"uid"
)
String
uid
)
{
@NotBlank
(
message
=
"UID不能为空"
)
@RequestParam
(
"uid"
)
String
uid
)
{
// if (!goblinRedisUtils.hasStoreId(CurrentUtil.getCurrentUid(), storeId)) {
// if (!goblinRedisUtils.hasStoreId(CurrentUtil.getCurrentUid(), storeId)) {
// return ResponseDto.failure(ErrorMapping.get("149002"));
// return ResponseDto.failure(ErrorMapping.get("149002"));
// }
// }
...
@@ -172,14 +172,16 @@ public class GoblinCouponController {
...
@@ -172,14 +172,16 @@ public class GoblinCouponController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Number"
,
name
=
"totalPrice"
,
value
=
"spuId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Number"
,
name
=
"totalPrice"
,
value
=
"spuId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"逗号隔开"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"逗号隔开"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"uid"
,
value
=
"用户id"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺id"
),
})
})
public
ResponseDto
<
GoblinUserCouponVo
>
canUse
(
@RequestParam
(
"totalPrice"
)
@Valid
BigDecimal
totalPrice
,
public
ResponseDto
<
GoblinUserCouponVo
>
canUse
(
@RequestParam
(
"totalPrice"
)
@Valid
BigDecimal
totalPrice
,
@RequestParam
(
"spuId"
)
@Valid
String
spuId
,
@RequestParam
(
"spuId"
)
@Valid
String
spuId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
value
=
"uid"
,
required
=
false
)
@Valid
String
uid
)
{
@RequestParam
(
value
=
"uid"
,
required
=
false
)
@Valid
String
uid
)
{
if
(
uid
==
null
)
{
if
(
uid
==
null
)
{
uid
=
CurrentUtil
.
getCurrentUid
();
uid
=
CurrentUtil
.
getCurrentUid
();
}
}
return
ResponseDto
.
success
(
goblinCouponService
.
canUse
(
totalPrice
,
spuId
,
uid
));
return
ResponseDto
.
success
(
goblinCouponService
.
canUse
(
totalPrice
,
spuId
,
uid
,
storeId
));
}
}
@PostMapping
(
"useList"
)
@PostMapping
(
"useList"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinCouponImpl.java
View file @
d50cd351
...
@@ -130,13 +130,13 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -130,13 +130,13 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
}
@Override
@Override
public
GoblinUserCouponVo
canUse
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
)
{
public
GoblinUserCouponVo
canUse
(
BigDecimal
totalPrice
,
String
spuId
,
String
uid
,
String
storeId
)
{
BigDecimal
maxPrice
=
BigDecimal
.
ZERO
;
BigDecimal
maxPrice
=
BigDecimal
.
ZERO
;
GoblinUserCouponVo
returnVo
=
GoblinUserCouponVo
.
getNew
();
GoblinUserCouponVo
returnVo
=
GoblinUserCouponVo
.
getNew
();
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
List
<
GoblinUserCouponVo
>
voList
=
goblinRedisUtils
.
getUserCouponVos
(
uid
);
for
(
GoblinUserCouponVo
vo
:
voList
)
{
for
(
GoblinUserCouponVo
vo
:
voList
)
{
//判断券状态 和 触发金额
//判断券状态 和 触发金额
if
(
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
)
{
if
(
vo
.
getState
().
equals
(
1
)
&&
vo
.
getTriggers
().
compareTo
(
totalPrice
)
<=
0
&&
vo
.
getStoreId
().
equals
(
storeId
)
)
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
if
(
vo
.
getUseScope
().
equals
(
"0"
))
{
BigDecimal
tempPrice
=
BigDecimal
.
ZERO
;
BigDecimal
tempPrice
=
BigDecimal
.
ZERO
;
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
...
...
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