| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.EditNeighborCircleAdminVO; |
| | | import com.panzhihua.service_community.service.ComActNeighborCircleService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | return comActNeighborCircleService.pageNeighborByApp(neighborCircleAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 管理后台查询邻里圈列表 |
| | | * @param comActNeighborCircleAdminDTO 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @PostMapping("pageNeighborByAdmin") |
| | | public R pageNeighborByAdmin(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO) { |
| | | return comActNeighborCircleService.pageNeighborByAdmin(comActNeighborCircleAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 后台添加邻里圈 |
| | | * @param addNeighborCircleAdminVO 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @PostMapping("addNeighborByAdmin") |
| | | public R pageNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO) { |
| | | return comActNeighborCircleService.addNeighborByAdmin(addNeighborCircleAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 后台修改邻里圈 |
| | | * @param editNeighborCircleAdminVO 请求参数 |
| | | */ |
| | | @PostMapping("changeStatusByAdmin") |
| | | public R changeStatusByAdmin(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO) { |
| | | return comActNeighborCircleService.changeStatusByAdmin(editNeighborCircleAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 后台修改邻里圈 |
| | | * @param id 邻里圈id |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("deleteByAdmin") |
| | | public R deleteByAdmin(@RequestParam("id")Long id) { |
| | | return comActNeighborCircleService.deleteByAdmin(id); |
| | | } |
| | | |
| | | } |