package org.dromara.main.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController;
import org.dromara.main.domain.bo.MainBackRecordBo;
import org.dromara.main.domain.vo.MainBackRecordVo;
import org.dromara.main.service.IMainBackRecordService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 背调执行记录Controller
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/system/backRecord")
public class MainBackRecordController extends BaseController {

    private final IMainBackRecordService mainBackRecordService;

    /**
     * 查询背调执行记录列表（候选人列表）
     */
//    @SaCheckPermission("system:backRecord:list")
    @GetMapping("/list")
    public TableDataInfo<MainBackRecordVo> list(
            @RequestParam(value = "orderId") Long orderId,
            MainBackRecordBo bo,
            PageQuery pageQuery) {
        return mainBackRecordService.queryPageList(orderId, bo, pageQuery);
    }
}
