package com.vote.system.controller;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vctgo.common.core.web.domain.AjaxResult;
import com.vote.system.domain.VoteHistoryScore;
import com.vote.system.service.VoteHistoryScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @CreateTime: 2024/9/29 下午6:36
 * @Description:
 * @Email: f2965573933@163.com
 * @Author: FanJiaBao
 */
@RestController
@RequestMapping("/history")
public class VoteHistoryScoreController {


    @Autowired
    private VoteHistoryScoreService voteHistoryScoreService;

    @GetMapping("/{submissionId}")
    public AjaxResult getHistoryScoreBySubmissionId(@PathVariable("submissionId") Long submissionId){
        return AjaxResult.success(voteHistoryScoreService.getHistoryScore(submissionId));
    }

}
