fix:区划查询

master
wangxy 10 months ago
parent dc8d20b3a2
commit 1b90329abf

@ -31,10 +31,17 @@ public class SysAreaManager {
public List<SysArea> getSysAreaList(Long parentId) { public List<SysArea> getSysAreaList(Long parentId) {
return sysAreaService.lambdaQuery() return sysAreaService.lambdaQuery()
.eq(SysArea::getParentId, Objects.isNull(parentId) ? 29 : parentId) .eq(SysArea::getParentId, Objects.isNull(parentId) ? 29 : parentId)
.orderByAsc(SysArea::getAreaCode)
.list(); .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