mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
71
72
73
74
75
76
77
78
79
80
81
82
83
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);
    }
}