diff --git a/ghy-custom/pom.xml b/ghy-custom/pom.xml
index 7d34add3..fe94441f 100644
--- a/ghy-custom/pom.xml
+++ b/ghy-custom/pom.xml
@@ -23,6 +23,12 @@
ghy-common
+
+
+ com.ghy
+ ghy-system
+
+
\ No newline at end of file
diff --git a/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerAddress.java b/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerAddress.java
index e30a8b9a..78812212 100644
--- a/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerAddress.java
+++ b/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerAddress.java
@@ -26,6 +26,12 @@ public class CustomerAddress extends BaseEntity {
@Excel(name = "省", cellType = Excel.ColumnType.NUMERIC)
private Long provinceId;
+ private String provinceName;
+
+ private String cityName;
+
+ private String countryName;
+
@Excel(name = "市", cellType = Excel.ColumnType.NUMERIC)
private Long cityId;
diff --git a/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerAddressServiceImpl.java b/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerAddressServiceImpl.java
index 799847b7..f6b94e6c 100644
--- a/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerAddressServiceImpl.java
+++ b/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerAddressServiceImpl.java
@@ -3,6 +3,7 @@ package com.ghy.customer.service.impl;
import com.ghy.customer.domain.CustomerAddress;
import com.ghy.customer.mapper.CustomerAddressMapper;
import com.ghy.customer.service.CustomerAddressService;
+import com.ghy.system.service.ISysAreaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -16,9 +17,18 @@ public class CustomerAddressServiceImpl implements CustomerAddressService {
@Resource
private CustomerAddressMapper customerAddressMapper;
+ @Resource
+ private ISysAreaService iSysAreaService;
+
@Override
public List getCustomerAddressList(CustomerAddress customerAddress) {
- return customerAddressMapper.getCustomerAddressList(customerAddress);
+ List addressList = customerAddressMapper.getCustomerAddressList(customerAddress);
+ for (CustomerAddress address : addressList) {
+ address.setCountryName(iSysAreaService.selectById(address.getCountryId()).getAreaName());
+ address.setCityName(iSysAreaService.selectById(address.getCityId()).getAreaName());
+ address.setProvinceName(iSysAreaService.selectById(address.getProvinceId()).getAreaName());
+ }
+ return addressList;
}
@Override
diff --git a/ghy-custom/src/main/resources/mapper/customer/CustomerAddressMapper.xml b/ghy-custom/src/main/resources/mapper/customer/CustomerAddressMapper.xml
index e8d423bb..f0587292 100644
--- a/ghy-custom/src/main/resources/mapper/customer/CustomerAddressMapper.xml
+++ b/ghy-custom/src/main/resources/mapper/customer/CustomerAddressMapper.xml
@@ -12,6 +12,7 @@
+
@@ -67,6 +68,7 @@
city_id,
country_id,
status,
+ address,
is_default,
create_by,
remark,
@@ -79,6 +81,7 @@
#{cityId},
#{countryId},
#{status},
+ #{address},
#{isDefault},
#{createBy},
#{remark},