package com.wx.application.core.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
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;

import com.wx.application.base.BaseController;
import com.wx.application.base.ResponseData;
import com.wx.application.core.entity.GraphCase;
import com.wx.application.core.service.GraphCaseService;
/**
 *   @description : GraphCase 默认控制器,仅供生成器使用
 *   ---------------------------------
 *   @since 2022-09-23
 */
/*@Slf4j*/
@RestController("coreGraphCaseController")
@RequestMapping("/graph-case")
public class GraphCaseController extends BaseController {

    @Autowired
    private GraphCaseService graphCaseService;

    @PostMapping(value = "/create")
    public ResponseData create(@RequestBody GraphCase graphCase) {
        return success(graphCaseService.createGraphCase(graphCase));
    }
    
    
    @PostMapping(value = "/query_pages")
    public ResponseData queryPages(@RequestBody Map ontologyQ) {
        return success(graphCaseService.queryPage(ontologyQ));
    }
    
    
    @PostMapping(value = "/remove/{id}")
    public ResponseData remove(@PathVariable("id") Long id) {
    	graphCaseService.removeGraphCase(id);
        return success();
    }
    
    
    
    @PostMapping(value = "/modify")
    public ResponseData modify(@RequestBody GraphCase graphCase) {
        return success(graphCaseService.modify(graphCase));
    }
}
