记得上下班打卡 | 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
a33dd465
Commit
a33dd465
authored
Feb 25, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 收货接口
parent
721564f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
1 deletion
+57
-1
IGoblinOrderAppService.java
...uidnet/service/goblin/service/IGoblinOrderAppService.java
+2
-0
GoblinOrderAppController.java
...t/service/goblin/controller/GoblinOrderAppController.java
+10
-0
GoblinOrderAppServiceImpl.java
...ervice/goblin/service/impl/GoblinOrderAppServiceImpl.java
+45
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinOrderAppService.java
View file @
a33dd465
...
...
@@ -19,6 +19,8 @@ public interface IGoblinOrderAppService {
ResponseDto
<
GoblinAppOrderDetailsVo
>
orderDetails
(
String
orderId
,
String
uid
);
ResponseDto
<
Boolean
>
getProduce
(
String
orderId
,
String
uid
);
ResponseDto
<
Boolean
>
applyRefund
(
GoblinAppOrderRefundParam
param
);
ResponseDto
<
List
<
GoblinBackOrderVo
>>
refundDetails
(
String
orderId
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinOrderAppController.java
View file @
a33dd465
...
...
@@ -59,6 +59,16 @@ public class GoblinOrderAppController {
return
goblinOrderAppService
.
orderDetails
(
orderId
,
uid
);
}
@PostMapping
(
"getProduce"
)
@ApiOperation
(
"已收货"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"orderId"
,
value
=
"订单id"
,
example
=
"1"
),
})
public
ResponseDto
<
Boolean
>
getProduce
(
@RequestParam
(
"orderId"
)
@Valid
String
orderId
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
return
goblinOrderAppService
.
getProduce
(
orderId
,
uid
);
}
@PostMapping
(
"applyRefund"
)
@ApiOperation
(
"退款申请"
)
public
ResponseDto
<
Boolean
>
applyRefund
(
@RequestBody
GoblinAppOrderRefundParam
param
)
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderAppServiceImpl.java
View file @
a33dd465
...
...
@@ -133,6 +133,50 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
return
ResponseDto
.
success
(
vo
);
}
@Override
public
ResponseDto
<
Boolean
>
getProduce
(
String
orderId
,
String
uid
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
sqls
.
add
(
SqlMapping
.
get
(
"goblin_order.store.orderStatus"
));
sqls
.
add
(
SqlMapping
.
get
(
"goblin_order.store.orderSkuStatus"
));
LinkedList
<
Object
[]>
orderStatus
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
orderSkuStatus
=
CollectionUtil
.
linkedListObjectArr
();
GoblinStoreOrderVo
orderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
if
(!
orderVo
.
getUserId
().
equals
(
uid
))
{
return
ResponseDto
.
failure
(
"无权操作"
);
}
if
(
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_3
.
getValue
())
{
return
ResponseDto
.
failure
(
"不可操作"
);
}
//订单状态修改
orderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
());
orderStatus
.
add
(
new
Object
[]{
orderVo
.
getStatus
(),
now
,
orderVo
.
getOrderId
(),
now
,
now
});
for
(
String
orderSkuId
:
orderVo
.
getOrderSkuVoIds
())
{
//订单款式状态修改
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
orderSkuId
);
orderSkuVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
());
//redis
redisUtils
.
setGoblinOrderSku
(
orderSkuVo
.
getOrderSkuId
(),
orderSkuVo
);
//mongo
mongoUtils
.
updateGoblinOrderSkuVo
(
orderSkuVo
.
getOrderSkuId
(),
orderSkuVo
);
orderSkuStatus
.
add
(
new
Object
[]{
orderSkuVo
.
getStatus
(),
now
,
orderSkuVo
.
getOrderSkuId
(),
now
,
now
});
}
//redis
redisUtils
.
setGoblinOrder
(
orderId
,
orderVo
);
//mongo
mongoUtils
.
updateGoblinStoreOrderVo
(
orderId
,
orderVo
);
//redis
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_USER_ORDER_OPERA
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
orderStatus
,
orderSkuStatus
));
return
ResponseDto
.
success
(
true
);
}
@Override
public
ResponseDto
<
Boolean
>
applyRefund
(
GoblinAppOrderRefundParam
param
)
{
...
...
@@ -466,7 +510,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
private
long
getRestTime
(
GoblinStoreOrderVo
orderVo
)
{
long
restTime
=
0L
;
int
time
=
orderVo
.
getPayCountdownMinute
();
if
(
orderVo
.
getMarketType
()
!=
null
&&
orderVo
.
getMarketType
().
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
if
(
orderVo
.
getMarketType
()
!=
null
&&
orderVo
.
getMarketType
().
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
time
=
0
;
}
if
(
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
())
{
...
...
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