package com.panzhihua.service_community.api;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
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.model.dtos.property.PagePropertyWorkerDTO;
|
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.service_community.service.ComPropertyWorkerService;
|
|
/**
|
* 物业公司工作人员(ComPropertyWorker)表控制层
|
*
|
* @author makejava
|
* @since 2022-04-26 09:54:07
|
*/
|
@RestController
|
@RequestMapping("comPropertyWorker")
|
public class ComPropertyWorkerApi {
|
/**
|
* 服务对象
|
*/
|
@Resource
|
private ComPropertyWorkerService comPropertyWorkerService;
|
|
/**
|
* 添加物业工作人员
|
* @param propertyWorkerDTO
|
* @return
|
*/
|
@PostMapping("/add")
|
public R addPropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO) {
|
return comPropertyWorkerService.addPropertyWorker(propertyWorkerDTO);
|
}
|
|
/**
|
* 编辑物业工作人员
|
* @param propertyWorkerDTO
|
* @return
|
*/
|
@PutMapping("/update")
|
public R updatePropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO) {
|
return comPropertyWorkerService.updatePropertyWorker(propertyWorkerDTO);
|
}
|
|
/**
|
* 删除物业工作人员
|
* @param id
|
* @return
|
*/
|
@DeleteMapping("/delete")
|
public R deletePropertyWorker(@RequestParam("id") Long id) {
|
return comPropertyWorkerService.deletePropertyWorker(id);
|
}
|
|
/**
|
* 分页查询物业工作人员
|
* @param pagePropertyWorkerDTO
|
* @return
|
*/
|
@PostMapping("/page")
|
public R pagePropertyWorker(@RequestBody PagePropertyWorkerDTO pagePropertyWorkerDTO) {
|
return comPropertyWorkerService.pagePropertyWorker(pagePropertyWorkerDTO);
|
}
|
|
/**
|
* 物业工作人员详情
|
* @param id
|
* @return
|
*/
|
@GetMapping("/detail")
|
public R detailPropertyWorker(@RequestParam("id") Long id) {
|
return comPropertyWorkerService.detailPropertyWorker(id);
|
}
|
}
|