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

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

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

import io.github.wslxm.springbootplus2.core.base.model.BasePage;
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 io.github.wslxm.springbootplus2.manage.sys.model.dto.SysConfigDTO;
import io.github.wslxm.springbootplus2.manage.sys.model.query.SysConfigQuery;
import io.github.wslxm.springbootplus2.manage.sys.model.vo.SysConfigVO;
import io.github.wslxm.springbootplus2.manage.sys.service.SysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 系统全局数据信息配置表
 * 

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

* @author wangsong * @email [email protected] * @date 2020-08-31 18:31:44 */ @RestController @RequestMapping(BaseConstant.Uri.API_ADMIN + "/sys/config") @Api(value = "SysConfigController", tags = "base--sys--全局配置") public class SysConfigController extends BaseController { @GetMapping(value = "/tree") @ApiOperation(value = "树结构数据查询") public Result> tree() { return Result.success(baseService.tree()); } @GetMapping(value = "/findPage") @ApiOperation(value = "分页查询") public Result> findPage(@ModelAttribute @Validated SysConfigQuery query) { return Result.success(baseService.findPage(query)); } @GetMapping(value = "/{id}") @ApiOperation(value = "ID查询") public Result findId(@PathVariable String id) { return Result.successUpdate(baseService.findId(id)); } @PostMapping @ApiOperation(value = "添加") public Result insert(@RequestBody @Validated SysConfigDTO dto) { return Result.successInsert(baseService.insert(dto)); } @PutMapping(value = "/{id}") @ApiOperation(value = "ID编辑") public Result upd(@PathVariable String id, @RequestBody @Validated SysConfigDTO 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)); } @RequestMapping(value = "/findByCode", method = RequestMethod.GET) @ApiOperation(value = "CODE查询") public Result findByCode(@RequestParam String code) { return Result.successFind(baseService.findByCode(code)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy