package com.panzhihua.applets.api; import javax.annotation.Resource; import javax.validation.Valid; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; /** * 物业公司工作人员(ComPropertyWorker)表控制层 * * @author makejava * @since 2022-04-26 09:54:07 */ @Slf4j @Api(tags = "物业工作人员") @RestController @RequestMapping("comPropertyWorker") public class ComPropertyWorkerApi extends BaseController { /** * 服务对象 */ @Resource private CommunityService communityService; @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class) @PostMapping("/page") public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) { return communityService.pagePropertyWorker(pagePropertyWorkerDTO); } @ApiOperation(value = "物业工作人员详情", response = ComPropertyWorkerVO.class) @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true) @GetMapping("/detail") public R detailPropertyWorker(@RequestParam("id") Long id) { return communityService.detailPropertyWorker(id); } }