From de8353128537649beb11aef7c21c3c1879c9ceea Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 21 Aug 2023 21:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=A2=9E=E5=8A=A0=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=20=E7=B2=BE=E7=AE=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/admin/tag/MemberTagController.java | 9 +++++++++ .../module/member/service/tag/MemberTagService.java | 6 ++++++ .../module/member/service/tag/MemberTagServiceImpl.java | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/tag/MemberTagController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/tag/MemberTagController.java index 28110015c..c77a83e9d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/tag/MemberTagController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/tag/MemberTagController.java @@ -65,6 +65,15 @@ public class MemberTagController { return success(MemberTagConvert.INSTANCE.convert(tag)); } + @GetMapping("/list-all-simple") + @Operation(summary = "获取会员标签精简信息列表", description = "只包含被开启的会员标签,主要用于前端的下拉选项") + public CommonResult> getSimpleTagList() { + // 获用户列表,只要开启状态的 + List list = tagService.getList(); + // 排序后,返回给前端 + return success(MemberTagConvert.INSTANCE.convertList(list)); + } + @GetMapping("/list") @Operation(summary = "获得会员标签列表") @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagService.java index da4fa0a51..5ecd1e244 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagService.java @@ -63,4 +63,10 @@ public interface MemberTagService { */ PageResult getTagPage(MemberTagPageReqVO pageReqVO); + /** + * 获取标签列表 + * + * @return 标签列表 + */ + List getList(); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java index 26bf4304f..eb0ce11d0 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/tag/MemberTagServiceImpl.java @@ -105,4 +105,9 @@ public class MemberTagServiceImpl implements MemberTagService { return tagMapper.selectPage(pageReqVO); } + @Override + public List getList() { + return tagMapper.selectList(); + } + }