package org.dromara.app.controller;

import org.dromara.wflow.service.ModelGroupService;
import org.dromara.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author : willian fu
 * @date : 2020/9/17
 */
@RestController
@RequestMapping("/app/wflow/model")
public class ModelGroupControllerApp {

    @Autowired
    private ModelGroupService modelGroupService;

    /**
     * 查询流程模型数据
     *
     * @param formId 模板id
     * @return 流程模型详情数据
     */
    @GetMapping("detail/{formId}")
    public R<Object> getModelById(@PathVariable String formId) {
        return R.ok(modelGroupService.getModelByIdApp(formId));
    }

}
