package com.jeeplus.test.materialManagement.collect.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.jeeplus.test.materialManagement.collect.domain.CollectBasic;
import com.jeeplus.test.materialManagement.collect.service.dto.CollectDto;
import com.jeeplus.test.materialManagement.collect.service.dto.WareHouseSummaryDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 王强
 * @create: 2023-01-03 16:29
 **/
public interface CollectBasicMapper extends BaseMapper<CollectBasic> {

    void updateStatusById(@Param("id") String id, @Param("type") String type);

    List<String> findChildIds(String department);

    IPage<CollectDto> findList(Page<CollectDto> page, @Param(Constants.WRAPPER) QueryWrapper<CollectDto> queryWrapper);

    IPage<WareHouseSummaryDto> findWareHouseList(Page<WareHouseSummaryDto> page, @Param(Constants.WRAPPER) QueryWrapper<WareHouseSummaryDto> queryWrapper);

    String getUserNameByUserId(String handledBy);
}
