AwardsController.java 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package com.example.controller.teacher;
  2. import com.example.dto.AwardsDTO;
  3. import com.example.result.Result;
  4. import com.example.service.AwardsService;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import lombok.extern.slf4j.Slf4j;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.PostMapping;
  10. import org.springframework.web.bind.annotation.RequestBody;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. @RestController
  14. @Slf4j
  15. @Api(tags = "老师获奖相关接口")
  16. @RequestMapping("/teacher/awards")
  17. public class AwardsController {
  18. @Autowired
  19. private AwardsService awardsService;
  20. @PostMapping
  21. @ApiOperation(value = "老师获奖上传")
  22. public Result uploadAwards(@RequestBody AwardsDTO awardsDTO,Integer awardsNum){
  23. log.info("获奖上传,{}",awardsDTO);
  24. awardsService.uploadAwards(awardsDTO,awardsNum);
  25. return Result.success();
  26. }
  27. }