package com.sckw.transport.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.transport.model.KwtLogisticsOrderUnit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface KwtLogisticsOrderUnitMapper extends BaseMapper<KwtLogisticsOrderUnit> {
    int deleteByPrimaryKey(Long id);

    @Override
    int insert(KwtLogisticsOrderUnit record);

    int insertSelective(KwtLogisticsOrderUnit record);

    KwtLogisticsOrderUnit selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(KwtLogisticsOrderUnit record);

    int updateByPrimaryKey(KwtLogisticsOrderUnit record);

    /**
     * 根据单据号获取主表关联企业信息
     *
     * @param ids
     * @param unitType
     * @return
     */
    List<KwtLogisticsOrderUnit> selectCompanyBylOrderId(@Param("ids") List<Long> ids, @Param("unitType") Integer unitType);

    /**
     * @param lOrderId 物流订单id
     * @param unitType 1托运 2承运企业
     * @desc 查询物流运单托运/承运企业信息
     * @author zk
     * @date 2023/7/20
     **/
    KwtLogisticsOrderUnit findByUnit(@Param("lOrderId") Long lOrderId, @Param("unitType") Integer unitType);
}