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
114
115
116
117
118
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.community.rentingHouses.NearbyDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.RentingHourseRegisterService;
 
/**
 * 房屋租售-租赁房屋登记(RentingHourseRegister)表控制层
 *
 * @author makejava
 * @since 2021-11-23 10:49:08
 */
@RestController
@RequestMapping("/rentingHourseRegister")
public class RentingHourseRegisterApi {
    /**
     * 服务对象
     */
    @Resource
    private RentingHourseRegisterService rentingHourseRegisterService;
 
    /**
     * 分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @PostMapping("/page")
    public R pageRentingHouse(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO) {
        return rentingHourseRegisterService.pageRentingHouse(pageRegisterDTO);
    }
 
    /**
     * 新增房源信息
     * @param registerDTO
     * @return
     */
    @PostMapping("/register")
    public R registerRentingHouse(@RequestBody RentingHouseRegisterDTO registerDTO) {
        return rentingHourseRegisterService.registerRentingHouse(registerDTO);
    }
 
    /**
     * 编辑房源信息
     * @param registerDTO
     * @return
     */
    @PostMapping("/update")
    public R updateRentingHouse(@RequestBody RentingHouseRegisterDTO registerDTO) {
        return rentingHourseRegisterService.updateRentingHouse(registerDTO);
    }
 
    /**
     * 发布/取消发布 房源信
     * @param releaseOrCancelHouseDTO
     * @return
     */
    @PutMapping("/releaseOrCancel")
    public R releaseOrCancelHouse(@RequestBody ReleaseOrCancelHouseDTO releaseOrCancelHouseDTO) {
        return rentingHourseRegisterService.releaseOrCancelHouse(releaseOrCancelHouseDTO);
    }
 
    /**
     * 删除房源信息
     * @param registerId
     * @return
     */
    @DeleteMapping("/delete")
    public R deleteRentingHouse(@RequestParam("registerId") Long registerId) {
        return rentingHourseRegisterService.deleteRentingHouse(registerId);
    }
 
    /**
     * 获取详情-房源信息
     * @param registerId
     * @return
     */
    @GetMapping("/get")
    public R getRentingHouse(@RequestParam("registerId") Long registerId) {
        return rentingHourseRegisterService.getRentingHouse(registerId);
    }
    /**
     * 附近的房源
     */
    @PostMapping("/nearby")
    public R nearby(@RequestBody NearbyDTO nearbyDTO){
        return rentingHourseRegisterService.nearby(nearbyDTO);
    }
 
    /**
     * 小程序分页获取房源信息
     * @param pageRegisterDTO
     * @return
     */
    @PostMapping("/houseList")
    public R pageRentingHouseApplet(@RequestBody PageRentingHouseRegisterDTO pageRegisterDTO) {
        return rentingHourseRegisterService.pageRentingHouseApplet(pageRegisterDTO);
    }
 
    @GetMapping("/updateAllHouseUnionAppCode")
    public void updateAllHouseUnionAppCode(@RequestParam("areaCode") String areaCode) {
        rentingHourseRegisterService.updateAllHouseUnionAppCode(areaCode);
    }
}