zxl
2025-05-16 1e4fce87e08f4a00c76cac14286d8c2c99e3cba0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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);
    }
 
}