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
9377a733
Commit
9377a733
authored
Mar 20, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
ad72a12d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
yd-csf-service/src/main/java/com/yd/csf/service/vo/CustomerVO.java
+19
-6
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/vo/CustomerVO.java
View file @
9377a733
package
com
.
yd
.
csf
.
service
.
vo
;
import
cn.hutool.core.collection.CollUtil
;
import
com.google.gson.reflect.TypeToken
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.csf.service.dto.TaxCountry
;
...
...
@@ -8,6 +9,7 @@ import com.yd.csf.service.utils.GSONUtil;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
java.io.Serializable
;
...
...
@@ -397,20 +399,31 @@ public class CustomerVO implements Serializable {
}
CustomerVO
customerVO
=
new
CustomerVO
();
BeanUtils
.
copyProperties
(
customer
,
customerVO
);
// 解析地址列表(保持不变)
if
(
ObjectUtils
.
isNotEmpty
(
customer
.
getAddressList
()))
{
List
<
AddressVO
>
addressList
=
GSONUtil
.
fromJson
(
customer
.
getAddressList
(),
new
TypeToken
<
List
<
AddressVO
>>()
{
}.
getType
());
List
<
AddressVO
>
addressList
=
GSONUtil
.
fromJson
(
customer
.
getAddressList
(),
new
TypeToken
<
List
<
AddressVO
>>()
{}.
getType
());
customerVO
.
setAddressList
(
addressList
);
}
// 解析税务列表(保持不变)
if
(
ObjectUtils
.
isNotEmpty
(
customer
.
getTaxList
()))
{
List
<
TaxCountry
>
taxList
=
GSONUtil
.
fromJson
((
String
)
customer
.
getTaxList
(),
new
TypeToken
<
List
<
TaxCountry
>>()
{
}.
getType
());
List
<
TaxCountry
>
taxList
=
GSONUtil
.
fromJson
((
String
)
customer
.
getTaxList
(),
new
TypeToken
<
List
<
TaxCountry
>>()
{}.
getType
());
customerVO
.
setApiTaxationDtoList
(
taxList
);
}
// 解析证件列表
if
(
ObjectUtils
.
isNotEmpty
(
customer
.
getCertificateList
()))
{
List
<
ApiCertificateDto
>
certificateList
=
GSONUtil
.
fromJson
((
String
)
customer
.
getCertificateList
(),
new
TypeToken
<
List
<
ApiCertificateDto
>>()
{
}.
getType
());
List
<
ApiCertificateDto
>
certificateList
=
GSONUtil
.
fromJson
((
String
)
customer
.
getCertificateList
(),
new
TypeToken
<
List
<
ApiCertificateDto
>>()
{}.
getType
());
customerVO
.
setApiCertificateDtoList
(
certificateList
);
if
(
CollUtil
.
isNotEmpty
(
certificateList
))
{
ApiCertificateDto
firstCert
=
certificateList
.
get
(
0
);
if
(
StringUtils
.
isBlank
(
customerVO
.
getDocumentType
()))
{
customerVO
.
setDocumentType
(
firstCert
.
getDocumentType
());
}
if
(
StringUtils
.
isBlank
(
customerVO
.
getIdNumber
()))
{
customerVO
.
setIdNumber
(
firstCert
.
getIdNumber
());
}
}
}
return
customerVO
;
...
...
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