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
84
85
86
87
88
89
90
91
package com.panzhihua.service_community.api;
 
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.ComPropertyVO;
import com.panzhihua.service_community.entity.ComProperty;
import com.panzhihua.service_community.service.ComPropertyService;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
 
/**
 * (ComProperty)表控制层
 *
 * @author makejava
 * @since 2021-09-18 10:46:52
 */
@RestController
@RequestMapping("comProperty")
public class ComPropertyApi {
    /**
     * 服务对象
     */
    @Resource
    private ComPropertyService comPropertyService;
 
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.comPropertyService.pageList(commonPage);
    }
 
    /**
     * 新增数据
     *
     * @param comProperty 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody ComPropertyVO comProperty) {
        return this.comPropertyService.insert(comProperty);
    }
 
    /**
     * 修改数据
     *
     * @param comProperty 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody ComPropertyVO comProperty) {
        return this.comPropertyService.update(comProperty);
    }
 
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return this.comPropertyService.delete(id);
    }
 
    /**
     * 物业公司详情
     * @param id
     * @return
     */
    @GetMapping("/detail")
    public R detailProperty(@RequestParam("id") Long id) {
        return comPropertyService.detailProperty(id);
    }
 
    @GetMapping("/noticeList")
    public R noticeList(@RequestParam("page")Integer page,@RequestParam("size")Integer size,@RequestParam("propertyId")Long propertyId){
        return comPropertyService.noticeList(page,size,propertyId);
    }
}