| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.stylefeng.guns.modular.system.dto.FeedBackVo; |
| | | import com.stylefeng.guns.modular.system.dto.THouseResource; |
| | | import com.stylefeng.guns.modular.system.model.HouseResource; |
| | | import com.stylefeng.guns.modular.system.model.ReportHouseResource; |
| | | import com.stylefeng.guns.modular.system.service.IFeedBackService; |
| | | import com.stylefeng.guns.modular.system.service.IHouseResourceService; |
| | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Controller |
| | |
| | | @ResponseBody |
| | | @PutMapping("/change") |
| | | @ApiOperation(value = "status 1=通过,2=拒绝,3删除)", tags = {"后台-房源举报管理"}) |
| | | public ResultUtil change(Integer id, Integer status,String reason){ |
| | | ReportHouseResource reportHouseResource = reportHouseResourceService.selectById(id); |
| | | public ResultUtil change(String ids, Integer status,String reason){ |
| | | String[] split = ids.split(","); |
| | | for (String id : split) { |
| | | |
| | | ReportHouseResource reportHouseResource = reportHouseResourceService.selectById(Integer.valueOf(id)); |
| | | if (status==1){ |
| | | reportHouseResource.setAudit(1); |
| | | }else if (status ==2){ |
| | | reportHouseResource.setAudit(2); |
| | | reportHouseResource.setBackDate(new Date()); |
| | | reportHouseResource.setBackReason(reason); |
| | | HouseResource houseResource = houseResourceService.selectById(reportHouseResource.getHouseResourceId()); |
| | | houseResource.setStatus(0); |
| | | houseResourceService.updateById(houseResource); |
| | | }else if (status == 3){ |
| | | reportHouseResourceService.deleteById(id); |
| | | reportHouseResourceService.deleteById(Integer.valueOf(id)); |
| | | return ResultUtil.success(); |
| | | } |
| | | reportHouseResourceService.updateById(reportHouseResource); |
| | | } |
| | | |
| | | return ResultUtil.success(); |
| | | |
| | | } |
| | |
| | | @ResponseBody |
| | | @DeleteMapping("/feedback/delete") |
| | | @ApiOperation(value = "删除", tags = {"后台-意见反馈"}) |
| | | public ResultUtil delete(Integer id){ |
| | | feedBackService.deleteById(id); |
| | | public ResultUtil delete(Integer[] ids){ |
| | | for (Integer id : ids) { |
| | | feedBackService.deleteById(Integer.valueOf(id)); |
| | | } |
| | | return ResultUtil.success("删除成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |