package com.bonus.sgzb.app.mapper;

import com.bonus.sgzb.app.domain.LeaseApplyDetails;
import com.bonus.sgzb.app.domain.LeaseOutDetailRecord;
import com.bonus.sgzb.app.domain.TmTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* Description: 领料任务详情Mapper接口
* @Author 阮世耀
* @Create 2023/12/13 15:45
* @Version 1.0
*/

@Mapper
public interface LeaseApplyDetailsMapper {
    int deleteByPrimaryKey(Integer id);

    int deleteByParentId(String parentId);
    List<LeaseApplyDetails> selectByTaskId(TmTask tmTask);

    int insert(LeaseApplyDetails record);

    int insertOrUpdate(LeaseApplyDetails record);

    int insertOrUpdateSelective(LeaseApplyDetails record);

    int insertSelective(LeaseApplyDetails record);

    LeaseApplyDetails selectByPrimaryKey(Integer id);

    /**
     * 根据主键更新实体属性不为null的列
     * @param record 实体对象
     * @return 影响行数
     */
    int updateByPrimaryKeySelective(LeaseApplyDetails record);

    int updateByPrimaryKey(LeaseApplyDetails record);

    int updateBatch(List<LeaseApplyDetails> list);

    int updateBatchSelective(List<LeaseApplyDetails> list);

    int batchInsert(@Param("list") List<LeaseApplyDetails> list);

    List<LeaseApplyDetails> getByParentId(Integer parentId);

    List<TmTask> getDetailsByApplyId(TmTask typeId);

    TmTask getOrderHead(String parentId);

    List<LeaseOutDetailRecord> getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId);
}