package com.gkhy.exam.admin.controller.app; import com.gkhy.exam.common.api.CommonResult; import com.gkhy.exam.system.service.ExResourceService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; /** *

* 课程资源表 前端控制器 *

* * @author kzy * @since 2024-06-06 10:25:36 */ @Api(tags = "APP课程资源前端控制器") @RestController @RequestMapping("/app/resource") public class AppResourceController { @Autowired private ExResourceService resourceService; @PreAuthorize("hasAnyAuthority('train:exam:student')") @ApiOperation(value = "根据课时id获取资源信息") @GetMapping(value = { "/getResourceByPeriod" }) public CommonResult getResourceByPeriod(@RequestParam(value = "periodId", required = true) Long periodId) { return CommonResult.success(resourceService.selectResourceByPeriodId(periodId)); } }