Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
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
AutogeneralShanghai
yd-backend
Commits
bec68df2
Commit
bec68df2
authored
Aug 19, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【ydlife】-【客户管理】-4
parent
106943fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
5 deletions
+23
-5
yd-api/src/main/java/com/yd/api/practitioner/vo/practitionerCustomer/CustomerHolder.java
+1
-0
yd-api/src/main/java/com/yd/dal/entity/order/CustomerPolicyInfo.java
+8
-0
yd-api/src/main/resources/mapper/customer/AclPolicyholderMapper.xml
+14
-5
No files found.
yd-api/src/main/java/com/yd/api/practitioner/vo/practitionerCustomer/CustomerHolder.java
View file @
bec68df2
...
@@ -9,4 +9,5 @@ public class CustomerHolder {
...
@@ -9,4 +9,5 @@ public class CustomerHolder {
private
String
mobileNo
;
//客户电话
private
String
mobileNo
;
//客户电话
private
String
gender
;
//客户性别
private
String
gender
;
//客户性别
private
String
birthDate
;
//客户生日
private
String
birthDate
;
//客户生日
private
String
relationType
;
//投被保人关系
}
}
yd-api/src/main/java/com/yd/dal/entity/order/CustomerPolicyInfo.java
View file @
bec68df2
...
@@ -23,6 +23,7 @@ public class CustomerPolicyInfo implements Comparable<CustomerPolicyInfo>{
...
@@ -23,6 +23,7 @@ public class CustomerPolicyInfo implements Comparable<CustomerPolicyInfo>{
private
Long
planId
;
private
Long
planId
;
private
Long
productId
;
private
Long
productId
;
private
Long
fortuneId
;
private
Long
fortuneId
;
private
String
isValid
;
// 保单状态,有效,无效
public
Long
getOrderId
()
{
public
Long
getOrderId
()
{
return
orderId
;
return
orderId
;
...
@@ -154,4 +155,11 @@ public class CustomerPolicyInfo implements Comparable<CustomerPolicyInfo>{
...
@@ -154,4 +155,11 @@ public class CustomerPolicyInfo implements Comparable<CustomerPolicyInfo>{
}
}
}
}
public
String
getIsValid
()
{
return
isValid
;
}
public
void
setIsValid
(
String
isValid
)
{
this
.
isValid
=
isValid
;
}
}
}
yd-api/src/main/resources/mapper/customer/AclPolicyholderMapper.xml
View file @
bec68df2
...
@@ -934,6 +934,7 @@
...
@@ -934,6 +934,7 @@
<result
column=
"mobile_no"
jdbcType=
"VARCHAR"
property=
"mobileNo"
typeHandler=
"com.yd.util.deshandler.DESTypeHandler"
/>
<result
column=
"mobile_no"
jdbcType=
"VARCHAR"
property=
"mobileNo"
typeHandler=
"com.yd.util.deshandler.DESTypeHandler"
/>
<result
column=
"gender"
jdbcType=
"VARCHAR"
property=
"gender"
/>
<result
column=
"gender"
jdbcType=
"VARCHAR"
property=
"gender"
/>
<result
column=
"birth_date"
jdbcType=
"VARCHAR"
property=
"birthDate"
/>
<result
column=
"birth_date"
jdbcType=
"VARCHAR"
property=
"birthDate"
/>
<result
column=
"relation_type"
jdbcType=
"VARCHAR"
property=
"relationType"
/>
</resultMap>
</resultMap>
<select
id=
"queryThisPractitiionerAllPolicyHolderList"
resultMap=
"customerHolder"
>
<select
id=
"queryThisPractitiionerAllPolicyHolderList"
resultMap=
"customerHolder"
>
select c.id,
select c.id,
...
@@ -959,16 +960,19 @@
...
@@ -959,16 +960,19 @@
c.name,
c.name,
c.mobile_no ,
c.mobile_no ,
IF(c.gender = 1,'男','女') gender,
IF(c.gender = 1,'男','女') gender,
c.birth_date
c.birth_date,
t.relation_type
from
from
(select
DISTINCT h.customer_id
(select
h.customer_id, group_concat(distinct h.relation_type ORDER BY h.relation_type) relation_type
from ag_acl_policyholder h
from ag_acl_policyholder h
where h.type = 3
where h.type = 3
and h.order_id in
and h.order_id in
(select t1.order_id from ag_acl_policyholder t1 where t1.customer_id = #{customerId,jdbcType=BIGINT} and t1.type = 2)
(select t1.order_id from ag_acl_policyholder t1 where t1.customer_id = #{customerId,jdbcType=BIGINT} and t1.type = 2)
GROUP BY h.customer_id
) t
) t
left join ag_acl_customer c on t.customer_id = c.id
left join ag_acl_customer c on t.customer_id = c.id
</select>
</select>
<select
id=
"queryPolicyListByHolderCustomerId"
resultType=
"com.yd.dal.entity.order.CustomerPolicyInfo"
>
<select
id=
"queryPolicyListByHolderCustomerId"
resultType=
"com.yd.dal.entity.order.CustomerPolicyInfo"
>
SELECT
SELECT
o.id as orderId,
o.id as orderId,
...
@@ -983,10 +987,15 @@
...
@@ -983,10 +987,15 @@
f.order_price as orderPrice,
f.order_price as orderPrice,
o.plan_id as planId,
o.plan_id as planId,
o.product_id as productId ,
o.product_id as productId ,
IF(o.effective_start_date
<
= NOW() and o.effective_end_date
>
= NOW(),'有效','无效') isValid,
a.name planName,
b.name productName,
f.id as fortuneId
f.id as fortuneId
FROM ag_acl_customer_fortune f
INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price
FROM ag_acl_customer_fortune f
>
0 and o.insurer_id != 888
INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price
>
0 and o.insurer_id != 888 and o.policy_no is not null
inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2
inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2
left join ag_product_plan a on o.plan_id = a.id
left join ag_product b on o.product_id = b.id
WHERE p.customer_id = #{customerId,jdbcType=BIGINT}
WHERE p.customer_id = #{customerId,jdbcType=BIGINT}
</select>
</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