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(); + } + }