package com.hc.web.controller.browser.app;

import com.hc.business.model.ZccmQrAccessory;
import com.hc.business.service.ZccmQrAccessoryService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;


/**
 * 二维码扫码附件表(ZccmQrAccessory)表控制层
 *
 * @author makejava
 * @since 2024-11-08 09:58:21
 */

@RestController
@RequestMapping("/new/api/app/qrAccessory")
public class AppQrAccessoryController {

    /**
     * 服务对象
     */
    private final ZccmQrAccessoryService zccmQrAccessoryService;

    public AppQrAccessoryController(ZccmQrAccessoryService zccmQrAccessoryService) {
        this.zccmQrAccessoryService = zccmQrAccessoryService;
    }

    @GetMapping("/list")
    @ApiOperation(value = "获取 ZccmQrAccessory列表(分页)", response = Result.class)
    public Result listZccmQrAccessory(@RequestParam(defaultValue = "0") Integer page,
                                      @RequestParam(defaultValue = "0") Integer size,
                                      @ApiParam(value = "课程ID") @RequestParam(required = false) Integer courseId,
                                      @ApiParam(value = "二维码索引") @RequestParam(required = false) Integer qrIndex,
                                      @ApiParam(value = "123表示文件，视频，音频") @RequestParam(required = false) Integer qrType,
                                      @ApiParam(value = "章节ID") @RequestParam(required = false) Integer chapterId,
                                      @ApiParam(value = "文件名") @RequestParam(required = false) String fileName) {
        return Result.success(zccmQrAccessoryService.queryByAll(page, size,courseId,qrIndex,qrType,chapterId,fileName));
    }


}
