cn.herodotus.stirrup.logic.bpmn.mongodb.controller.DynamicFormController Maven / Gradle / Ivy
The newest version!
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2020-2030 郑庚伟 ZHENGGENGWEI (码匠君), Licensed under the AGPL License
*
* This file is part of Herodotus Stirrup.
*
* Herodotus Stirrup is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Herodotus Stirrup is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package cn.herodotus.stirrup.logic.bpmn.mongodb.controller;
import cn.herodotus.stirrup.core.definition.domain.Result;
import cn.herodotus.stirrup.data.crud.service.MongoService;
import cn.herodotus.stirrup.logic.bpmn.mongodb.entity.DynamicForm;
import cn.herodotus.stirrup.logic.bpmn.mongodb.service.DynamicFormService;
import cn.herodotus.stirrup.web.api.servlet.AbstractMongoController;
import cn.herodotus.stirrup.web.core.annotation.AccessLimited;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Description: 动态表单接口
*
* @author : gengwei.zheng
* @date : 2023/2/13 16:37
*/
@RestController
@RequestMapping("/camunda-extended/dynamic-form")
public class DynamicFormController extends AbstractMongoController {
private final DynamicFormService dynamicFormService;
public DynamicFormController(DynamicFormService dynamicFormService) {
this.dynamicFormService = dynamicFormService;
}
@Override
public MongoService getMongoService() {
return dynamicFormService;
}
@AccessLimited
@Operation(summary = "查询所有表单列表", description = "查询所有的动态表单信息列表",
responses = {@ApiResponse(description = "表单列表", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Result.class)))})
@GetMapping("/list")
public Result> findAll() {
List dynamicForms = dynamicFormService.findAll();
return result(dynamicForms);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy