
package com.fufan.mtsaas.modules.emoon.controller;
import com.fufan.mtsaas.modules.emoon.entity.ThinkInfo;
import com.fufan.mtsaas.modules.emoon.service.ThinkInfoService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/thinkInfo")
public class ThinkInfoController {

    @Resource
    private ThinkInfoService thinkInfoService;

    @GetMapping("/{id}")
    public ThinkInfo getById(@PathVariable Integer id) {
        return thinkInfoService.getById(id);
    }
//
//
//
//    @PostMapping("/add")
//    public String add(@RequestBody ThinkInfo thinkInfo) {
//        thinkInfoService.save(thinkInfo);
//        return "插入成功";
//    }

    @PutMapping("/update")
    public String update(@RequestBody ThinkInfo thinkInfo) {
        thinkInfoService.updateById(thinkInfo);
        return "更新成功";
    }



}
