记得上下班打卡 | 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
faaadd54
Commit
faaadd54
authored
Jan 05, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
再次支付 接口添加
parent
9e3024c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
+38
-6
IGoblinAppOrderService.java
...uidnet/service/goblin/service/IGoblinAppOrderService.java
+1
-0
GoblinAppOrderController.java
...t/service/goblin/controller/GoblinAppOrderController.java
+12
-4
GoblinAppOrderServiceImpl.java
...ervice/goblin/service/impl/GoblinAppOrderServiceImpl.java
+25
-2
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinAppOrderService.java
View file @
faaadd54
...
...
@@ -14,4 +14,5 @@ public interface IGoblinAppOrderService {
ResponseDto
<
GoblinPayInnerResultVo
>
syncOrder
(
SyncOrderParam
syncOrderParam
);
ResponseDto
<
Integer
>
checkOrderResult
(
String
orderId
);
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinAppOrderController.java
View file @
faaadd54
...
...
@@ -7,9 +7,7 @@ import com.liquidnet.service.goblin.dto.manage.vo.GoblinPayInnerResultVo;
import
com.liquidnet.service.goblin.param.PayAgainParam
;
import
com.liquidnet.service.goblin.param.SyncOrderParam
;
import
com.liquidnet.service.goblin.service.IGoblinAppOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -49,6 +47,16 @@ public class GoblinAppOrderController {
@ApiOperation
(
"再次支付"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
GoblinPayInnerResultVo
>
payAgain
(
@RequestBody
@Valid
PayAgainParam
param
)
{
return
null
;
return
goblinAppOrderService
.
payAgain
(
param
);
}
@PostMapping
(
"payAgain"
)
@ApiOperation
(
"再次支付"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"orderId"
,
value
=
"订单id"
,
example
=
"1"
),
})
public
ResponseDto
<
Integer
>
checkOrderResult
(
@RequestParam
(
"orderId"
)
@Valid
String
orderId
)
{
return
goblinAppOrderService
.
checkOrderResult
(
orderId
);
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinAppOrderServiceImpl.java
View file @
faaadd54
...
...
@@ -387,10 +387,10 @@ public class GoblinAppOrderServiceImpl implements IGoblinAppOrderService {
//检查订单时间 是否关闭
GoblinStoreOrderVo
storeOrderVo
=
redisUtils
.
getGoblinOrder
(
param
.
getOrderId
());
if
(!
storeOrderVo
.
getUserId
().
equals
(
uid
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
)
);
return
ResponseDto
.
failure
(
"无权查看"
);
}
if
(
storeOrderVo
==
null
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20024"
)
);
return
ResponseDto
.
failure
(
"订单不存在"
);
}
if
(
storeOrderVo
.
getStatus
()
!=
GoblinStatusConst
.
OrderStatus
.
ORDER_STATUS_0
.
getValue
())
{
...
...
@@ -467,4 +467,27 @@ public class GoblinAppOrderServiceImpl implements IGoblinAppOrderService {
public
ResponseDto
<
GoblinPayInnerResultVo
>
syncOrder
(
SyncOrderParam
syncOrderParam
)
{
return
null
;
}
@Override
public
ResponseDto
<
Integer
>
checkOrderResult
(
String
orderId
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
GoblinStoreOrderVo
storeOrderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
if
(
storeOrderVo
==
null
)
{
return
ResponseDto
.
failure
(
"订单不存在"
);
}
else
{
if
(!
storeOrderVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
String
returnCheckData
=
HttpUtil
.
get
(
checkUrl
+
"?code="
+
storeOrderVo
.
getPayCode
(),
null
);
ResponseDto
<
SyncOrderParam
>
syncOrderDtoParam
=
JsonUtils
.
fromJson
(
returnCheckData
,
new
TypeReference
<
ResponseDto
<
SyncOrderParam
>>()
{
});
if
(
syncOrderDtoParam
.
getData
().
getStatus
()
==
1
)
{
//处理订单
syncOrder
(
syncOrderDtoParam
.
getData
());
return
ResponseDto
.
success
(
1
);
}
else
{
return
ResponseDto
.
success
(
0
);
}
}
}
}
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