| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | import com.alipay.api.internal.util.codec.Base64; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.file.OSSService; |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.model.HouseResource; |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", |
| | | required = true, paramType = "header") |
| | | public ResultUtil confirm(Integer userType){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return houseResourceService.confirm(userType); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/addHouse/userInfo") |
| | | @ApiOperation(value = "发布房源获取当前人的中介认证状态", tags = {"发布"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil userInfo(){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | Integer auth = appUserService.getAppUser().getAuth(); |
| | | return ResultUtil.success(appUser); |
| | | } |
| | | |
| | | @ResponseBody |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil addHouse(@RequestBody AddHouseReq req){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return houseResourceService.addHouse(req); |
| | | } |
| | | |
| | |
| | | return ResultUtil.success(districtHouseResourceNumber); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/houseResource/getHouseResourceInfo") |
| | | @ApiOperation(value = "获取房源详情", tags = {"详情"}) |
| | |
| | | return ResultUtil.success(houseResourceInfo); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/houseResource/collectionHouseResource") |
| | | @ApiOperation(value = "收藏/取消收藏房源操作", tags = {"详情"}) |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil collectionHouseResource(Integer id){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return collectionHouseResourceService.collectionHouseResource(id); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/base/houseResource/getNearbyHouseResource") |
| | |
| | | List<SearchHouseResourceListRes> nearbyHouseResource = houseResourceService.getNearbyHouseResource(id); |
| | | return ResultUtil.success(nearbyHouseResource); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/base/houseResource/getContactInformation/{id}") |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil addReportHouseResource(@RequestBody ReportHouseResourceReq req){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return reportHouseResourceService.addReportHouseResource(req); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/intermediary/list") |
| | | @ApiOperation(value = "找中介", tags = {"服务"}) |
| | |
| | | SearchIntermediaryRes res= appUserService.searchIntermediaryList(req); |
| | | return ResultUtil.success(res); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/intermediary/intermediaryInfo") |
| | | @ApiOperation(value = "找中介-中介信息", tags = {"服务"}) |
| | |
| | | } |
| | | return ResultUtil.success(res); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/base/intermediary/getContactInfo/{id}") |
| | | @ApiOperation(value = "获取中介联系方式", tags = {"详情"}) |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/getSurplusPushNumber1") |
| | | @PostMapping("/base/housingDemand/getSurplusPushNumber1") |
| | | @ApiOperation(value = "获取剩余发布数量", tags = {"房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil<Integer> getSurplusPushNumber1(){ |
| | | public ResultUtil getSurplusPushNumber1(){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return houseResourceService.getSurplusPushNumber1(); |
| | | } |
| | | } |