| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.service_community.service.CodDataService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | import com.panzhihua.service_community.service.ComStreetService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * @Author: llming |
| | |
| | | public class StreetApi { |
| | | @Resource |
| | | private ComStreetService comStreetService; |
| | | @Autowired |
| | | private CodDataService codDataService; |
| | | |
| | | /** |
| | | * 新增街道 |
| | |
| | | return comStreetService.detailStreet(id); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/updateStreet") |
| | | public R updateStreet(@RequestBody ComStreetVO comStreetVO){ |
| | | return comStreetService.update(comStreetVO); |
| | | } |
| | | |
| | | @GetMapping("/removeStreet") |
| | | public R remove(@RequestParam(value = "id",required = false)Long id){ |
| | | return comStreetService.remove(id); |
| | | } |
| | | |
| | | @GetMapping("/removeCommunity") |
| | | public R removeCommunity(@RequestParam(value = "id",required = false)Long id){ |
| | | return comStreetService.removeCommunity(id); |
| | | } |
| | | |
| | | @PostMapping("/repassCommunity") |
| | | public R repassCommunity(@RequestBody ComActVO comActVO){ |
| | | return comStreetService.repassCommunity(comActVO); |
| | | } |
| | | |
| | | @PostMapping("/repassStreet") |
| | | public R repassStreet(@RequestBody ComStreetVO comActVO){ |
| | | return comStreetService.repssStreet(comActVO); |
| | | } |
| | | |
| | | @PostMapping("importData") |
| | | public void importData(@RequestParam("file") MultipartFile file) throws IOException { |
| | | codDataService.importData(file); |
| | | } |
| | | |
| | | } |