package com.hzs.system.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.system.sys.SysApprovalBusinessReceive;
import com.hzs.common.domain.system.sys.ext.SysApprovalBusinessReceiveExt;
import com.hzs.system.index.param.ReceiveApprovalQueryParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 审批业务接收表 Mapper 接口
 *
 * @author hzs
 * @since 2023-05-05
 */
public interface SysApprovalBusinessReceiveMapper extends BaseMapper<SysApprovalBusinessReceive> {

    /**
     * 批量插入数据
     *
     * @param list
     * @return
     */
    int insertBatch(@Param("list") List<SysApprovalBusinessReceive> list);

    /**
     * 查询列表数量
     *
     * @param userId    当前用户
     * @param pkCountry 所属国家
     * @return
     */
    int listReceiveCount(@Param("userId") Long userId,
                         @Param("pkCountry") Integer pkCountry);

    /**
     * 查询列表
     *
     * @param param     入参
     * @param userId    当前用户
     * @param pkCountry 所属国家
     * @return
     */
    List<SysApprovalBusinessReceiveExt> listReceive(@Param("param") ReceiveApprovalQueryParam param,
                                                    @Param("userId") Long userId,
                                                    @Param("pkCountry") Integer pkCountry);

}
