记得上下班打卡 | 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
c361a9e7
Commit
c361a9e7
authored
Feb 03, 2024
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/阶梯退票_羊毛券_合并分支' into 阶梯退票_羊毛券_合并分支
parents
5503a5ff
aadfad73
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
IGoblinOrderAppService.java
...uidnet/service/goblin/service/IGoblinOrderAppService.java
+2
-0
GoblinOrderAppController.java
...t/service/goblin/controller/GoblinOrderAppController.java
+7
-0
GoblinOrderAppServiceImpl.java
...ervice/goblin/service/impl/GoblinOrderAppServiceImpl.java
+15
-0
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinOrderAppService.java
View file @
c361a9e7
...
@@ -16,6 +16,8 @@ public interface IGoblinOrderAppService {
...
@@ -16,6 +16,8 @@ public interface IGoblinOrderAppService {
ResponseDto
<
GoblinAppOrderDetailsVo
>
orderDetails
(
String
orderId
,
String
uid
);
ResponseDto
<
GoblinAppOrderDetailsVo
>
orderDetails
(
String
orderId
,
String
uid
);
Integer
couponState
(
String
orderId
,
String
uid
);
ResponseDto
<
Boolean
>
getProduce
(
String
orderId
,
String
uid
);
ResponseDto
<
Boolean
>
getProduce
(
String
orderId
,
String
uid
);
ResponseDto
<
Boolean
>
applyRefund
(
GoblinAppOrderRefundParam
param
);
ResponseDto
<
Boolean
>
applyRefund
(
GoblinAppOrderRefundParam
param
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinOrderAppController.java
View file @
c361a9e7
...
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
import
java.util.List
;
import
java.util.List
;
@Slf4j
@Slf4j
...
@@ -59,6 +60,12 @@ public class GoblinOrderAppController {
...
@@ -59,6 +60,12 @@ public class GoblinOrderAppController {
return
goblinOrderAppService
.
orderDetails
(
orderId
,
uid
);
return
goblinOrderAppService
.
orderDetails
(
orderId
,
uid
);
}
}
@GetMapping
(
"couponState"
)
@ApiOperation
(
value
=
"券类商品订单查询已发放券状态"
,
notes
=
"响应参数[1-可用,5-已用]"
)
public
ResponseDto
<
Integer
>
couponState
(
@NotBlank
(
message
=
"子订单Id不能为空"
)
@RequestParam
String
orderSkuId
)
{
return
ResponseDto
.
success
(
goblinOrderAppService
.
couponState
(
orderSkuId
,
CurrentUtil
.
getCurrentUid
()));
}
@PostMapping
(
"getProduce"
)
@PostMapping
(
"getProduce"
)
@ApiOperation
(
"已收货"
)
@ApiOperation
(
"已收货"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderAppServiceImpl.java
View file @
c361a9e7
...
@@ -160,6 +160,21 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
...
@@ -160,6 +160,21 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
return
ResponseDto
.
success
(
vo
);
return
ResponseDto
.
success
(
vo
);
}
}
@Override
public
Integer
couponState
(
String
orderSkuId
,
String
uid
)
{
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
orderSkuId
);
if
(
Objects
.
equals
(
orderSkuVo
.
getSkuType
(),
2
))
{
// 券类商品-校验发放的券是否已使用
// 券类商品默认一个商品对应一个券,下单只可购买一张
List
<
CandyUserCouponBasicDto
>
vos
=
(
List
<
CandyUserCouponBasicDto
>)
redisUtils
.
get
(
CandyRedisConst
.
BASIC_USER_COUPON
.
concat
(
uid
));
if
(!
CollectionUtil
.
isEmpty
(
vos
))
{
CandyUserCouponBasicDto
basicDto
=
vos
.
stream
().
filter
(
r
->
r
.
getUcouponId
().
equals
(
orderSkuId
)).
findAny
().
orElse
(
null
);
return
(!
Objects
.
isNull
(
basicDto
)
&&
basicDto
.
getState
()
==
5
)
?
5
:
1
;
}
}
return
1
;
}
@Override
@Override
public
ResponseDto
<
Boolean
>
getProduce
(
String
orderId
,
String
uid
)
{
public
ResponseDto
<
Boolean
>
getProduce
(
String
orderId
,
String
uid
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
c361a9e7
...
@@ -136,7 +136,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -136,7 +136,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
String
couponSkuIdNoBuyLimitKey
=
String
.
format
(
GoblinRedisConst
.
REDIS_GOBLIN_BUY_COUNT_IDNO
,
skuParam
.
getIdType
(),
skuParam
.
getIdNo
(),
skuId
,
skuParam
.
getNumber
());
String
couponSkuIdNoBuyLimitKey
=
String
.
format
(
GoblinRedisConst
.
REDIS_GOBLIN_BUY_COUNT_IDNO
,
skuParam
.
getIdType
(),
skuParam
.
getIdNo
(),
skuId
,
skuParam
.
getNumber
());
couponSkuIdNoBuyLimitMap
.
put
(
couponSkuIdNoBuyLimitKey
,
skuParam
.
getNumber
());
couponSkuIdNoBuyLimitMap
.
put
(
couponSkuIdNoBuyLimitKey
,
skuParam
.
getNumber
());
if
(
redisUtils
.
redisUtil
.
incr
(
couponSkuIdNoBuyLimitKey
,
skuParam
.
getNumber
())
>
idNoLimitCount
)
{
if
(
redisUtils
.
redisUtil
.
incr
(
couponSkuIdNoBuyLimitKey
,
skuParam
.
getNumber
())
>
idNoLimitCount
)
{
throw
new
LiquidnetServiceException
(
"-1"
,
String
.
format
(
"超
出限购数量,一份证件
限购%d张"
,
idNoLimitCount
));
throw
new
LiquidnetServiceException
(
"-1"
,
String
.
format
(
"超
过限购数量,一个证件信息
限购%d张"
,
idNoLimitCount
));
}
}
}
}
}
}
...
...
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