Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
8e608d9b
Commit
8e608d9b
authored
Jun 07, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时运营后台--
保全支付回调
parent
c771e4b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+12
-8
No files found.
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
8e608d9b
...
...
@@ -96,7 +96,7 @@ public class CallBackContorll {
@PostMapping
(
value
=
"/addpPayCallBack"
)
@ApiOperation
(
value
=
"11.增员核保回调"
,
httpMethod
=
"POST"
,
notes
=
"增员核保回调"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Map
addpPayCallBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
public
Map
addpPayCallBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
{
/*核保*/
/*如果是在线支付的话*/
Map
map
=
Maps
.
newHashMap
();
...
...
@@ -173,7 +173,7 @@ public class CallBackContorll {
@PostMapping
(
value
=
"/CallBack"
)
@ApiOperation
(
value
=
"7.保全增员申请回调"
,
httpMethod
=
"POST"
,
notes
=
"投保申请回调"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Map
callBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
public
Map
callBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
{
Map
map
=
Maps
.
newHashMap
();
map
.
put
(
"status"
,
"error"
);
if
(
StringUtils
.
isNullOrEmpty
(
pid
)
||
StringUtils
.
isNullOrEmpty
(
sign
)
&&
StringUtils
.
isNullOrEmpty
(
timestamp
))
{
...
...
@@ -223,7 +223,7 @@ public class CallBackContorll {
insurePolicy
.
setPolicyFile
(
callBack
.
getOrder_import_info
().
getEndorsement_file
());
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
paramsMap
)).
type
(
7
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/CallBack"
)
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
"更新成功"
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
"
保单增员-
更新成功"
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
}
else
{
String
errorMsg
=
""
;
InsureLog
insureLog
=
InsureLog
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureLog
>().
lambda
().
eq
(
InsureLog:
:
getTransId
,
callBack
.
getOrder_import_info
().
getThird_uuid
()));
...
...
@@ -271,7 +271,7 @@ public class CallBackContorll {
@GetMapping
(
value
=
"/payStatus"
)
@ApiOperation
(
value
=
"8.支付完成跳转"
,
httpMethod
=
"GET"
,
notes
=
"用于支付时跳回我们系统更新状态"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ModelAndView
callBackPayStatus
(
HttpServletRequest
request
,
@RequestParam
Integer
policyId
)
throws
IOException
{
public
ModelAndView
callBackPayStatus
(
HttpServletRequest
request
,
@RequestParam
Integer
policyId
)
{
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
policyId
).
build
().
selectById
();
InsurePay
insurePay
=
InsurePay
.
builder
().
id
(
insurePolicy
.
getPayId
()).
build
().
selectById
();
insurePay
.
setPayTime
(
new
Date
());
...
...
@@ -286,7 +286,7 @@ public class CallBackContorll {
@PostMapping
(
value
=
"/payCallBack"
)
@ApiOperation
(
value
=
"9.投保支付收银台回调"
,
httpMethod
=
"POST"
,
notes
=
"支付完成跳转"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Map
payCallBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
public
Map
payCallBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
{
try
{
InputStream
is
=
null
;
is
=
request
.
getInputStream
();
...
...
@@ -343,7 +343,7 @@ public class CallBackContorll {
@PostMapping
(
value
=
"/issueCallback"
)
@ApiOperation
(
value
=
"10.保单出单回调"
,
httpMethod
=
"POST"
,
notes
=
"支付完成跳转"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Map
issueCallback
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
public
Map
issueCallback
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
{
try
{
InputStream
is
=
null
;
is
=
request
.
getInputStream
();
...
...
@@ -397,9 +397,9 @@ public class CallBackContorll {
}
@PostMapping
(
value
=
"/batchPayCallback"
)
@ApiOperation
(
value
=
"增员支付回调
-保司接口没启用
"
,
httpMethod
=
"POST"
,
notes
=
"增员支付回调"
)
@ApiOperation
(
value
=
"增员支付回调"
,
httpMethod
=
"POST"
,
notes
=
"增员支付回调"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Map
batchPayCallback
(
HttpServletRequest
request
)
throws
IOException
{
public
Map
batchPayCallback
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
{
try
{
InputStream
is
=
null
;
...
...
@@ -409,6 +409,10 @@ public class CallBackContorll {
for
(
int
n
;
(
n
=
is
.
read
(
b
))
!=
-
1
;
)
{
sb
.
append
(
new
String
(
b
,
0
,
n
));
}
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secretq
+
timestamp
);
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"增员支付回调验签失败"
);
}
BatchPayCallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
BatchPayCallBack
.
class
);
InsurePay
insurePay
=
InsurePay
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePay
>().
lambda
().
eq
(
InsurePay:
:
getSerialNumber
,
callBack
.
getOrder_import_uuid
()));
if
(
insurePay
!=
null
)
{
...
...
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