package com.ruoyi.business.controller;
|
|
import com.ruoyi.business.dto.TreeDto;
|
import com.ruoyi.business.service.TreeService;
|
import com.ruoyi.business.vo.TreeVo;
|
import com.ruoyi.common.core.domain.R;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 档案信息表,记录系统中各类档案的基本信息 前端控制器
|
* </p>
|
*
|
* @author ruoyi
|
* @since 2025-06-10
|
*/
|
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/tree")
|
public class TreeController {
|
|
private TreeService treeService;
|
|
|
/**
|
* 查询tree列表
|
*/
|
@GetMapping("/list")
|
public R<List<TreeVo>> treeList(TreeDto treeDto) {
|
return R.ok(treeService.selectTreeList(treeDto));
|
}
|
|
|
/**
|
* tree列表新增修改
|
*/
|
@PostMapping("/addOrEditTree")
|
public R addOrEditTree(@RequestBody TreeDto treeDto) {
|
return R.ok(treeService.addOrEditProduction(treeDto));
|
}
|
|
/**
|
* tree列表删除
|
*/
|
@DeleteMapping("/delTree")
|
public R remove(@RequestBody Long[] ids) {
|
return R.ok(treeService.delByIds(ids));
|
}
|
}
|