更改接口

main
田俊彪 5 months ago
parent bbf55533df
commit f6f1443e6e

@ -40,7 +40,7 @@ public class DataController {
@AuthToken @AuthToken
@ApiOperation("1、区域查询") @ApiOperation("1、区域查询")
@PreAuthorize("hasAuthority('minio:upload')") @PreAuthorize("hasAuthority('minio:upload')")
@RequestMapping(value = "/dataimport/getRefionInfo", method = {RequestMethod.POST}) @RequestMapping(value = "/dataimport/getRefionInfo", method = {RequestMethod.GET})
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "成功"), @ApiResponse(code = 200, message = "成功"),
@ApiResponse(code = 401, message = "访问未经授权"), @ApiResponse(code = 401, message = "访问未经授权"),
@ -53,9 +53,9 @@ public class DataController {
try { try {
log.info("区域查询"); log.info("区域查询");
List<String> regionInfo = dataImportService.getRefionInfo(); List<String> regionInfo = dataImportService.getRefionInfo();
return RetResponse.makeOKRsp(regionInfo);
}catch (ParamsException e){ }catch (ParamsException e){
return RetResponse.makeErrRsp("查询错误!"+e.getMessage()); return RetResponse.makeErrRsp("查询错误!"+e.getMessage());
} }
return getRefionInfo();
} }
} }

@ -370,10 +370,10 @@ public class DataImportServiceImpl implements DataImportService {
regionInfo.add("广元"); regionInfo.add("广元");
regionInfo.add("达州"); regionInfo.add("达州");
regionInfo.add("广安"); regionInfo.add("广安");
return regionInfo;
}catch (ParamsException e){ }catch (ParamsException e){
return null; return null;
} }
return getRefionInfo();
} }

Loading…
Cancel
Save