From e8a526d46c70d248c488b10b8db4fdba753126fa Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期三, 23 七月 2025 09:09:51 +0800 Subject: [PATCH] 会员自定义标签 --- manager-api/src/main/java/cn/lili/controller/lmk/MemberCustomerTagController.java | 7 +++++++ framework/src/main/java/cn/lili/modules/lmk/service/impl/MemberCustomerTagServiceImpl.java | 12 +++++++++++- framework/src/main/java/cn/lili/modules/lmk/service/MemberCustomerTagService.java | 7 +++++++ 3 files changed, 25 insertions(+), 1 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/MemberCustomerTagService.java b/framework/src/main/java/cn/lili/modules/lmk/service/MemberCustomerTagService.java index 5098b6b..01aa0ce 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/MemberCustomerTagService.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/MemberCustomerTagService.java @@ -40,4 +40,11 @@ * @return */ Result detail(); + + /** + * 鑾峰緱浼氬憳鑷畾涔夋爣绛鹃�氳繃id + * @param id 浼氬憳id + * @return + */ + Result detailById(String id); } diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/MemberCustomerTagServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/MemberCustomerTagServiceImpl.java index afcf0ce..e9b08a4 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/MemberCustomerTagServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/MemberCustomerTagServiceImpl.java @@ -39,7 +39,7 @@ .eq(MemberCustomerTag::getDeleteFlag,false) .count(); if (count >= customerTagCount){ - throw new ServiceException("宸茶揪鍒拌嚜瀹氫箟鏍囩鏈�澶ф暟閲�"); + return Result.error("宸茶揪鍒拌嚜瀹氫箟鏍囩鏈�澶ф暟閲�"); } System.out.println(form); MemberCustomerTag entity = MemberCustomerTagForm.getEntity(form,null); @@ -82,4 +82,14 @@ return Result.ok().data(list); } + + @Override + public Result detailById(String id) { + List<MemberCustomerTag> list = new LambdaQueryChainWrapper<>(baseMapper) + .eq(MemberCustomerTag::getMemberId,id) + .eq(MemberCustomerTag::getDeleteFlag,false) + .list(); + + return Result.ok().data(list); + } } diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/MemberCustomerTagController.java b/manager-api/src/main/java/cn/lili/controller/lmk/MemberCustomerTagController.java index 3152989..4d73cfa 100644 --- a/manager-api/src/main/java/cn/lili/controller/lmk/MemberCustomerTagController.java +++ b/manager-api/src/main/java/cn/lili/controller/lmk/MemberCustomerTagController.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -35,4 +36,10 @@ return memberCustomerTagService.detail(); } + @GetMapping("/detail/{id}") + @ApiOperation(value = "閫氳繃id鑾峰彇浼氬憳鏍囩璇︽儏", notes = "閫氳繃id鑾峰彇浼氬憳鏍囩璇︽儏") + public Result detailById(@PathVariable String id){ + return memberCustomerTagService.detailById(id); + } + } -- Gitblit v1.8.0