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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package com.panzhihua.service_community.api;
 
import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO;
import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComPropertyPublicityService;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import lombok.extern.slf4j.Slf4j;
 
import javax.annotation.Resource;
 
/**
 * @title: ComPropertyPublicityApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 物业宣传相关接口
 * @author: hans
 * @date: 2021/11/11 10:08
 */
@Slf4j
@RestController
@RequestMapping("/property/publicity")
public class ComPropertyPublicityApi {
 
    @Resource
    private ComPropertyPublicityService comPropertyPublicityService;
 
    /**
     * 分页查询物业宣传
     * @param pageComPropertyPublicityDTO
     * @return
     */
    @PostMapping("/page")
    public R pageComPropertyPublicity(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO) {
        return comPropertyPublicityService.pageComPropertyPublicity(pageComPropertyPublicityDTO);
    }
 
    /**
     * 新增物业宣传
     * @param comPropertyPublicityDTO
     * @return
     */
    @PostMapping("/add")
    public R addComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO){
        return comPropertyPublicityService.addComPropertyPublicity(comPropertyPublicityDTO);
    }
 
    /**
     * 修改物业宣传
     * @param comPropertyPublicityDTO
     * @return
     */
    @PostMapping("/update")
    public R updateComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO) {
        return comPropertyPublicityService.updateComPropertyPublicity(comPropertyPublicityDTO);
    }
 
    /**
     * 查看物业宣传信息
     * @param id
     * @return
     */
    @GetMapping("/get")
    public R getComPropertyPublicity(@RequestParam("id") Long id) {
        return comPropertyPublicityService.getComPropertyPublicity(id);
    }
 
    /**
     * 删除物业宣传
     * @param id
     * @return
     */
    @DeleteMapping("/delete")
    public R deleteComPropertyPublicity(@RequestParam("id") Long id) {
        return comPropertyPublicityService.deleteComPropertyPublicity(id);
    }
 
    /**
     * 物业公司列表
     * @param communityId
     * @return
     */
    @GetMapping("/list/property")
    public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId,
                          @RequestParam("communityId") Long communityId) {
        return comPropertyPublicityService.listProperty(villageId, communityId);
    }
    /**
     * 分页查询物业宣传-小程序
     * @param pageComPropertyPublicityDTO
     * @return
     */
    @PostMapping("/page/applet")
    public R pageComPropertyPublicityApplet(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO) {
        return comPropertyPublicityService.pageComPropertyPublicityApplet(pageComPropertyPublicityDTO);
    }
 
    /**
     * 增加物业宣传浏览量
     * @param id
     * @return
     */
    @GetMapping("/incr-view")
    public R incrPropertyPublicityView(@RequestParam("id") Long id) {
        return comPropertyPublicityService.incrView(id);
    }
}