53 lines
1.8 KiB
Java
53 lines
1.8 KiB
Java
package com.cczsa.xinghe.codegen.controller;
|
|
|
|
|
|
import com.cczsa.xinghe.codegen.entity.req.funModule.FunModuleQueryReq;
|
|
import com.cczsa.xinghe.codegen.entity.req.funModule.FunModuleSaveUpdateReq;
|
|
import com.cczsa.xinghe.codegen.entity.res.funModule.FunModuleQueryRes;
|
|
import com.cczsa.xinghe.codegen.service.FunModuleService;
|
|
import com.cczsa.xinghe.codegen.util.XResult;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import jakarta.validation.Valid;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
/**
|
|
* 模块管理 控制层。
|
|
*
|
|
* @author xia
|
|
* @version 0.0.1
|
|
*/
|
|
@Tag(name = "模块管理")
|
|
@RequiredArgsConstructor
|
|
@RestController
|
|
@RequestMapping("/funModule")
|
|
public class FunModuleController {
|
|
|
|
private final FunModuleService funmoduleService;
|
|
|
|
@Operation(summary = "获取模块列表", description = "获取模块列表")
|
|
@PostMapping("/query")
|
|
public XResult<FunModuleQueryRes> query(@RequestBody @Valid FunModuleQueryReq req ) {
|
|
return funmoduleService.query(req);
|
|
}
|
|
|
|
@Operation(summary = "创建/修改模块", description = "创建/修改模块")
|
|
@PostMapping("/save/update")
|
|
public XResult<Void> saveUpdate(@RequestBody @Valid FunModuleSaveUpdateReq req ) {
|
|
return funmoduleService.saveUpdate(req);
|
|
}
|
|
|
|
@Operation(summary = "删除模块", description = "删除模块")
|
|
@DeleteMapping("/delete")
|
|
public XResult<Void> delete() {
|
|
return funmoduleService.delete();
|
|
}
|
|
|
|
|
|
|
|
} |