package com.vetti.web.controller.hotake;

import com.vetti.common.annotation.Log;
import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.R;
import com.vetti.common.core.page.TableDataInfo;
import com.vetti.common.core.page.TableWebDataInfo;
import com.vetti.common.enums.BusinessType;
import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo;
import com.vetti.hotake.domain.vo.HotakeInitScreQuestionsReplyRecordInfoVo;
import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 初步筛选问题回答记录信息Controller
 * 
 * @author wangxiangshun
 * @date 2025-12-14
 */
@Api(tags ="初步筛选问题回答记录信息")
@RestController
@RequestMapping("/hotake/initScreQuestionsReplyRecordInfo")
public class HotakeInitScreQuestionsReplyRecordInfoController extends BaseController
{
    @Autowired
    private IHotakeInitScreQuestionsReplyRecordInfoService hotakeInitScreQuestionsReplyRecordInfoService;

    /**
     * 查询初步筛选问题回答记录信息列表
     */
    @ApiOperation("查询初步筛选问题回答记录信息列表")
    @GetMapping("/getPageList")
    public TableWebDataInfo pageList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
    {
        startPage();
        List<HotakeInitScreQuestionsReplyRecordInfo> list = hotakeInitScreQuestionsReplyRecordInfoService.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo);
        return getWebDataTable(list);
    }

    /**
     * 查询初步筛选问题回答记录信息列表(无分页)
     */
    @ApiOperation("查询初步筛选问题回答记录信息列表(无分页)")
    @GetMapping("/getList")
    public R<List<HotakeInitScreQuestionsReplyRecordInfo>> list(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
    {
        List<HotakeInitScreQuestionsReplyRecordInfo> list = hotakeInitScreQuestionsReplyRecordInfoService.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo);
        return R.ok(list,"");
    }



    /**
     * 获取初步筛选问题回答记录信息详细信息
     */
    @ApiOperation("获取初步筛选问题回答记录信息详细信息")
    @GetMapping(value = "/{id}")
    public R<HotakeInitScreQuestionsReplyRecordInfo> getInfo(@PathVariable("id") Long id)
    {
        return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.selectHotakeInitScreQuestionsReplyRecordInfoById(id),"");
    }

    /**
     * 新增初步筛选问题回答记录信息
     */
    @ApiOperation("新增初步筛选问题回答记录信息")
    @Log(title = "初步筛选问题回答记录信息", businessType = BusinessType.INSERT)
    @PostMapping
    public R<?> add(@RequestBody HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
    {
        return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.insertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo));
    }

    /**
     * 修改初步筛选问题回答记录信息
     */
    @ApiOperation("修改初步筛选问题回答记录信息")
    @Log(title = "初步筛选问题回答记录信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public R<?> edit(@RequestBody HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
    {
        return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.updateHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo));
    }

    /**
     * 删除初步筛选问题回答记录信息
     */
    @ApiOperation("删除初步筛选问题回答记录信息")
    @Log(title = "初步筛选问题回答记录信息", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public R<?> remove(@PathVariable Long[] ids)
    {
        return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.deleteHotakeInitScreQuestionsReplyRecordInfoByIds(ids));
    }


    /**
     * 初步筛选问题回答记录信息批量保存
     */
    @ApiOperation("初步筛选问题回答记录信息批量保存")
    @Log(title = "初步筛选问题回答记录信息批量保存", businessType = BusinessType.INSERT)
    @PostMapping("/save")
    public R<?> save(@RequestBody HotakeInitScreQuestionsReplyRecordInfoVo initScreQuestionsReplyRecordInfoVo)
    {
        return R.ok(hotakeInitScreQuestionsReplyRecordInfoService.saveHotakeInitScreQuestionsReplyRecordInfo(initScreQuestionsReplyRecordInfoVo));
    }
}
