省市区名称
This commit is contained in:
parent
5ac9576d43
commit
b1279ce060
|
|
@ -23,6 +23,12 @@
|
||||||
<artifactId>ghy-common</artifactId>
|
<artifactId>ghy-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ghy</groupId>
|
||||||
|
<artifactId>ghy-system</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -26,6 +26,12 @@ public class CustomerAddress extends BaseEntity {
|
||||||
@Excel(name = "省", cellType = Excel.ColumnType.NUMERIC)
|
@Excel(name = "省", cellType = Excel.ColumnType.NUMERIC)
|
||||||
private Long provinceId;
|
private Long provinceId;
|
||||||
|
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
private String countryName;
|
||||||
|
|
||||||
@Excel(name = "市", cellType = Excel.ColumnType.NUMERIC)
|
@Excel(name = "市", cellType = Excel.ColumnType.NUMERIC)
|
||||||
private Long cityId;
|
private Long cityId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ghy.customer.service.impl;
|
||||||
import com.ghy.customer.domain.CustomerAddress;
|
import com.ghy.customer.domain.CustomerAddress;
|
||||||
import com.ghy.customer.mapper.CustomerAddressMapper;
|
import com.ghy.customer.mapper.CustomerAddressMapper;
|
||||||
import com.ghy.customer.service.CustomerAddressService;
|
import com.ghy.customer.service.CustomerAddressService;
|
||||||
|
import com.ghy.system.service.ISysAreaService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
@ -16,9 +17,18 @@ public class CustomerAddressServiceImpl implements CustomerAddressService {
|
||||||
@Resource
|
@Resource
|
||||||
private CustomerAddressMapper customerAddressMapper;
|
private CustomerAddressMapper customerAddressMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysAreaService iSysAreaService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CustomerAddress> getCustomerAddressList(CustomerAddress customerAddress) {
|
public List<CustomerAddress> getCustomerAddressList(CustomerAddress customerAddress) {
|
||||||
return customerAddressMapper.getCustomerAddressList(customerAddress);
|
List<CustomerAddress> 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
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
<result property="countryId" column="country_id"/>
|
<result property="countryId" column="country_id"/>
|
||||||
<result property="address" column="address"/>
|
<result property="address" column="address"/>
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
|
<result property="isDefault" column="is_default" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
|
|
@ -67,6 +68,7 @@
|
||||||
<if test="cityId != null and cityId != 0">city_id,</if>
|
<if test="cityId != null and cityId != 0">city_id,</if>
|
||||||
<if test="countryId != null and countryId != 0">country_id,</if>
|
<if test="countryId != null and countryId != 0">country_id,</if>
|
||||||
<if test="status != null and status != ''">status,</if>
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="address != null and address != ''">address,</if>
|
||||||
<if test="isDefault != null and isDefault != 0">is_default,</if>
|
<if test="isDefault != null and isDefault != 0">is_default,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
|
@ -79,6 +81,7 @@
|
||||||
<if test="cityId != null and cityId != 0">#{cityId},</if>
|
<if test="cityId != null and cityId != 0">#{cityId},</if>
|
||||||
<if test="countryId != null and countryId != 0">#{countryId},</if>
|
<if test="countryId != null and countryId != 0">#{countryId},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="address != null and address != ''">#{address},</if>
|
||||||
<if test="isDefault != null and isDefault != 0">#{isDefault},</if>
|
<if test="isDefault != null and isDefault != 0">#{isDefault},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue