fix:区划查询

master
wangxy 10 months ago
parent dc8d20b3a2
commit 1b90329abf

@ -31,10 +31,17 @@ public class SysAreaManager {
public List<SysArea> getSysAreaList(Long parentId) {
return sysAreaService.lambdaQuery()
.eq(SysArea::getParentId, Objects.isNull(parentId) ? 29 : parentId)
.orderByAsc(SysArea::getAreaCode)
.list();
}
public String getAreaName(Long id) {
return sysAreaService.lambdaQuery()
.eq(SysArea::getId,id).one().getName();
}

@ -38,4 +38,15 @@ public class SysAreaController {
}
@ApiOperation("获取区划名称")
@GetMapping("/getAreaName")
@ResponseBody
public AjaxResult getAreaName(@RequestParam Long id) {
return success(sysAreaManager.getAreaName(id));
}
}

Loading…
Cancel
Save