package com.vctgo.system.api;

import com.vctgo.common.core.constant.ServiceNameConstants;
import com.vctgo.common.core.domain.R;
import com.vctgo.system.api.domain.VoteEvents;
import com.vctgo.system.api.domain.VoteScoringItem;
import com.vctgo.system.api.domain.VoteSubmission;
import com.vctgo.system.api.domain.dto.VoteExpertWorkingPlatformDto;
import com.vctgo.system.api.domain.vo.VoteExpertSubmissionCountVo;
import com.vctgo.system.api.domain.vo.VoteExpertSubmissionVo;
import com.vctgo.system.api.domain.vo.VoteExpertWorkingPlatformVo;
import com.vctgo.system.api.factory.RemoteExpertWorkingPlatformFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient( contextId = "remoteExpertWorkingPlatformService", value = ServiceNameConstants.VOTE_SERVICE, fallbackFactory = RemoteExpertWorkingPlatformFactory.class)
public interface RemoteExpertWorkingPlatformService {

    /**
     * 专家平台分页
     */
    @GetMapping("/workingPlatform/page/{judgesId}")
    R<List<VoteExpertWorkingPlatformVo>> expertPlatformPage(@PathVariable("judgesId") String judgesId);


    /**
     * 专家评选作品
     */
    @GetMapping("/workingPlatform/submissionList")
    R<List<VoteExpertSubmissionVo>> expertPlatformDetail(@RequestParam("eventId") Long eventId
            , @RequestParam("workSettingsId") Long workSettingsId
            , @RequestParam("roundId") Long roundId
            , @RequestParam("status") String status);


    /**
     * 作品数
     */
    @GetMapping("/workingPlatform/count")
    R<VoteExpertSubmissionCountVo> submissionCount(@RequestParam("eventId") Long eventId
            , @RequestParam("workSettingsId") Long workSettingsId
            , @RequestParam("roundId") Long roundId);


    /**
     * 查看规则项
     */
    @GetMapping("/workingPlatform/item/{ruleId}")
    R<List<VoteScoringItem>> getItem(@PathVariable("ruleId") Long ruleId);

    /**
     * 查看活动详情
     */
    @GetMapping("/workingPlatform/eventDetails/{eventId}")
    R<VoteEvents> getEventDetails(@PathVariable("eventId") Long eventId);


    /**
     * 作品详情
     */
    @GetMapping("/workingPlatform/submissionDetails")
    R<VoteSubmission> submissionDetails(@RequestParam("eventId") Long eventId
            , @RequestParam("workSettingsId") Long workSettingsId
            , @RequestParam("roundId") Long roundId
            , @RequestParam("submissionId") Long submissionId);




    @PostMapping("/workingPlatform/expertScoring")
    R<Integer> expertScoring(@RequestBody String encode);
}
