package com.ktg.iscs.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ktg.common.mapper.BaseMapperX;
import com.ktg.iscs.domain.IsMaterialsCabinet;
import com.ktg.iscs.domain.vo.cabinet.IsMaterialsCabinetVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物资柜Mapper接口
 *
 * @author cgj
 * @date 2024-11-08
 */
@Mapper
public interface IsMaterialsCabinetMapper extends BaseMapperX<IsMaterialsCabinet>
{
    /**
     * 查询物资柜
     *
     * @param cabinetId 物资柜主键
     * @return 物资柜
     */
    IsMaterialsCabinet selectIsMaterialsCabinetByCabinetId(Long cabinetId);

    /**
     * 查询物资柜列表
     *
     * @param isMaterialsCabinet 物资柜
     * @return 物资柜集合
     */
    List<IsMaterialsCabinet> selectIsMaterialsCabinetList(IsMaterialsCabinet isMaterialsCabinet);

    /**
     * 新增物资柜
     *
     * @param isMaterialsCabinet 物资柜
     * @return 结果
     */
    int insertIsMaterialsCabinet(IsMaterialsCabinet isMaterialsCabinet);

    /**
     * 修改物资柜
     *
     * @param isMaterialsCabinet 物资柜
     * @return 结果
     */
    int updateIsMaterialsCabinet(IsMaterialsCabinet isMaterialsCabinet);

    /**
     * 删除物资柜
     *
     * @param cabinetId 物资柜主键
     * @return 结果
     */
    int deleteIsMaterialsCabinetByCabinetId(Long cabinetId);

    /**
     * 批量删除物资柜
     *
     * @param cabinetIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteIsMaterialsCabinetByCabinetIds(Long[] cabinetIds);

    Page<IsMaterialsCabinetVO> getIsMaterialsCabinetPage(Page<IsMaterialsCabinet> page, @Param(value = "dto") IsMaterialsCabinet dto);
}
