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.FlowChange;
import com.lz.modules.flow.service.FlowChangeService;
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("/flowChange")
public class FlowChangeController {


    @Autowired
    private FlowChangeService flowChangeService;





     @RequestMapping("/getById")
     public R getById(@RequestBody FlowChange flowChange) {
        flowChange = flowChangeService.selectFlowChangeById(flowChange.getId());
        return R.ok().put("flowChange",flowChange);
     }


     @RequestMapping("/update")
     public R update(@RequestBody FlowChange flowChange) {
         flowChangeService.updateFlowChangeById(flowChange);
        return R.ok();
     }


     @RequestMapping("/save")
        public R save(@RequestBody FlowChange flowChange) {
         flowChangeService.insertFlowChange(flowChange);
        return R.ok();
     }


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