package com.vote.system.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vctgo.common.core.web.domain.AjaxResult;
import com.vote.system.domain.dto.VoteEvaluationTasksDto;
import com.vote.system.domain.vo.VoteEventRegistrationsVo;
import com.vote.system.domain.vo.VoteSubmissionVo;
import com.vote.system.service.VoteAppraiseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author feng
 * @date 2024/8/26
 */
@RestController
@RequestMapping("/appraise")
public class VoteAppraiseController {

    @Autowired
    private VoteAppraiseService voteAppraiseService;


    /**
     * 作品评选
     *
     * @param eventId
     * @return
     */
    @GetMapping("/{eventId}")
    public AjaxResult getVoteAppraiseByEventId(@PathVariable("eventId") Long eventId) {
        return AjaxResult.success(voteAppraiseService.getVoteAppraiseByEventId(eventId));
    }


    /**
     * 作品清单
     */
    @GetMapping("/submissionList")
    public AjaxResult getSubmissionList(VoteEvaluationTasksDto VoteEvaluationTasksDto) {
        IPage<VoteSubmissionVo> page = voteAppraiseService.getSubmissionList(VoteEvaluationTasksDto);
        return AjaxResult.success(page);
    }


    /**
     * 专家列表
     */
    @GetMapping("/judgesList")
    public AjaxResult getJudgesList(VoteEvaluationTasksDto VoteEvaluationTasksDto) {
        return AjaxResult.success(voteAppraiseService.getJudgesList(VoteEvaluationTasksDto));
    }





}
