New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComStreetVO; |
| | | import com.panzhihua.service_community.service.ComActMessageService; |
| | | import com.panzhihua.service_community.service.ComStreetService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author: llming |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/") |
| | | public class StreetApi { |
| | | @Resource |
| | | private ComStreetService comStreetService; |
| | | |
| | | /** |
| | | * 新增街道 |
| | | * @param comStreetVO 新增信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("addstreet") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addStreet(@RequestBody ComStreetVO comStreetVO) { |
| | | R r = comStreetService.addStreet(comStreetVO); |
| | | return R.ok(r); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询街道 |
| | | * @param pageComStreetDTO 查询条件 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("pagestreet") |
| | | public R putStreet(@RequestBody PageComStreetDTO pageComStreetDTO) { |
| | | R r = comStreetService.pageStreet(pageComStreetDTO); |
| | | return R.ok(r); |
| | | } |
| | | |
| | | /** |
| | | * 查询街道 |
| | | * @param comStreetVO 查询条件 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("liststreet") |
| | | public R putStreet(@RequestBody ComStreetVO comStreetVO) { |
| | | R r = comStreetService.listStreet(comStreetVO); |
| | | return R.ok(r); |
| | | } |
| | | |
| | | /** |
| | | * 街道 |
| | | * @param Ids 动态id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("deletestreet") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R delectStreat(@RequestBody List<Long> Ids) { |
| | | R r = comStreetService.delectStreat(Ids); |
| | | return R.ok(r); |
| | | } |
| | | |
| | | } |