package com.zd.chemical.mapper;

import com.zd.chemical.domain.HxpChemicalJoinCabinet;
import com.zd.chemical.domain.vo.AioChemicalVo;
import com.zd.chemical.domain.vo.HxpChemicalJoinCabinetListVo;
import com.zd.chemical.domain.vo.HxpChemicalJoinCabinetSearch;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 化学品和机柜关联Mapper接口
 *
 * @author liubo
 * @date 2022-06-16
 */
public interface HxpChemicalJoinCabinetMapper
{
    /**
     * 查询化学品和机柜关联
     *
     * @param id 化学品和机柜关联主键
     * @return 化学品和机柜关联
     */
    public HxpChemicalJoinCabinet selectHxpChemicalJoinCabinetById(Long id);

    /**
     * 查询化学品和机柜关联
     *
     * @param id 化学品和机柜关联主键
     * @return 化学品和机柜关联
     */
    public List<HxpChemicalJoinCabinet> selByChemical(Long id);

    /**
     * 查询化学品和机柜关联列表
     *
     * @param hxpChemicalJoinCabinetSearch 化学品和机柜关联
     * @return 化学品和机柜关联集合
     */
    public List<HxpChemicalJoinCabinetListVo> selectHxpChemicalJoinCabinetList(HxpChemicalJoinCabinetSearch hxpChemicalJoinCabinetSearch);

    /**
     * 新增化学品和机柜关联
     *
     * @param hxpChemicalJoinCabinet 化学品和机柜关联
     * @return 结果
     */
    public int insertHxpChemicalJoinCabinet(HxpChemicalJoinCabinet hxpChemicalJoinCabinet);

    /**
     * 修改化学品和机柜关联
     *
     * @param hxpChemicalJoinCabinet 化学品和机柜关联
     * @return 结果
     */
    public int updateHxpChemicalJoinCabinet(HxpChemicalJoinCabinet hxpChemicalJoinCabinet);

    /**
     * 删除化学品和机柜关联
     *
     * @param id 化学品和机柜关联主键
     * @return 结果
     */
    public int deleteHxpChemicalJoinCabinetById(Long id);

    /**
     * 批量删除化学品和机柜关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteHxpChemicalJoinCabinetByIds(Long[] ids);

    List<AioChemicalVo> selectChemicalVoList(AioChemicalVo aioChemicalVo);

    String queryUserNameBySafeUserId(String safeUserId);

    String queryUserPhoneBySafeUserId(String safeUserId);


    public List<HxpChemicalJoinCabinet> selectChemicalListById(HxpChemicalJoinCabinet hxpChemicalJoinCabinet);


    /**
     * 批量删除化学品和机柜关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int delByChemical(Long[] ids);

    int updateExpiredByIds(@Param("list") List<Long> joinIds);

    int updateChemicalJoinCabinetByExpired();
}
