添加adcd接口和测试类

master
Coolkid 2024-01-26 17:23:42 +08:00
parent fa4d9a46ca
commit dc07720831
2 changed files with 11 additions and 2 deletions

View File

@ -125,7 +125,7 @@ public class BasicDataController {
@Get(path = "/adcd/search/query", summary = "查询单个行政区划接口")
public R<StAddvcdD> queryAddvcdById(
@RequestParam(name="adcd")
@Parameter(in = ParameterIn.QUERY, name="adcd",description = "行政区划编码 为空查询全部,不为空查询下级树,比如4205查4205开头的所有返回树型结构")
@Parameter(in = ParameterIn.QUERY, name="adcd",description = "完整行政区划编码")
String adcd
){
return R.ok(stAdcdService.queryByAddvcd(adcd));
@ -206,6 +206,15 @@ public class BasicDataController {
return R.ok(stStbprpService.queryBySearch(search));
}
@Get(path = "/stcd/search/query", summary = "单个测站查询接口")
public R<StStbprpB> queryStcdById(
@RequestParam(name="stcd")
@Parameter(in = ParameterIn.QUERY, name="stcd",description = "测站编码")
String stcd
) {
return R.ok(stStbprpService.queryByStcd(stcd));
}
@Post(path = "/stcd/search/querySelect", summary = "测站列表查询接口-下拉菜单查询使用,不带分页信息")
public R<List<StStbprpVo>> queryStcdSelect(@Validated @RequestBody StcdSearch search) {
return R.ok(stStbprpService.queryListBySearch(search));

View File

@ -35,6 +35,6 @@ class StAdcdServiceTest {
@Test
void queryTree() {
log.info("{}", JacksonUtils.writeValue(stAdcdService.queryTree("421181")));
log.info("{}", JacksonUtils.writeValue(stAdcdService.queryTree("420116001")));
}
}