Administrator
6 days ago 316a91aee6236f312d53eca6cebbaa00c2803d92
feat(address): 添加国家名称字段支持

- 在 AddressInfoDto 中添加 countryName 字段及 API 文档注解
- 在 AddressInfoVo 中添加 countryName 字段
- 在 ApiMallAddressInfoService 实现中添加 countryName 的数据映射
- 在订单信息服务中使用 countryName 构建完整地址信息
- 在 MallAddressInfo 实体中添加 countryName 属性存储
5 files modified
9 ■■■■■ changed files
src/main/java/cc/mrbird/febs/mall/dto/AddressInfoDto.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/entity/MallAddressInfo.java 1 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallAddressInfoServiceImpl.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java 1 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/vo/AddressInfoVo.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/dto/AddressInfoDto.java
@@ -48,6 +48,8 @@
    @NotBlank(message = "Country/Region required")
    @ApiModelProperty(value = "Country/Region")
    private String country;
    @ApiModelProperty(value = "Country/Region")
    private String countryName;
    /**
     * 经度
src/main/java/cc/mrbird/febs/mall/entity/MallAddressInfo.java
@@ -52,5 +52,6 @@
    //市
    private String city;
    private String country;
    private String countryName;
}
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallAddressInfoServiceImpl.java
@@ -70,6 +70,7 @@
            addressInfoVo.setCity(mallAddressInfo.getCity());
            addressInfoVo.setProvince(mallAddressInfo.getProvince());
            addressInfoVo.setCountry(mallAddressInfo.getCountry());
            addressInfoVo.setCountryName(mallAddressInfo.getCountryName());
        }
        return new FebsResponse().success().data(addressInfoVo);
    }
@@ -92,6 +93,7 @@
                        .set(MallAddressInfo::getCity, addressInfoDto.getCity())
                        .set(MallAddressInfo::getProvince, addressInfoDto.getProvince())
                        .set(MallAddressInfo::getCountry, addressInfoDto.getCountry())
                        .set(MallAddressInfo::getCountryName, addressInfoDto.getCountryName())
                        .eq(MallAddressInfo::getMemberId, memberId)
        );
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -195,6 +195,7 @@
                        +address.getArea() +"  -  "
                        +address.getCity() +"  -  "
                        +address.getProvince() +"  -  "
                        +address.getCountryName() +"  -  "
                        + address.getCountry() );
        orderInfo.setLatitude(address.getLatitude());
        orderInfo.setLongitude(address.getLongitude());
src/main/java/cc/mrbird/febs/mall/vo/AddressInfoVo.java
@@ -40,6 +40,9 @@
    @ApiModelProperty(value = "Country/Region")
    private String country;
    private String countryName;
    /**
     * 经度
     */