package com.unis.crk.basic.mapper;

import com.unis.crk.basic.entity.BasicStorehouse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.unis.crk.basic.entity.vo.BasicStorehouseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 库点仓房信息 Mapper 接口
 * </p>
 *
 * @author TangSong
 * @since 2021-11-25
 */
public interface BasicStorehouseMapper extends BaseMapper<BasicStorehouse> {
    /**
     * 自定义sql分页
     *
     * @param page
     * @param queryWrapper 看这里看这里，如果自定义的方法中需要用到wrapper查询条件，需要这样写
     * @return
     */
    IPage<Map<String, Object>> selectMyMapsPage(IPage<BasicStorehouse> page, @Param(Constants.WRAPPER) QueryWrapper<BasicStorehouse> queryWrapper);

    /**
     * 通过单位Id得到相应的仓房及油罐信息
     * @param unitId
     * @return
     */
    List<Map<String, Object>> getStorehouseList(@Param("unitId")String unitId);

    List<Map<String, Object>> getStorehouseListByCclx(@Param("unitId") String unitId,@Param("cclx")  String cclx);
}
