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
86
87
88
89
90
package com.panzhihua.service_grid.api;
 
import javax.annotation.Resource;
 
import org.springframework.web.bind.annotation.*;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.panzhihua.common.model.dtos.grid.EventMainMemberAddDTO;
import com.panzhihua.common.model.dtos.grid.EventMainMemberDeleteDTO;
import com.panzhihua.common.model.dtos.grid.EventMainMemberEditDTO;
import com.panzhihua.common.model.dtos.grid.PageEventMainMemberDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.grid.EventMainMemberDetailsVO;
import com.panzhihua.common.model.vos.grid.EventMainMemberVO;
import com.panzhihua.service_grid.service.EventMainMemberService;
 
import lombok.extern.slf4j.Slf4j;
 
/**
 *
 * @author cedoo email:cedoo(a)qq.com
 * @version 1.0
 * @since 1.0
 * @date 2021-05-26
 */
@Slf4j
@RestController
@RequestMapping("/eventmainmember")
public class EventMainMemberApi {
 
    @Resource
    private EventMainMemberService eventMainMemberService;
 
    /**
     * 新增重点人群记录
     * 
     * @param eventMainMemberAddDTO
     * @return 新增结果
     */
    @PostMapping("/add")
    R add(@RequestBody EventMainMemberAddDTO eventMainMemberAddDTO) {
        return eventMainMemberService.add(eventMainMemberAddDTO);
    }
 
    /**
     * 修改重点人群记录
     * 
     * @param eventMainMemberEditDTO
     * @return 维护结果
     */
    @PostMapping("/edit")
    R edit(@RequestBody EventMainMemberEditDTO eventMainMemberEditDTO) {
        return eventMainMemberService.edit(eventMainMemberEditDTO);
    }
 
    /**
     * 分页查找重点人群记录
     * 
     * @param pageEventMainMemberDTO
     * @return 维护结果
     */
    @PostMapping("/page")
    R<IPage<EventMainMemberVO>> query(@RequestBody PageEventMainMemberDTO pageEventMainMemberDTO) {
        return eventMainMemberService.query(pageEventMainMemberDTO);
    }
 
    /**
     * 删除重点人群记录
     * 
     * @param EventMainMemberDeleteDTO
     * @return 平台用户信息
     */
    @PostMapping("/delete")
    R delete(@RequestBody EventMainMemberDeleteDTO EventMainMemberDeleteDTO) {
        return eventMainMemberService.delete(EventMainMemberDeleteDTO);
    }
 
    /**
     * 查询重点人群记录详细信息
     * 
     * @param id
     *            重点人群记录 id
     * @return 查找结果
     */
    @PostMapping("/{id}")
    R<EventMainMemberDetailsVO> eventMainMemberDetails(@PathVariable("id") Long id) {
        return eventMainMemberService.eventMainMemberDetails(id);
    }
 
}