| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.model.HouseResource; |
| | | import com.stylefeng.guns.modular.system.model.HousingDemand; |
| | | import com.stylefeng.guns.modular.system.service.IAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.ICollectionHousingDemandService; |
| | | import com.stylefeng.guns.modular.system.service.IHousingDemandService; |
| | | import com.stylefeng.guns.modular.system.service.IReportHousingDemandService; |
| | |
| | | private IReportHousingDemandService reportHousingDemandService; |
| | | @Autowired |
| | | private ICollectionHousingDemandService collectionHousingDemandService; |
| | | @Autowired |
| | | private IAppUserService appUserService; |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | return ResultUtil.success(houseResource.getQrCode()); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/addHousingDemand") |
| | | @PostMapping("/base/housingDemand/addHousingDemand") |
| | | @ApiOperation(value = "添加房源", tags = {"求房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | |
| | | public ResultUtil addHousingDemand(@RequestBody HousingDemandReq req){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return housingDemandService.addHousingDemand(req); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/housingDemandInfo") |
| | | @PostMapping("/base/housingDemand/housingDemandInfo") |
| | | @ApiOperation(value = "获取求房源详情", tags = {"求房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "数据id", required = true), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil<HousingDemandInfoRes> housingDemandInfo(Integer id){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | HousingDemandInfoRes housingDemandInfoRes = housingDemandService.housingDemandInfo(id); |
| | | return ResultUtil.success(housingDemandInfoRes); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/housingDemand/addReportHousingDemand") |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil addReportHousingDemand(ReportHousingDemandReq req){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return reportHousingDemandService.addReportHousingDemand(req); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil collectionHousingDemand(Integer id){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return collectionHousingDemandService.collectionHousingDemand(id); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | | }) |
| | | public ResultUtil<Integer> getSurplusPushNumber(){ |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | if(null != appUser && (appUser.getStatus() == 2|| appUser.getStatus() == 3)){ |
| | | return ResultUtil.errorLogin("当前账号已被冻结或删除"); |
| | | } |
| | | return housingDemandService.getSurplusPushNumber(); |
| | | } |
| | | |
| | | |
| | | } |