| | |
| | | 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.MemberTagForm; |
| | | 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 cn.lili.modules.lmk.service.MemberTagService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @RequestMapping("/manager/customerManager") |
| | | public class CustomerController { |
| | | private final CustomerService customerService; |
| | | private final CustomerTagService customerTagService; |
| | | private final CustomerTagRefService customerTagRefService; |
| | | private final MemberTagService memberTagService; |
| | | |
| | | @ApiOperation(value = "商铺下拉列表") |
| | | @GetMapping("/store/selectOption") |
| | |
| | | return customerService.getStoreSelectOptions(); |
| | | } |
| | | |
| | | @ApiOperation(value = "获得客户详情") |
| | | @GetMapping("/{id}") |
| | | public Result getCustomerInfo(@PathVariable String id){ |
| | | return customerService.getMember(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "会员分页列表") |
| | | @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); |
| | | public Result add(@RequestBody @Validated(Add.class) MemberTagForm form) { |
| | | return memberTagService.add(form); |
| | | } |
| | | |
| | | @PutMapping("/editTag") |
| | | @ApiOperation(value = "修改标签", notes = "修改标签") |
| | | public Result update(@RequestBody @Validated(Update.class) CustomerTagForm form) { |
| | | return customerTagService.update(form); |
| | | public Result update(@RequestBody @Validated(Update.class) MemberTagForm form) { |
| | | return memberTagService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/tag/{id}") |
| | | @ApiOperation(value = "ID删除标签", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return customerTagService.removeById(id); |
| | | return memberTagService.removeById(id); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/tagList") |
| | | @ApiOperation(value = "标签列表", notes = "标签列表") |
| | | public Result list() { |
| | | return customerTagService.all(); |
| | | return memberTagService.all(); |
| | | } |
| | | @GetMapping("/pageTagList") |
| | | @ApiOperation(value = "分页标签列表", notes = "标签列表") |
| | | public Result pageList(CustomerTagQuery query) { |
| | | return customerTagService.page(query); |
| | | return memberTagService.page(query); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/customerAddTag") |
| | | @ApiOperation(value = "添加客户标签标识", notes = "添加客户标签标识") |
| | | public Result addCustomerTag(@RequestBody @Validated(Add.class) CustomerTagForm form) { |
| | | return customerTagService.addCustomerTag(form); |
| | | public Result addCustomerTag(@RequestBody @Validated(Add.class) MemberTagForm form) { |
| | | return memberTagService.addMemberTag(form); |
| | | } |
| | | |
| | | // @PostMapping("/customerAddTag") |
| | |
| | | // 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); |
| | | return memberTagService.removeById(id); |
| | | } |
| | | |
| | | } |