package com.nantian.cloud.jljc.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.jljc.entity.ProductInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nantian.cloud.jljc.vo.ProductInfoTreeVo;
import com.nantian.cloud.jljc.vo.ProductInfoVo;
import com.nantian.cloud.jljc.vo.TreeVo;
import com.nantian.sc.cloud.common.data.datascope.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 产品信息 Mapper 接口
 * </p>
 *
 * @author stz
 * @since 2020-08-05
 */
@Mapper
public interface ProductInfoMapper extends BaseMapper<ProductInfo> {

    List<ProductInfo> getInfoByStr(@Param("list") String[] list);

    List<ProductInfoTreeVo> getTreeByTrade();

    ProductInfoVo getInfoByName(@Param("name") String name);

    //IPage<ProductInfo> getPageScope(Page page,@Param("query") ProductInfo productInfo, DataScope dataScope);
    IPage<ProductInfo> getPageScope(Page page,@Param("query") ProductInfo productInfo);

    //获取产品信息涉及的行业
    List<String> getTrade();

    //获取该产品编码的所有下级自定义编码
    List<String> getCustomCode(@Param("prevProductNum") String prevProductNum);

    //获取产品树形结构
    List<TreeVo> getTree();

    List<Map<String, Object>> getProductInfoList();
}
