package com.vote.system.controller;

import com.vctgo.common.core.web.domain.AjaxResult;
import com.vote.system.domain.VoteJudgesVisibleFields;
import com.vote.system.service.VoteJudgesVisibleFieldsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @CreateTime: 2024/8/26 下午7:27
 * @Description:
 * @Email: f2965573933@163.com
 * @Author: FanJiaBao
 */
@RestController
@RequestMapping("/judgesVisibleFields")
public class VoteJudgesVisibleFieldsController {

    @Autowired
    private VoteJudgesVisibleFieldsService voteJudgesVisibleFieldsService;


    @GetMapping("/{workSettingsId}")
    public AjaxResult getVisible(@PathVariable("workSettingsId") Long workSettingsId) {
        return AjaxResult.success(voteJudgesVisibleFieldsService.selectByWorkSettingsId(workSettingsId));
    }


    @PostMapping("/save")
    public AjaxResult save(@RequestBody VoteJudgesVisibleFields voteJudgesVisibleFields){
        return AjaxResult.success(voteJudgesVisibleFieldsService.save(voteJudgesVisibleFields));
    }


}
