package cn.com.ctop.common.module.mapper;

import cn.com.ctop.common.module.entity.Product;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

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

/**
 * 产品表
 *
 * @author: jeecg-boot
 * @date: 2020-09-08
 * @cersion: V1.0
 */
public interface ProductMapper extends BaseMapper<Product> {

    String getUserNameByUserId(@Param("userId") String userId);

    List<JSONObject> getProductByMap(@Param("ids") Map<Long, Long> productIdMap);

    IPage<Product> getUserProductList(Page<Product> page, @Param("userIds") List<String> userIds, @Param("productName")String productName);
}
