You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
1.1 KiB

package com.jiagutech.ams.controller;
import com.jiagutech.ams.model.common.R;
import com.jiagutech.ams.model.dto.RegionDTO;
import com.jiagutech.ams.service.RegionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @ClassName RegionController
* @author: zhangyeguang
* @create: 2024-09-02 14:32
* @Version 1.0
* @description:
**/
@RestController
@RequestMapping("/region")
@RequiredArgsConstructor
@Tag(name = "区域", description = "区域管理接口")
public class RegionController {
private final RegionService regionService;
@Operation(summary = "获取下一级的所有区域列表")
@GetMapping("getChildren")
public R<List<RegionDTO>> getChildren(Long regionCode) {
List<RegionDTO> regionDTOList = regionService.getChildren(regionCode);
return R.ok(regionDTOList);
}
}