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.

43 lines
1.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.ruoyi.tc.controller;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tc.service.UnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 组织架构
* @author du
* @since 2024/12/9 10:42
*/
@Api(tags = "组织架构")
@RestController
@RequestMapping("/tc/schema")
public class DeptSchemaController {
@Resource
private UnitService unitService;
/**
* 根据资产类型返回组织架构
*/
@ApiOperation(value = "根据资产类型返回组织架构")
@GetMapping
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "0:web资产1:小程序资产2公众号资产3电子邮件资产4移动应用程序资产", required = true),
})
public AjaxResult schema(@RequestParam("type") String type) {
return AjaxResult.success(unitService.getSchema(type));
}
}