New file |
| | |
| | | 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); |
| | | } |
| | | } |