TcAssetVerificationJava/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/DeptSchemaController.java

43 lines
1.3 KiB

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));
}
}