查询站点和组树状列表接口按行政区过滤逻辑,行政区接口逻辑完善等
This commit is contained in:
@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -44,11 +45,21 @@ public class SysDistrictController extends BaseController
|
||||
// @PreAuthorize("@ss.hasPermi('system:district:list')")
|
||||
@GetMapping("/tree")
|
||||
@ApiOperation("查询行政区划树状列表")
|
||||
public AjaxResult tree(){
|
||||
return success(sysDistrictService.selectSysDistrictTree());
|
||||
public AjaxResult tree( Integer level){
|
||||
|
||||
return success(sysDistrictService.selectSysDistrictTree(level));
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询指定地区行政区划列表
|
||||
*/
|
||||
@GetMapping("/tree-by-code")
|
||||
@ApiOperation("查询指定地区行政区划列表")
|
||||
public AjaxResult listByLevel(Long areaCode){
|
||||
return success(sysDistrictService.selectSysDistrictTreeByCode(areaCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询行政区划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:district:list')")
|
||||
|
Reference in New Issue
Block a user