All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.wslxm.springbootplus2.manage.sys.controller.SysDepController Maven / Gradle / Ivy

The newest version!
package io.github.wslxm.springbootplus2.manage.sys.controller;

import io.github.wslxm.springbootplus2.core.base.model.BasePage;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import io.github.wslxm.springbootplus2.manage.sys.model.vo.SysDepVO;
import io.github.wslxm.springbootplus2.manage.sys.model.dto.SysDepDTO;
import io.github.wslxm.springbootplus2.manage.sys.model.query.SysDepQuery;
import io.github.wslxm.springbootplus2.manage.sys.service.SysDepService;
import io.github.wslxm.springbootplus2.core.base.controller.BaseController;
import io.github.wslxm.springbootplus2.core.constant.BaseConstant;
import io.github.wslxm.springbootplus2.core.result.Result;
import java.util.List;

/**
 * base--sys--组织机构 前端控制器
 *
 * 

* ::本代码由[兮家小二]提供的代码生成器生成,如有问题,请手动修改 ::作者CSDN:https://blog.csdn.net/qq_41463655 *

* * @author ws * @email [email protected] * @date 2022-12-29 09:57:30 */ @RestController @RequestMapping(BaseConstant.Uri.API_ADMIN + "/sys/dep") @Api(value = "SysDepController", tags = "base--sys--组织机构") public class SysDepController extends BaseController { @GetMapping(value = "/tree") @ApiOperation(value = "树结构数据") public Result> tree(@ModelAttribute @Validated SysDepQuery query) { return Result.success(baseService.tree(query)); } @GetMapping(value = "/findPage") @ApiOperation(value = "列表查询") public Result> findPage(@ModelAttribute @Validated SysDepQuery query) { return Result.success(baseService.findPage(query)); } @GetMapping(value = "/{id}") @ApiOperation(value = "ID查询") public Result findId(@PathVariable String id) { return Result.success(baseService.findId(id)); } @PostMapping @ApiOperation(value = "添加") public Result insert(@RequestBody @Validated SysDepDTO dto) { return Result.successInsert(baseService.insert(dto)); } @PutMapping(value = "/{id}") @ApiOperation(value = "ID编辑") public Result upd(@PathVariable String id, @RequestBody @Validated SysDepDTO dto) { return Result.successUpdate(baseService.upd(id, dto)); } @DeleteMapping(value = "/{id}") @ApiOperation(value = "ID删除") public Result del(@PathVariable String id) { return Result.successDelete(baseService.del(id)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy