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
d4ee79ac
Commit
d4ee79ac
authored
May 26, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
保单列表查询
parent
ecc9d991
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
20 deletions
+39
-20
src/main/java/cn/timer/api/bean/insure/InsureUser.java
+1
-1
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+6
-2
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+1
-0
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
+9
-0
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
+1
-1
src/main/resources/application-dev.yml
+1
-1
src/main/resources/application-test.yml
+5
-4
src/main/resources/mapping/insure/InsureUserMapper.xml
+15
-11
No files found.
src/main/java/cn/timer/api/bean/insure/InsureUser.java
View file @
d4ee79ac
...
...
@@ -158,7 +158,7 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty
(
value
=
"批改原因"
)
private
String
reason
;
@ApiModelProperty
(
value
=
"
批改原因
"
)
@ApiModelProperty
(
value
=
"
录单时间
"
)
private
Date
createTime
;
...
...
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
d4ee79ac
...
...
@@ -235,13 +235,15 @@ public class CallBackContorll {
insurePolicy
.
setStatus
(
"2"
);
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
updateById
();
InsureLog
.
builder
().
type
(
7
).
createTime
(
new
Date
()).
requestType
(
1
).
requestPath
(
base_api_url
+
"/payCallBack"
)
.
returnCode
(
"suc"
).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
build
().
insert
();
}
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
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
7
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
data
).
requestPath
(
getPolicyUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
build
().
insert
();
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
policyId
(
insurePay
.
getPolicyId
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
build
().
insert
();
}
}
map
.
put
(
"status"
,
"1"
);
...
...
@@ -293,6 +295,8 @@ public class CallBackContorll {
insurePolicy
.
updateById
();
insurePay
.
updateById
();
}
InsureLog
.
builder
().
type
(
7
).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
sb
.
toString
()).
requestPath
(
getPolicyUrl
)
.
returnCode
(
callBack
.
getStatus
()).
policyId
(
insurePay
.
getPolicyId
()).
returnMsg
(
callBack
.
getErr_msg
()).
build
().
insert
();
return
map
;
}
}
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
d4ee79ac
...
...
@@ -331,6 +331,7 @@ public class InsureContorll {
insureUser
.
setPolicyDateEnd
(
dtf3
.
parse
(
insureDto
.
getPolicyDateEnd
()));
insureUser
.
setApplyType
(
2
);
//投保类型
insureUser
.
setPolicyId
(
insurePolicy
.
getId
());
insureUser
.
setCreateTime
(
new
Date
());
insureUser
.
insert
();
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
))
{
y
.
setIsInsure
(
1
);
...
...
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
View file @
d4ee79ac
...
...
@@ -17,6 +17,9 @@ import cn.timer.api.utils.ExcelUtils;
import
cn.timer.api.utils.Page
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aliyun.oss.common.utils.StringUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.beust.jcommander.internal.Lists
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
...
...
@@ -64,6 +67,12 @@ public class InsureUserController{
@ApiOperation
(
value
=
"3.保单列表--8小时端"
,
httpMethod
=
"POST"
,
notes
=
"保单列表"
)
public
Result
<
Object
>
userPolicyList
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PolicyDto
policyDto
)
{
Map
map
=
Maps
.
newHashMap
();
if
(!
StringUtils
.
isNullOrEmpty
(
policyDto
.
getCreateTime
())){
List
arr
=
JSONObject
.
parseArray
(
policyDto
.
getCreateTime
(),
String
.
class
);
policyDto
.
setPolicyDateStart
(
arr
.
get
(
0
).
toString
());
policyDto
.
setPolicyDateEnd
(
arr
.
get
(
1
).
toString
());
}
policyDto
.
setOrgCode
(
String
.
valueOf
(
userBean
.
getOrgCode
()));
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 @
d4ee79ac
...
...
@@ -44,5 +44,5 @@ public class PolicyDto {
private
Integer
payId
;
private
Integer
policyId
;
private
Integer
applyType
;
private
String
monthD
;
}
src/main/resources/application-dev.yml
View file @
d4ee79ac
...
...
@@ -287,7 +287,7 @@ insure:
secret
:
'
acb329868c31d5b3ba03de40dac13dd9'
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
insuredUrl
:
'
http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
getPolicyUrl
:
'
http://sandbox.portal.unistar-ins.com/issuing/
/
Home/Index/index'
getPolicyUrl
:
'
http://sandbox.portal.unistar-ins.com/issuing/Home/Index/index'
#查询保单信息
policyDetail
:
'
http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy'
createQuote
:
'
http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote'
...
...
src/main/resources/application-test.yml
View file @
d4ee79ac
...
...
@@ -254,11 +254,12 @@ wxgzh:
encodingAesKey
:
'
chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure
:
appid
:
'
1002303100602312445'
#投保
appid
:
'
1002303100602312445'
secret
:
'
acb329868c31d5b3ba03de40dac13dd9'
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
uploadUrl
:
'
http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
insuredUrl
:
'
http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
getPolicyUrl
:
'
http://sandbox.portal.unistar-ins.com/issuing/
/
Home/Index/index'
getPolicyUrl
:
'
http://sandbox.portal.unistar-ins.com/issuing/Home/Index/index'
#查询保单信息
policyDetail
:
'
http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy'
createQuote
:
'
http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote'
...
...
@@ -267,7 +268,7 @@ insure:
#保全
appidq
:
'
1000115041006006938'
secretq
:
'
6ba1bf4aa0bd14368c95ff0b9934a17b'
secretq
:
'
6ba1bf4aa0bd14368c95ff0b9934a17b'
uploadUrlq
:
'
http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
batchUrl
:
'
http://sandbox.portal.unistar-ins.com/fuli/Home/WelfareProduct/batch_declare'
cancelPayment
:
'
http://sandbox.portal.unistar-ins.com/fuli/Home/OrderImport/order_import_set'
...
...
src/main/resources/mapping/insure/InsureUserMapper.xml
View file @
d4ee79ac
...
...
@@ -281,7 +281,7 @@
<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`,io.name as schemeName,iu.policy_date_start,iu.insure_status,
iu.policy_date_end,i
p
.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.policy_date_end,i
u
.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.policy_id as policyId,
iu.apply_type as applyType
...
...
@@ -311,23 +311,27 @@
<if
test=
"policyDto.name !=null and policyDto.name !=''"
>
and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%')
</if>
<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.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_start <![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>
<if
test=
"policyDto.monthD !=null and policyDto.monthD !=''"
>
AND DATE_FORMAT(iu.policy_date_start,'%Y-%m') = #{policyDto.monthD}
</if>
<if
test=
"policyDto.policyDateStart !=null and policyDto.policyDateStart !='' and policyDto.policyDateEnd !=null and policyDto.policyDateEnd !=''"
>
and iu.create_time BETWEEN #{policyDto.policyDateStart} and #{policyDto.policyDateEnd}
</if>
</where>
order by iu.
policy_date_start
desc
order by iu.
create_time
desc
<if
test=
"policyDto.page.offset != null and policyDto.page.totalPage !=null"
>
LIMIT #{policyDto.page.offset},#{policyDto.page.totalPage}
</if>
...
...
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