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.FlowApprovalRole;
import com.lz.modules.flow.service.FlowApprovalRoleService;
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("/flowApprovalRole")
public class FlowApprovalRoleController {


    @Autowired
    private FlowApprovalRoleService flowApprovalRoleService;





     @RequestMapping("/getById")
     public R getById(@RequestBody FlowApprovalRole flowApprovalRole) {
        flowApprovalRole = flowApprovalRoleService.selectFlowApprovalRoleById(flowApprovalRole.getId());
        return R.ok().put("flowApprovalRole",flowApprovalRole);
     }


     @RequestMapping("/update")
     public R update(@RequestBody FlowApprovalRole flowApprovalRole) {
         flowApprovalRoleService.updateFlowApprovalRoleById(flowApprovalRole);
        return R.ok();
     }


     @RequestMapping("/save")
        public R save(@RequestBody FlowApprovalRole flowApprovalRole) {
         flowApprovalRoleService.insertFlowApprovalRole(flowApprovalRole);
        return R.ok();
     }


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