add:区域查询
							parent
							
								
									0129ee2720
								
							
						
					
					
						commit
						a70541b615
					
				| @ -0,0 +1,61 @@ | |||||||
|  | package com.cuit.solarenergy.controller; | ||||||
|  | 
 | ||||||
|  | import com.cuit.solarenergy.base.annotation.AopLog; | ||||||
|  | import com.cuit.solarenergy.base.annotation.AuthToken; | ||||||
|  | import com.cuit.solarenergy.entity.vo.ret.RetResponse; | ||||||
|  | import com.cuit.solarenergy.entity.vo.ret.RetResult; | ||||||
|  | import com.cuit.solarenergy.exception.ParamsException; | ||||||
|  | import com.cuit.solarenergy.service.DataImportService; | ||||||
|  | import com.cuit.solarenergy.utils.ErrorMessage; | ||||||
|  | import com.github.xiaoymin.knife4j.annotations.ApiSupport; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import io.swagger.annotations.ApiResponse; | ||||||
|  | import io.swagger.annotations.ApiResponses; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMethod; | ||||||
|  | import org.springframework.web.bind.annotation.RequestPart; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | import org.springframework.web.multipart.MultipartFile; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | @Api(tags = "7、首页") | ||||||
|  | @ApiSupport(order = 7) | ||||||
|  | @Slf4j | ||||||
|  | @RestController() | ||||||
|  | public class DataController { | ||||||
|  |     @Autowired | ||||||
|  |     private DataImportService dataImportService; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @author: qh | ||||||
|  |      * @date: 2024/11/26 18:34 | ||||||
|  |      * @version: 1.0 | ||||||
|  |      */ | ||||||
|  |     @AopLog | ||||||
|  |     @AuthToken | ||||||
|  |     @ApiOperation("1、区域查询") | ||||||
|  |     @PreAuthorize("hasAuthority('minio:upload')") | ||||||
|  |     @RequestMapping(value = "/dataimport/getRefionInfo", method = {RequestMethod.POST}) | ||||||
|  |     @ApiResponses({ | ||||||
|  |             @ApiResponse(code = 200, message = "成功"), | ||||||
|  |             @ApiResponse(code = 401, message = "访问未经授权"), | ||||||
|  |             @ApiResponse(code = 403, message = "访问被禁止的"), | ||||||
|  |             @ApiResponse(code = 404, message = "未找到访问接口"), | ||||||
|  |             @ApiResponse(code = 500, message = "服务器内部错误"), | ||||||
|  |             @ApiResponse(code = 900, message = "失败") | ||||||
|  |     }) | ||||||
|  |     public RetResult<List<String>> getRefionInfo() { | ||||||
|  |         try { | ||||||
|  |             log.info("区域查询"); | ||||||
|  |             List<String> regionInfo = dataImportService.getRefionInfo(); | ||||||
|  |         }catch (ParamsException e){ | ||||||
|  |             return RetResponse.makeErrRsp("查询错误!"+e.getMessage()); | ||||||
|  |         } | ||||||
|  |         return getRefionInfo(); | ||||||
|  |     } | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in New Issue