From 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期一, 09 六月 2025 11:54:00 +0800 Subject: [PATCH] 6.9新增登录失败冻结逻辑 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/StreetApi.java | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 51 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/StreetApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/StreetApi.java index 4d4812a..bba69a0 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/StreetApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/StreetApi.java @@ -1,13 +1,19 @@ 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 org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.panzhihua.common.model.dtos.community.PageComStreetDTO; @@ -16,6 +22,7 @@ import com.panzhihua.service_community.service.ComStreetService; import lombok.extern.slf4j.Slf4j; +import org.springframework.web.multipart.MultipartFile; /** * @Author: llming @@ -27,6 +34,8 @@ public class StreetApi { @Resource private ComStreetService comStreetService; + @Autowired + private CodDataService codDataService; /** * 新增街道 @@ -37,7 +46,7 @@ */ @PostMapping("addstreet") @Transactional(rollbackFor = Exception.class) - public R addStreet(@RequestBody ComStreetVO comStreetVO) { + public R<ComStreetVO> addStreet(@RequestBody ComStreetVO comStreetVO) { return comStreetService.addStreet(comStreetVO); } @@ -81,4 +90,45 @@ return r; } + /** + * 街道详情 + * @param id + * @return + */ + @GetMapping("detailStreet") + public R detailStreet(@RequestParam("id") Long id) { + 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); + } + } -- Gitblit v1.7.1