package com.lz.modules.performance.controller;


import com.alibaba.fastjson.JSONObject;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.FlowChartRole;
import com.lz.modules.flow.service.FlowChartRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/flowChartRole")
public class FlowChartRoleController {


    @Autowired
    private FlowChartRoleService flowChartRoleService;





     @RequestMapping("/getById")
     public R getById(@RequestBody FlowChartRole flowChartRole) {
        flowChartRole = flowChartRoleService.selectFlowChartRoleById(flowChartRole.getId());
        return R.ok().put("data",flowChartRole);
     }


     @RequestMapping("/update")
     public R update(@RequestBody FlowChartRole flowChartRole) {
         flowChartRoleService.updateFlowChartRoleById(flowChartRole);
        return R.ok();
     }


     @RequestMapping("/save")
        public R save(@RequestBody FlowChartRole flowChartRole) {
         flowChartRoleService.insertFlowChartRole(flowChartRole);
        return R.ok();
     }


    @RequestMapping("/delete")
    public R list(@RequestBody Long id) {
        flowChartRoleService.deleteFlowChartRoleById(id);
        return R.ok();
     }
}
