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
65b8f536
Commit
65b8f536
authored
Apr 01, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运营后台--
更改投保业务逻辑
parent
239e9daf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+26
-3
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
+1
-1
src/main/resources/mapping/insure/InsureUserMapper.xml
+1
-1
No files found.
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
65b8f536
...
@@ -43,9 +43,31 @@ public class CallBackContorll {
...
@@ -43,9 +43,31 @@ public class CallBackContorll {
@PostMapping
(
value
=
"/insuredCallBack"
)
@PostMapping
(
value
=
"/insuredCallBack"
)
@ApiOperation
(
value
=
"6.投保申请回调"
,
httpMethod
=
"Post"
,
notes
=
"投保申请回调"
)
@ApiOperation
(
value
=
"6.投保申请回调"
,
httpMethod
=
"Post"
,
notes
=
"投保申请回调"
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
2
)
private
String
insuredCallBack
(
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
,
@RequestBody
CallBack
callBack
){
private
Map
insuredCallBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
log
.
info
(
String
.
valueOf
(
callBack
));
Map
map
=
Maps
.
newHashMap
();
return
"1"
;
map
.
put
(
"status"
,
"error"
);
if
(
StringUtils
.
isNullOrEmpty
(
pid
)||
StringUtils
.
isNullOrEmpty
(
sign
)&&
StringUtils
.
isNullOrEmpty
(
timestamp
)){
return
map
;
}
if
(!
pid
.
equals
(
appidq
)){
return
map
;
}
InputStream
is
=
null
;
is
=
request
.
getInputStream
();
StringBuilder
sb
=
new
StringBuilder
();
byte
[]
b
=
new
byte
[
4096
];
for
(
int
n
;
(
n
=
is
.
read
(
b
))
!=
-
1
;)
{
sb
.
append
(
new
String
(
b
,
0
,
n
));
}
String
value
=
DigestUtils
.
md5Hex
(
appidq
+
secretq
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
)){
return
map
;
}
CallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
CallBack
.
class
);
Map
trueMap
=
Maps
.
newHashMap
();
trueMap
.
put
(
"status"
,
"1"
);
return
trueMap
;
}
}
@PostMapping
(
value
=
"/CallBack"
)
@PostMapping
(
value
=
"/CallBack"
)
...
@@ -85,6 +107,7 @@ public class CallBackContorll {
...
@@ -85,6 +107,7 @@ public class CallBackContorll {
if
(
oldlist
!=
null
||
oldlist
.
size
()>
0
)
{
if
(
oldlist
!=
null
||
oldlist
.
size
()>
0
)
{
oldlist
.
forEach
(
i
->
{
oldlist
.
forEach
(
i
->
{
i
.
setInsureStatus
(
4
);
i
.
setInsureStatus
(
4
);
i
.
setStatus
(
"2"
);
i
.
updateById
();
i
.
updateById
();
YgglMainEmp
.
builder
().
isInsure
(
3
).
build
().
update
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getId
,
i
.
getUserId
()));
YgglMainEmp
.
builder
().
isInsure
(
3
).
build
().
update
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getId
,
i
.
getUserId
()));
});
});
...
...
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
View file @
65b8f536
...
@@ -36,5 +36,5 @@ public class PolicyDto {
...
@@ -36,5 +36,5 @@ public class PolicyDto {
private
String
policyFile
;
private
String
policyFile
;
private
String
benefitOccupationCategory
;
private
String
benefitOccupationCategory
;
private
Integer
userId
;
private
Integer
userId
;
private
Integer
insureStatus
;
}
}
src/main/resources/mapping/insure/InsureUserMapper.xml
View file @
65b8f536
...
@@ -277,7 +277,7 @@
...
@@ -277,7 +277,7 @@
</delete>
</delete>
<select
id=
"selectPolicyList"
resultType=
"cn.timer.api.dto.insure.PolicyDto"
>
<select
id=
"selectPolicyList"
resultType=
"cn.timer.api.dto.insure.PolicyDto"
>
select iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,ip.scheme_name,iu.policy_date_start,
select iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,ip.scheme_name,iu.policy_date_start,
iu.insure_status,
iu.policy_date_end,ip.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.policy_date_end,ip.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.user_id as userId
iu.user_id as userId
from insure_user iu
from insure_user iu
...
...
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