add
heheng
2025-06-10 942bdeee0b6fcc92b35e788c851d39c5182a8e40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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.*;
 
/**
 * <p>
 * 课程资源表 前端控制器
 * </p>
 *
 * @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));
    }
}