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_community.api;
 
import com.panzhihua.common.model.dtos.common.*;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComMngVolunteerSkillService;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * 志愿者技能表(ComMngVolunteerSkill)表控制层
 *
 * @author lyq
 * @since 2021-10-30 16:47:36
 */
@RestController
@RequestMapping("comMngVolunteerSkill")
public class ComMngVolunteerSkillApi {
    /**
     * 服务对象
     */
    @Resource
    private ComMngVolunteerSkillService comMngVolunteerSkillService;
 
    /**
     * 分页查询
     *
     * @param comMngVolunteerSkill 筛选条件
     * @return 查询结果
     */
    @PostMapping("/page")
    public R queryByPage(@RequestBody PageComMngVolunteerSkillDto comMngVolunteerSkill) {
        return this.comMngVolunteerSkillService.queryByPage(comMngVolunteerSkill);
    }
 
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R queryById(@PathVariable("id") Long id) {
        return this.comMngVolunteerSkillService.queryById(id);
    }
 
    /**
     * 新增数据
     *
     * @param comMngVolunteerSkill 实体
     * @return 新增结果
     */
    @PostMapping("/add")
    public R add(@RequestBody AddComMngVolunteerSkillDto comMngVolunteerSkill) {
        return this.comMngVolunteerSkillService.insert(comMngVolunteerSkill);
    }
 
    /**
     * 编辑数据
     *
     * @param comMngVolunteerSkill 实体
     * @return 编辑结果
     */
    @PutMapping("/edit")
    public R edit(@RequestBody EditComMngVolunteerSkillDto comMngVolunteerSkill) {
        return this.comMngVolunteerSkillService.update(comMngVolunteerSkill);
    }
 
    /**
     * 删除数据
     *
     * @param id 主键
     * @return 删除是否成功
     */
    @GetMapping("/delete")
    public R deleteById(Long id) {
        return this.comMngVolunteerSkillService.deleteById(id);
    }
 
    /**
     * 社区后台-查询志愿者技能列表
     * @param comMngVolunteerSkill 请求参数
     * @return  志愿者技能列表
     */
    @PostMapping("/list")
    public R queryByList(@RequestBody PageComMngVolunteerSkillDto comMngVolunteerSkill) {
        return this.comMngVolunteerSkillService.queryByList(comMngVolunteerSkill);
    }
 
}