From 55cae6d2aa8d3a5e333010d64f2fc835fe56916e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AE=E6=A2=A6?= Date: Wed, 23 Aug 2023 16:51:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0areaName?= =?UTF-8?q?=20=E5=AD=97=E6=AE=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/admin/user/vo/MemberUserBaseVO.java | 3 +++ .../yudao/module/member/convert/user/MemberUserConvert.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java index f411c5a16..90743042c 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java @@ -43,6 +43,9 @@ public class MemberUserBaseVO { @Schema(description = "所在地", example = "4371") private Long areaId; + @Schema(description = "所在地可视化显示", example = "4371") + private String areaName; + @Schema(description = "出生日期", example = "2023-03-12") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) private LocalDateTime birthday; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java index 63e28b2f1..b95557dcf 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/user/MemberUserConvert.java @@ -5,9 +5,11 @@ import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.member.controller.admin.user.vo.MemberUserRespVO; import cn.iocoder.yudao.module.member.controller.admin.user.vo.MemberUserUpdateReqVO; import cn.iocoder.yudao.module.member.controller.app.user.vo.AppMemberUserInfoRespVO; +import cn.iocoder.yudao.module.member.convert.address.AddressConvert; import cn.iocoder.yudao.module.member.dal.dataobject.tag.MemberTagDO; import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; @@ -16,7 +18,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; -@Mapper +@Mapper(uses = {AddressConvert.class}) public interface MemberUserConvert { MemberUserConvert INSTANCE = Mappers.getMapper(MemberUserConvert.class); @@ -31,6 +33,7 @@ public interface MemberUserConvert { PageResult convertPage(PageResult page); + @Mapping(source = "areaId", target = "areaName", qualifiedByName = "convertAreaIdToAreaName") MemberUserRespVO convert03(MemberUserDO bean); default PageResult convertPage(PageResult pageResult,