New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidMemberDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 防疫工作人员表(ComActAcidMember)表控制层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 防疫工作人员表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-04-24 16:12:08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActAcidMember") |
| | | public class ComActAcidMemberApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody ComActAcidMemberDTO commonPage) { |
| | | return this.comActAcidMemberService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return R.ok(this.comActAcidMemberService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActAcidMemberVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAcidMemberVO comActAcidMemberVO) { |
| | | return this.comActAcidMemberService.insert(comActAcidMemberVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActAcidMemberVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAcidMemberVO comActAcidMemberVO) { |
| | | ComActAcidMember comActAcidMember=new ComActAcidMember(); |
| | | BeanUtils.copyProperties(comActAcidMemberVO,comActAcidMember); |
| | | return R.ok(this.comActAcidMemberService.updateById(comActAcidMember)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActAcidMemberService.removeById(id)); |
| | | } |
| | | } |