mitao
2025-02-24 879ce4e66b36daf44f79b17eb02d3578148e4545
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
package com.panzhihua.applets.api;
 
 
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * 社工服务表(ComActSocialWorkerService)表控制层
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 社工服务表相关功能
 *
 * @author zzj
 * @since 2022-02-16 15:59:42
 */
@RestController
@RequestMapping("comActSocialWorkerService")
@Api(tags = {"社工服务"})
public class ComActSocialWorkerServiceApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
 
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = ComActSocialWorkerServiceVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setUserId(this.getUserId());
        return this.communityService.selectAllComActSocialWorkerService(commonPage);
    }
 
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "分页查询",response = ComActSocialWorkerServiceVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return this.communityService.selectOneComActSocialWorkerService(id);
    }
 
 
    /**
     * 修改数据
     *
     * @param comActSocialWorkerServiceVO 实体对象
     * @return 修改结果
     */
    @ApiOperation("修改数据")
    @PostMapping("/update")
    public R update(@RequestBody ComActSocialWorkerServiceVO comActSocialWorkerServiceVO) {
       return communityService.updateComActSocialWorkerService(comActSocialWorkerServiceVO);
    }
}