From 05d286d33b25ea7e317eae2861bb765ac11a927d Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 15 五月 2025 17:44:34 +0800
Subject: [PATCH] 新增客户管理,客户标签(暂留)功能
---
manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 103 insertions(+), 0 deletions(-)
diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java
new file mode 100644
index 0000000..f3938a7
--- /dev/null
+++ b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java
@@ -0,0 +1,103 @@
+package cn.lili.controller.lmk;
+
+import cn.lili.base.Result;
+import cn.lili.common.enums.ResultUtil;
+import cn.lili.common.vo.PageVO;
+import cn.lili.common.vo.ResultMessage;
+import cn.lili.group.Add;
+import cn.lili.group.Update;
+import cn.lili.modules.lmk.domain.form.CustomerTagForm;
+import cn.lili.modules.lmk.domain.form.CustomerTagRefForm;
+import cn.lili.modules.lmk.domain.query.CustomerQuery;
+import cn.lili.modules.lmk.domain.query.CustomerTagQuery;
+import cn.lili.modules.lmk.service.CustomerService;
+import cn.lili.modules.lmk.service.CustomerTagRefService;
+import cn.lili.modules.lmk.service.CustomerTagService;
+import cn.lili.modules.member.entity.vo.MemberSearchVO;
+import cn.lili.modules.member.entity.vo.MemberVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@Validated
+@RequiredArgsConstructor
+@Api(value = "瀹㈡埛绠$悊", tags = "绠$悊")
+@RestController
+@RequestMapping("/manager/customerManager")
+public class CustomerController {
+ private final CustomerService customerService;
+ private final CustomerTagService customerTagService;
+ private final CustomerTagRefService customerTagRefService;
+
+ @ApiOperation(value = "鍟嗛摵涓嬫媺鍒楄〃")
+ @GetMapping("/store/selectOption")
+ public Result getStoreSelectOptions(){
+ return customerService.getStoreSelectOptions();
+ }
+
+
+ @ApiOperation(value = "浼氬憳鍒嗛〉鍒楄〃")
+ @GetMapping
+ public Result getByPage(CustomerQuery customerQuery) {
+ return customerService.getMemberPage(customerQuery);
+ }
+
+ @PostMapping("/addTag")
+ @ApiOperation(value = "娣诲姞鏍囩", notes = "娣诲姞鏍囩")
+ public Result add(@RequestBody @Validated(Add.class) CustomerTagForm form) {
+ return customerTagService.add(form);
+ }
+
+ @PutMapping("/editTag")
+ @ApiOperation(value = "淇敼鏍囩", notes = "淇敼鏍囩")
+ public Result update(@RequestBody @Validated(Update.class) CustomerTagForm form) {
+ return customerTagService.update(form);
+ }
+
+ @DeleteMapping("/tag/{id}")
+ @ApiOperation(value = "ID鍒犻櫎鏍囩", notes = "ID鍒犻櫎")
+ public Result removeById(@PathVariable("id") String id) {
+ return customerTagService.removeById(id);
+ }
+
+
+ @GetMapping("/tagList")
+ @ApiOperation(value = "鏍囩鍒楄〃", notes = "鏍囩鍒楄〃")
+ public Result list() {
+ return customerTagService.all();
+ }
+ @GetMapping("/pageTagList")
+ @ApiOperation(value = "鍒嗛〉鏍囩鍒楄〃", notes = "鏍囩鍒楄〃")
+ public Result pageList(CustomerTagQuery query) {
+ return customerTagService.page(query);
+ }
+
+
+ @PostMapping("/customerAddTag")
+ @ApiOperation(value = "娣诲姞瀹㈡埛鏍囩鏍囪瘑", notes = "娣诲姞瀹㈡埛鏍囩鏍囪瘑")
+ public Result addCustomerTag(@RequestBody @Validated(Add.class) CustomerTagForm form) {
+ return customerTagService.addCustomerTag(form);
+ }
+
+// @PostMapping("/customerAddTag")
+// @ApiOperation(value = "娣诲姞瀹㈡埛鏍囩鏍囪瘑", notes = "娣诲姞瀹㈡埛鏍囩鏍囪瘑")
+// public Result add(@RequestBody @Validated(Add.class) CustomerTagRefForm form) {
+// return customerTagRefService.add(form);
+// }
+
+ @PutMapping("/customerEditTag")
+ @ApiOperation(value = "淇敼瀹㈡埛鏍囩鏍囪瘑", notes = "淇敼瀹㈡埛鏍囩鏍囪瘑")
+ public Result update(@RequestBody @Validated(Update.class) CustomerTagRefForm form) {
+ return customerTagRefService.update(form);
+ }
+
+ @DeleteMapping("/customerDelTag/{id}")
+ @ApiOperation(value = "鍒犻櫎瀹㈡埛鏍囩鏍囪瘑ID鍒犻櫎", notes = "鍒犻櫎瀹㈡埛鏍囩鏍囪瘑ID鍒犻櫎")
+ public Result removeCustomerTagById(@PathVariable("id") String id) {
+ return customerTagRefService.removeById(id);
+ }
+
+}
--
Gitblit v1.8.0