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.ResultScore;
import com.lz.modules.flow.service.ResultScoreService;
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("/resultScore")
public class ResultScoreController {


    @Autowired
    private ResultScoreService resultScoreService;





     @RequestMapping("/getById")
     public R getById(@RequestBody ResultScore resultScore) {
        resultScore = resultScoreService.selectResultScoreById(resultScore.getId());
        return R.ok().put("resultScore",resultScore);
     }


     @RequestMapping("/update")
     public R update(@RequestBody ResultScore resultScore) {
         resultScoreService.updateResultScoreById(resultScore);
        return R.ok();
     }


     @RequestMapping("/save")
        public R save(@RequestBody ResultScore resultScore) {
         resultScoreService.insertResultScore(resultScore);
        return R.ok();
     }


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