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
a6e13fa8
Commit
a6e13fa8
authored
2 years ago
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改appid统一使用
parent
95ff7bfd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
21 deletions
+29
-21
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+15
-7
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+0
-0
src/main/resources/application-dev.yml
+6
-6
src/main/resources/application-test.yml
+8
-8
No files found.
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
a6e13fa8
...
@@ -55,6 +55,14 @@ public class CallBackContorll {
...
@@ -55,6 +55,14 @@ public class CallBackContorll {
@Value
(
"${insure.batchToPayUrl}"
)
@Value
(
"${insure.batchToPayUrl}"
)
private
String
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}"
)
@Value
(
"${pay_page}"
)
...
@@ -112,7 +120,7 @@ public class CallBackContorll {
...
@@ -112,7 +120,7 @@ public class CallBackContorll {
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
insureUserList
.
get
(
0
).
getPolicyId
()).
build
().
selectById
();
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
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecretq
()
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secretq
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"增员核保回调验签失败"
);
throw
new
CustomException
(
"增员核保回调验签失败"
);
}
}
...
@@ -201,7 +209,7 @@ public class CallBackContorll {
...
@@ -201,7 +209,7 @@ public class CallBackContorll {
}
}
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getPolicyNo
,
list
.
get
(
0
).
getPolicyNo
()));
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
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecretq
()
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secretq
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"保全增员申请回调验签失败"
);
throw
new
CustomException
(
"保全增员申请回调验签失败"
);
}
}
...
@@ -312,7 +320,7 @@ public class CallBackContorll {
...
@@ -312,7 +320,7 @@ public class CallBackContorll {
InsurePay
insurePay
=
InsurePay
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePay
>().
lambda
().
eq
(
InsurePay:
:
getSerialNumber
,
callBack
.
getSerial_number
()));
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
()));
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
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecret
()
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secret
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"投保支付收银台回调验签失败"
);
throw
new
CustomException
(
"投保支付收银台回调验签失败"
);
}
}
...
@@ -331,7 +339,7 @@ public class CallBackContorll {
...
@@ -331,7 +339,7 @@ public class CallBackContorll {
paramsMap
.
put
(
"sign"
,
sign
);
paramsMap
.
put
(
"sign"
,
sign
);
Map
bodyMap
=
Maps
.
newHashMap
();
Map
bodyMap
=
Maps
.
newHashMap
();
bodyMap
.
put
(
"quotation_id"
,
callBack
.
getSerial_number
());
bodyMap
.
put
(
"quotation_id"
,
callBack
.
getSerial_number
());
String
data
=
HttpUtils
.
sendPost
(
getPolicyUrl
,
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
insureApplicant
.
getAppid
(),
insureApplicant
.
getSecret
()
),
bodyMap
);
String
data
=
HttpUtils
.
sendPost
(
getPolicyUrl
,
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
),
bodyMap
);
Map
dataMap
=
JSONObject
.
parseObject
(
data
,
Map
.
class
);
Map
dataMap
=
JSONObject
.
parseObject
(
data
,
Map
.
class
);
if
(
dataMap
.
size
()
>
0
)
{
if
(
dataMap
.
size
()
>
0
)
{
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
)
||
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"e25"
))
{
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
)
||
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"e25"
))
{
...
@@ -340,7 +348,7 @@ public class CallBackContorll {
...
@@ -340,7 +348,7 @@ public class CallBackContorll {
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
updateById
();
insurePolicy
.
updateById
();
}
}
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
insureApplicant
.
getAppid
(),
insureApplicant
.
getSecret
()
))).
type
(
7
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
InsureContorll
.
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
7
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
data
).
requestPath
(
getPolicyUrl
)
.
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
();
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
policyId
(
insurePay
.
getPolicyId
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
build
().
insert
();
}
}
...
@@ -371,7 +379,7 @@ public class CallBackContorll {
...
@@ -371,7 +379,7 @@ public class CallBackContorll {
// InsurePay insurePay = InsurePay.builder().build().selectOne(new QueryWrapper<InsurePay>().lambda().eq(InsurePay::getSerialNumber, callBack.getSerial_number()));
// 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
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getSecret
()
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
secret
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"保单出单回调验签失败"
);
throw
new
CustomException
(
"保单出单回调验签失败"
);
}
}
...
@@ -429,7 +437,7 @@ public class CallBackContorll {
...
@@ -429,7 +437,7 @@ public class CallBackContorll {
InsurePay
insurePay
=
InsurePay
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePay
>().
lambda
().
eq
(
InsurePay:
:
getSerialNumber
,
callBack
.
getOrder_import_uuid
()));
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
()));
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
()));
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
insurePolicy
.
getOrgCode
()));
String
value
=
DigestUtils
.
md5Hex
(
pid
+
insureApplicant
.
getAppidq
()
+
timestamp
+
sb
.
toString
());
String
value
=
DigestUtils
.
md5Hex
(
pid
+
appidq
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
if
(!
value
.
equals
(
sign
))
{
throw
new
CustomException
(
"增员支付回调验签失败"
);
throw
new
CustomException
(
"增员支付回调验签失败"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
a6e13fa8
This diff is collapsed.
Click to expand it.
src/main/resources/application-dev.yml
View file @
a6e13fa8
...
@@ -283,9 +283,9 @@ h5:
...
@@ -283,9 +283,9 @@ h5:
url
:
'
http://javays.com'
url
:
'
http://javays.com'
insure
:
insure
:
#投保 appid
#投保 appid
#
appid: '1002305000010094276'
appid
:
'
1002305000010094276'
#
#投保 secret
#投保 secret
#
secret: '51e405c74bd9514e1955a92520786286'
secret
:
'
51e405c74bd9514e1955a92520786286'
#投保上传文件
#投保上传文件
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
#投保立即出单
...
@@ -304,9 +304,9 @@ insure:
...
@@ -304,9 +304,9 @@ insure:
issue
:
'
http://sandbox.portal.unistar-ins.com/cps/Labor/Policy/issue'
issue
:
'
http://sandbox.portal.unistar-ins.com/cps/Labor/Policy/issue'
#保全appid
#保全appid
#
appidq: '1000115041006006938'
appidq
:
'
1000115041006006938'
#
#保全 secret
#保全 secret
#
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
secretq
:
'
6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全上传文件
#保全上传文件
uploadUrlq
:
'
http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
uploadUrlq
:
'
http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
#保全申请
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/application-test.yml
View file @
a6e13fa8
...
@@ -254,10 +254,10 @@ wxgzh:
...
@@ -254,10 +254,10 @@ wxgzh:
encodingAesKey
:
'
chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
encodingAesKey
:
'
chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure
:
insure
:
#
#投保 appid
#投保 appid
#
appid: '1002303100602312445'
appid
:
'
1002303100602312445'
#
#投保 secret
#投保 secret
#
secret: 'acb329868c31d5b3ba03de40dac13dd9'
secret
:
'
acb329868c31d5b3ba03de40dac13dd9'
#投保上传文件
#投保上传文件
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
#投保立即出单
...
@@ -275,10 +275,10 @@ insure:
...
@@ -275,10 +275,10 @@ insure:
#预付款出单接口
#预付款出单接口
issue
:
'
http://sandbox.portal.unistar-ins.com/cps/Labor/Policy/issue'
issue
:
'
http://sandbox.portal.unistar-ins.com/cps/Labor/Policy/issue'
#
#保全appid
#保全appid
#
appidq: '1000115041006006938'
appidq
:
'
1000115041006006938'
#
#保全 secret
#保全 secret
#
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
secretq
:
'
6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全上传文件
#保全上传文件
uploadUrlq
:
'
http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
uploadUrlq
:
'
http://sandbox.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