mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
package com.panzhihua.service_community.api;
 
import javax.annotation.Resource;
 
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import com.panzhihua.common.model.dtos.community.dpc.AddDpcDTO;
import com.panzhihua.common.model.dtos.community.dpc.EditDpcDTO;
import com.panzhihua.common.model.dtos.community.dpc.PageDpcDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComActDpcService;
 
import lombok.extern.slf4j.Slf4j;
 
/**
 * @title: ComActDpcApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 人大代表
 * @author: hans
 * @date: 2022/06/07 10:57
 */
@Slf4j
@RestController
@RequestMapping("/dpc")
public class ComActDpcApi {
 
    @Resource
    private ComActDpcService comActDpcService;
 
    /**
     * 新增人大代表
     * @param addDpcDTO
     * @return
     */
    @PostMapping("/add")
    public R addDpc(@RequestBody AddDpcDTO addDpcDTO) {
        return comActDpcService.addDpc(addDpcDTO);
    }
 
    /**
     * 修改人大代表
     * @param editDpcDTO
     * @return
     */
    @PostMapping("/edit")
    public R editDpc(@RequestBody EditDpcDTO editDpcDTO) {
        return comActDpcService.editDpc(editDpcDTO);
    }
 
    /**
     * 删除人大代表
     * @param id
     * @return
     */
    @DeleteMapping("/delete")
    public R deleteDpc(@RequestParam("id") Long id) {
        return comActDpcService.deleteDpc(id);
    }
 
    /**
     * 获取人大代表详情
     * @param id
     * @return
     */
    @GetMapping("/detail")
    public R detailDpc(@RequestParam("id") Long id) {
        return comActDpcService.detailDpc(id);
    }
 
    /**
     * 分页查询人大代表
     * @param pageDpcDTO
     * @return
     */
    @PostMapping("/page")
    public R pageDpc(@RequestBody PageDpcDTO pageDpcDTO) {
        return comActDpcService.pageDpc(pageDpcDTO);
    }
}