package com.willalp.erms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.willalp.erms.domain.HsGoodsStorage;
import org.apache.ibatis.annotations.Param;

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

/**
 * 物资库Mapper接口
 *
 * @author willalp
 * @date 2023-03-08
 */
public interface HsGoodsStorageMapper extends BaseMapper<HsGoodsStorage> {
    /**
     * 查询物资库列表
     *
     * @param hsGoodsStorage 物资库
     * @return 物资库集合
     */
    List<HsGoodsStorage> selectHsGoodsStorageList(HsGoodsStorage hsGoodsStorage);

    /**
     * APP根据二级分类获取物品信息列表
     *
     * @param type
     * @return
     */
    List<HsGoodsStorage> appGetGoodsByType(@Param("type") String type, @Param("name") String name);

    /**
     * 流程根据ID获取物资信息
     *
     * @param id
     * @return
     */
//    @Select("select id, type_root,type_branch, number,name,product_model,unit from hs_goods_storage where is_delete = 0 AND id = #{id}")
    Map<String, Object> flowGetGoodsById(@Param("id") String id);
}
