package com.example.controller.teacher; import com.example.dto.AwardsDTO; import com.example.result.Result; import com.example.service.AwardsService; 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.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @Slf4j @Api(tags = "老师获奖相关接口") @RequestMapping("/teacher/awards") public class AwardsController { @Autowired private AwardsService awardsService; @PostMapping @ApiOperation(value = "老师获奖上传") public Result uploadAwards(@RequestBody AwardsDTO awardsDTO,Integer awardsNum){ log.info("获奖上传,{}",awardsDTO); awardsService.uploadAwards(awardsDTO,awardsNum); return Result.success(); } }