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
589d6d81
Commit
589d6d81
authored
May 25, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
保单列表更新
parent
ce04a123
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
17 deletions
+44
-17
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+8
-6
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
+0
-5
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
+3
-1
src/main/resources/mapping/insure/InsureUserMapper.xml
+33
-5
No files found.
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
589d6d81
...
...
@@ -132,6 +132,7 @@ public class CallBackContorll {
CallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
CallBack
.
class
);
/*1保全复核回调*/
if
(
callBack
.
getCallback_type
().
equals
(
"1"
))
{
/*核保*/
}
else
{
/*到这就已经支付成功出单了*/
...
...
@@ -228,20 +229,21 @@ public class CallBackContorll {
String
data
=
HttpUtils
.
sendPost
(
getPolicyUrl
,
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
),
bodyMap
);
Map
dataMap
=
JSONObject
.
parseObject
(
data
,
Map
.
class
);
if
(
dataMap
.
size
()
>
0
)
{
if
(
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"e25"
)
))
{
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"e25"
))
{
//TODO 如果是E25则将保单设为出单中,更新交由保单出单回调做,设为出单状态是因为之后可以手动校验
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
insurePay
.
getPolicyId
()).
build
().
selectById
();
insurePolicy
.
setStatus
(
"2"
);
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
updateById
();
}
}
else
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
))
{
InsureLog
.
builder
().
type
(
7
).
createTime
(
new
Date
()).
requestType
(
1
).
requestPath
(
base_api_url
+
"/payCallBack"
)
.
returnCode
(
"suc"
).
returnMsg
(
"确认支付成功,支付方式:"
+
insurePay
.
getPayType
()
+
",支付金额:"
+
callBack
.
getAmount
()).
policyId
(
insurePay
.
getPolicyId
()).
build
().
insert
();
}
else
{
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
6
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
data
).
requestPath
(
getPolicyUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
"请求出单中"
).
build
().
insert
();
map
.
put
(
"status"
,
"1"
);
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()
).
build
().
insert
();
}
}
InsureLog
.
builder
().
type
(
7
).
createTime
(
new
Date
()).
requestType
(
1
).
requestPath
(
base_api_url
+
"/payCallBack"
)
.
returnCode
(
"suc"
).
returnMsg
(
"确认支付成功,支付方式:"
+
insurePay
.
getPayType
()
+
",支付金额:"
+
callBack
.
getAmount
()).
policyId
(
insurePay
.
getPolicyId
()).
build
().
insert
();
map
.
put
(
"status"
,
"1"
);
return
map
;
}
...
...
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
View file @
589d6d81
...
...
@@ -64,11 +64,6 @@ public class InsureUserController{
@ApiOperation
(
value
=
"3.保单列表--8小时端"
,
httpMethod
=
"POST"
,
notes
=
"保单列表"
)
public
Result
<
Object
>
userPolicyList
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PolicyDto
policyDto
)
{
Map
map
=
Maps
.
newHashMap
();
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getId
,
policyDto
.
getId
()));
if
(
insurePolicy
==
null
){
return
ResultUtil
.
error
(
"保单号不存在"
);
}
policyDto
.
setId
(
insurePolicy
.
getId
());
List
<
PolicyDto
>
list
=
insureUserMapper
.
selectPolicyList
(
policyDto
);
map
.
put
(
"list"
,
Optional
.
ofNullable
(
list
).
orElse
(
Lists
.
newArrayList
()));
map
.
put
(
"total"
,
insureUserMapper
.
totalUser
(
policyDto
));
...
...
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
View file @
589d6d81
...
...
@@ -12,7 +12,7 @@ import java.util.Date;
*/
@Data
public
class
PolicyDto
{
private
long
id
;
private
Integer
id
;
private
String
name
;
private
Integer
zjType
;
private
String
zjNum
;
...
...
@@ -42,5 +42,7 @@ public class PolicyDto {
private
String
productId
;
private
Integer
policyPayType
;
private
Integer
payId
;
private
Integer
policyId
;
private
Integer
applyType
;
}
src/main/resources/mapping/insure/InsureUserMapper.xml
View file @
589d6d81
...
...
@@ -280,16 +280,25 @@
<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`,i
p.scheme_n
ame,iu.policy_date_start,iu.insure_status,
iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,i
o.name as schemeN
ame,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.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory
iu.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory,
iu.policy_id as policyId,
iu.apply_type as applyType
from insure_user iu
LEFT JOIN yggl_main_emp yme on yme.id=iu.user_id
LEFT JOIN insure_policy ip on ip.id=iu.policy_id
LEFT JOIN insure_product io on io.id=ip.product_id
<where>
<if
test=
"policyDto.orgCode !=null and policyDto.orgCode !=''"
>
and ip.org_code=#{policyDto.orgCode}
</if>
<if
test=
"policyDto.productId !=null and policyDto.productId !=''"
>
and ip.product_id=#{policyDto.productId}
</if>
<if
test=
"policyDto.policyNo !=null and policyDto.policyNo !=''"
>
and ip.policy_no=#{policyDto.policyNo}
</if>
<if
test=
"policyDto.id !=null and policyDto.id !=''"
>
and ip.id=#{policyDto.id}
</if>
...
...
@@ -311,11 +320,15 @@
<if
test=
"policyDto.status !=null and policyDto.status !=''"
>
and iu.insure_status = #{policyDto.status}
</if>
<if
test=
"policyDto.status !=null and policyDto.status !=''"
>
and iu.insure_status = #{policyDto.status}
</if>
<if
test=
"policyDto.applyType !=null and policyDto.applyType !=''"
>
and iu.apply_type = #{policyDto.applyType}
</if>
</where>
order by iu.policy_date_start desc
<if
test=
"policyDto.page.offset != null and policyDto.page.totalPage !=null"
>
LIMIT #{policyDto.page.offset},#{policyDto.page.totalPage}
</if>
</select>
...
...
@@ -327,6 +340,12 @@
<if
test=
"policyDto.orgCode !=null and policyDto.orgCode !=''"
>
and ip.org_code=#{policyDto.orgCode}
</if>
<if
test=
"policyDto.productId !=null and policyDto.productId !=''"
>
and ip.product_id=#{policyDto.productId}
</if>
<if
test=
"policyDto.policyNo !=null and policyDto.policyNo !=''"
>
and ip.policy_no=#{policyDto.policyNo}
</if>
<if
test=
"policyDto.id !=null and policyDto.id !=''"
>
and ip.id=#{policyDto.id}
</if>
...
...
@@ -342,6 +361,15 @@
<if
test=
"policyDto.policyDateStart !=null and policyDto.policyDateStart !=''"
>
and iu.policy_date_start
<![CDATA[>=]]>
#{policyDto.policyDateStart}
</if>
<if
test=
"policyDto.policyDateEnd !=null and policyDto.policyDateEnd !=''"
>
and iu.policy_date_end
<![CDATA[<=]]>
#{policyDto.policyDateEnd}
</if>
<if
test=
"policyDto.status !=null and policyDto.status !=''"
>
and iu.insure_status = #{policyDto.status}
</if>
<if
test=
"policyDto.applyType !=null and policyDto.applyType !=''"
>
and iu.apply_type = #{policyDto.applyType}
</if>
</where>
</select>
...
...
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