Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
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
xingmin
yd-csf
Commits
aeeee127
Commit
aeeee127
authored
Sep 10, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fna接口17
parent
a3cfba5b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
41 deletions
+59
-41
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
+0
-6
yd-csf-service/src/main/java/com/yd/csf/service/service/CustomerExpandService.java
+1
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerExpandServiceImpl.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
+51
-16
yd-csf-service/src/main/java/com/yd/csf/service/vo/CustomerExpandVO.java
+2
-19
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
View file @
aeeee127
...
...
@@ -2,10 +2,7 @@ package com.yd.csf.api.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yd.auth.core.dto.AuthUserDto
;
import
com.yd.auth.core.utils.SecurityUtil
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.ResultCode
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.result.Result
;
import
com.yd.common.utils.RandomStringGenerator
;
...
...
@@ -16,11 +13,8 @@ import com.yd.csf.feign.request.appointmentfile.ApiAppointmentFileEditRequest;
import
com.yd.csf.feign.request.appointmentfile.ApiAppointmentFilePageRequest
;
import
com.yd.csf.feign.response.appointmentfile.ApiAppointmentFilePageResponse
;
import
com.yd.csf.service.model.AppointmentFile
;
import
com.yd.csf.service.model.Policyholder
;
import
com.yd.csf.service.service.IAppointmentFileService
;
import
com.yd.user.feign.response.sysuser.ApiSysUserPageResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/CustomerExpandService.java
View file @
aeeee127
...
...
@@ -10,4 +10,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
CustomerExpandService
extends
IService
<
CustomerExpand
>
{
CustomerExpand
getByCustomerBizId
(
String
customerBizId
);
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerExpandServiceImpl.java
View file @
aeeee127
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.csf.service.model.CustomerExpand
;
import
com.yd.csf.service.service.CustomerExpandService
;
...
...
@@ -15,6 +16,10 @@ import org.springframework.stereotype.Service;
public
class
CustomerExpandServiceImpl
extends
ServiceImpl
<
CustomerExpandMapper
,
CustomerExpand
>
implements
CustomerExpandService
{
@Override
public
CustomerExpand
getByCustomerBizId
(
String
customerBizId
)
{
return
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
CustomerExpand
>().
eq
(
CustomerExpand:
:
getCustomerBizId
,
customerBizId
));
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
View file @
aeeee127
...
...
@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -54,7 +55,39 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
@Override
public
CustomerVO
getCustomerVO
(
Customer
customer
)
{
return
CustomerVO
.
objToVo
(
customer
);
CustomerVO
customerVO
=
CustomerVO
.
objToVo
(
customer
);
// 1. 关联查询扩展信息
CustomerExpand
customerExpand
=
customerExpandService
.
getByCustomerBizId
(
customer
.
getCustomerBizId
());
if
(
customerExpand
!=
null
)
{
CustomerExpandVO
customerExpandVO
=
CustomerExpandVO
.
objToVo
(
customerExpand
);
List
<
AddressVO
>
addressList
=
new
ArrayList
<>();
if
(
customerExpand
.
getResidenceAddress
()
!=
null
)
{
AddressVO
addressVO
=
GSON
.
fromJson
(
customerExpand
.
getResidenceAddress
(),
AddressVO
.
class
);
addressVO
.
setType
(
"residenceAddress"
);
addressList
.
add
(
addressVO
);
}
if
(
customerExpand
.
getResidentialAddress
()
!=
null
)
{
AddressVO
addressVO
=
GSON
.
fromJson
(
customerExpand
.
getResidentialAddress
(),
AddressVO
.
class
);
addressVO
.
setType
(
"residentialAddress"
);
addressList
.
add
(
addressVO
);
}
if
(
customerExpand
.
getMailingAddress
()
!=
null
)
{
AddressVO
addressVO
=
GSON
.
fromJson
(
customerExpand
.
getMailingAddress
(),
AddressVO
.
class
);
addressVO
.
setType
(
"mailingAddress"
);
addressList
.
add
(
addressVO
);
}
if
(
customerExpand
.
getCompanyAddress
()
!=
null
)
{
AddressVO
addressVO
=
GSON
.
fromJson
(
customerExpand
.
getCompanyAddress
(),
AddressVO
.
class
);
addressVO
.
setType
(
"companyAddress"
);
addressList
.
add
(
addressVO
);
}
customerExpandVO
.
setAddressList
(
addressList
);
customerVO
.
setCustomerExpand
(
customerExpandVO
);
}
return
customerVO
;
}
@Override
...
...
@@ -66,22 +99,24 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
public
CustomerExpand
getCustomerExpand
(
CustomerAddRequest
customerAddRequest
)
{
CustomerExpand
customerExpand
=
new
CustomerExpand
();
BeanUtils
.
copyProperties
(
customerAddRequest
,
customerExpand
);
AddressVO
residenceAddress
=
customerAddRequest
.
getResidenceAddress
();
if
(
residenceAddress
!=
null
)
{
customerExpand
.
setResidenceAddress
(
residenceAddress
.
toString
());
}
AddressVO
residentialAddress
=
customerAddRequest
.
getResidentialAddress
();
if
(
residentialAddress
!=
null
)
{
customerExpand
.
setResidentialAddress
(
residentialAddress
.
toString
());
}
AddressVO
mailingAddress
=
customerAddRequest
.
getMailingAddress
();
if
(
mailingAddress
!=
null
)
{
customerExpand
.
setMailingAddress
(
mailingAddress
.
toString
());
}
AddressVO
companyAddress
=
customerAddRequest
.
getCompanyAddress
();
if
(
companyAddress
!=
null
)
{
customerExpand
.
setCompanyAddress
(
companyAddress
.
toString
());
List
<
AddressVO
>
addressList
=
customerAddRequest
.
getAddressList
();
if
(
CollUtil
.
isNotEmpty
(
addressList
))
{
for
(
AddressVO
addressVO
:
addressList
)
{
if
(
"residenceAddress"
.
equals
(
addressVO
.
getType
()))
{
customerExpand
.
setResidenceAddress
(
GSON
.
toJson
(
addressVO
));
}
if
(
"residentialAddress"
.
equals
(
addressVO
.
getType
()))
{
customerExpand
.
setResidentialAddress
(
GSON
.
toJson
(
addressVO
));
}
if
(
"mailingAddress"
.
equals
(
addressVO
.
getType
()))
{
customerExpand
.
setMailingAddress
(
GSON
.
toJson
(
addressVO
));
}
if
(
"companyAddress"
.
equals
(
addressVO
.
getType
()))
{
customerExpand
.
setCompanyAddress
(
GSON
.
toJson
(
addressVO
));
}
}
}
return
customerExpand
;
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/CustomerExpandVO.java
View file @
aeeee127
...
...
@@ -7,6 +7,7 @@ import org.springframework.beans.BeanUtils;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 客户扩展信息视图
...
...
@@ -52,25 +53,7 @@ public class CustomerExpandVO implements Serializable {
@Schema
(
description
=
"是否长期出国"
)
private
String
longtimeAbroad
;
/**
* 居住地址
*/
private
AddressVO
residenceAddress
;
/**
* 住宅地址
*/
private
AddressVO
residentialAddress
;
/**
* 邮寄地址
*/
private
AddressVO
mailingAddress
;
/**
* 公司地址
*/
private
AddressVO
companyAddress
;
private
List
<
AddressVO
>
addressList
;
/**
* 公司名称
...
...
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