liyong
2026-05-11 5419a78b26e0005d65d53ad77ab437e6b5e6f712
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
package com.ruoyi.basic.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.CustomerContactDto;
import com.ruoyi.basic.service.CustomerContactService;
import com.ruoyi.framework.web.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * <p>
 * 客户联系人表 前端控制器
 * </p>
 *
 * @author 芯导软件(江苏)有限公司
 * @since 2026-05-07 03:46:40
 */
@RestController
@RequestMapping("/customerContact")
@AllArgsConstructor
@Tag(name = "客户联系人表")
public class CustomerContactController {
 
    private final CustomerContactService customerContactService;
 
    /**
     * 分页查询
     * @param page
     * @param customerContact
     * @return
     */
    @GetMapping("/listPage")
    @Operation(summary = "分页查询")
    public R listPage(Page<CustomerContactDto> page, CustomerContactDto customerContact) {
        return R.ok(customerContactService.listPage(page, customerContact));
    }
 
 
    @PostMapping("/add")
    @Operation(summary = "添加")
    public R add(@RequestBody CustomerContactDto customerContact) {
        return R.ok(customerContactService.add(customerContact));
    }
 
    @PutMapping("update")
    @Operation(summary = "修改")
    public R update(@RequestBody CustomerContactDto customerContact) {
        return R.ok(customerContactService.updateCustomerContact(customerContact));
    }
 
    @GetMapping("/getById/{id}")
    @Operation(summary = "通过id查询")
    public R getById(@PathVariable("id") Long id) {
        return R.ok(customerContactService.getCustomerContactDtoById(id));
    }
 
    @DeleteMapping("/delete")
    @Operation(summary = "删除")
    public R delete(@RequestBody List<Long> ids) {
        return R.ok(customerContactService.removeByIds(ids));
    }
}