|
|
@@ -8,14 +8,12 @@ import com.zhongshu.card.client.model.org.RegionModel;
|
|
|
import com.zhongshu.card.client.ret.ResultContent;
|
|
|
import com.zhongshu.card.server.core.service.org.RegionService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -42,4 +40,14 @@ public class RegionController {
|
|
|
return this.regionService.getAllTree();
|
|
|
}
|
|
|
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "地区树形结构-通用(异步)", description = "得到机构部门树")
|
|
|
+ @RequestMapping(value = "getList", method = {RequestMethod.GET})
|
|
|
+ public ResultContent getList(
|
|
|
+ @Parameter(name = "parentId", description = "上级id")
|
|
|
+ @RequestParam(name = "parentId")
|
|
|
+ String parentId) {
|
|
|
+ return this.regionService.getListByParentCode(parentId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|