package com.example.controller.teacher; import com.example.dto.AwardsDTO; import com.example.dto.ThesisDTO; import com.example.result.Result; import com.example.service.ThesisService; import com.example.vo.AwardsVO; import com.example.vo.ThesisVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @Slf4j @Api(tags = "老师获奖相关接口") @RequestMapping("/teacher/thesis") public class ThesisController { @Autowired private ThesisService thesisService; @PostMapping @ApiOperation(value = "老师论文上传") public Result uploadThesis(@RequestBody ThesisDTO thesisDTO) { log.info("论文上传,{}", thesisDTO); thesisService.uploadThesis(thesisDTO); return Result.success(); } @PutMapping("/{id}") @ApiOperation(value = "修改指定奖项") public Result updateAwards(@RequestBody ThesisDTO thesisDTO, @PathVariable Long id) { log.info("修改指定奖项:{}", id); thesisService.updateThesis(thesisDTO, id); return Result.success(); } @GetMapping("/{id}") @ApiOperation(value = "获取指定奖项详细信息") public Result getById(@PathVariable Long id) { log.info("获取指定奖项详细信息:{}", id); ThesisVO thesisVO = thesisService.getById(id); return Result.success(thesisVO); } @DeleteMapping("/{id}") @ApiOperation(value = "删除指定奖项") public Result deleteById(@PathVariable Long id){ log.info("删除指定奖项:{}",id); thesisService.deleteById(id); return Result.success(); } }