@ -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) {
.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));