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
8f4153dd
Commit
8f4153dd
authored
a year ago
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回滚为使用多个appid
parent
32d7c5e9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
24 deletions
+8
-24
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+8
-16
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+0
-0
src/main/resources/application-pro.yml
+0
-8
No files found.
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
8f4153dd
...
...
@@ -55,14 +55,6 @@ public class CallBackContorll {
@Value
(
"${insure.batchToPayUrl}"
)
private
String
batchToPayUrl
;
@Value
(
"${insure.appid}"
)
private
String
appid
;
@Value
(
"${insure.secret}"
)
private
String
secret
;
@Value
(
"${insure.appidq}"
)
private
String
appidq
;
@Value
(
"${insure.secretq}"
)
private
String
secretq
;
/*支付回调*/
@Value
(
"${pay_page}"
)
...
...
@@ -120,7 +112,7 @@ public class CallBackContorll {
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
insureUserList
.
get
(
0
).
getPolicyId
()).
build
().
selectById
();
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secretq
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecretq
()
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"增员核保回调验签失败"
);
}
...
...
@@ -209,7 +201,7 @@ public class CallBackContorll {
}
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getPolicyNo
,
list
.
get
(
0
).
getPolicyNo
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secretq
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecretq
()
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"保全增员申请回调验签失败"
);
}
...
...
@@ -320,7 +312,7 @@ public class CallBackContorll {
InsurePay
insurePay
=
InsurePay
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePay
>().
lambda
().
eq
(
InsurePay:
:
getSerialNumber
,
callBack
.
getSerial_number
()));
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getId
,
insurePay
.
getPolicyId
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secret
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecret
()
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"投保支付收银台回调验签失败"
);
}
...
...
@@ -339,7 +331,7 @@ public class CallBackContorll {
paramsMap
.
put
(
"sign"
,
sign
);
Map
bodyMap
=
Maps
.
newHashMap
();
bodyMap
.
put
(
"quotation_id"
,
callBack
.
getSerial_number
());
String
data
=
HttpUtils
.
sendPost
(
getPolicyUrl
,
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
),
bodyMap
);
String
data
=
HttpUtils
.
sendPost
(
getPolicyUrl
,
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
insureApplicant
.
getAppid
(),
insureApplicant
.
getSecret
()
),
bodyMap
);
Map
dataMap
=
JSONObject
.
parseObject
(
data
,
Map
.
class
);
if
(
dataMap
.
size
()
>
0
)
{
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
)
||
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"e25"
))
{
...
...
@@ -348,7 +340,7 @@ public class CallBackContorll {
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
updateById
();
}
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
7
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
insureApplicant
.
getAppid
(),
insureApplicant
.
getSecret
()
))).
type
(
7
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
data
).
requestPath
(
getPolicyUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
policyId
(
insurePay
.
getPolicyId
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
build
().
insert
();
}
...
...
@@ -377,9 +369,9 @@ public class CallBackContorll {
PolicyCallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
PolicyCallBack
.
class
);
// InsurePay insurePay = InsurePay.builder().build().selectOne(new QueryWrapper<InsurePay>().lambda().eq(InsurePay::getSerialNumber, callBack.getSerial_number()));
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getSerialNumber
,
callBack
.
getSerial_number
()));
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getSerialNumber
,
callBack
.
getSerial_number
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secret
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecret
()
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"保单出单回调验签失败"
);
}
...
...
@@ -437,7 +429,7 @@ public class CallBackContorll {
InsurePay
insurePay
=
InsurePay
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePay
>().
lambda
().
eq
(
InsurePay:
:
getSerialNumber
,
callBack
.
getOrder_import_uuid
()));
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getId
,
insurePay
.
getPolicyId
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
appidq
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getAppidq
()
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"增员支付回调验签失败"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
8f4153dd
This diff is collapsed.
Click to expand it.
src/main/resources/application-pro.yml
View file @
8f4153dd
...
...
@@ -261,10 +261,6 @@ wxgzh:
encodingAesKey
:
'
chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure
:
#投保 appid
appid
:
'
1002209110212305335'
#投保 secret
secret
:
'
1ef7b79471be7f6b5489832c65109f81'
#投保上传文件
uploadUrl
:
'
https://portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
...
...
@@ -282,10 +278,6 @@ insure:
#预付款出单接口
issue
:
'
https://portal.unistar-ins.com/cps/Labor/Policy/issue'
#保全appid
appidq
:
'
1000706050307154062'
#保全 secret
secretq
:
'
c1e2e8dcf231c0d0dfc883c09cd42c5b'
#保全上传文件
uploadUrlq
:
'
https://portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
...
...
This diff is collapsed.
Click to expand it.
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