/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.distribution.comment.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.distribution.comment.model.DistributionProd;
import com.yami.shop.distribution.comment.model.DistributionProdLog;
import com.yami.shop.distribution.comment.po.DistributionProdPO;
import org.apache.ibatis.annotations.Param;

public interface DistributionProdMapper extends BaseMapper<DistributionProd> {

    IPage<DistributionProd> distributionProdsPage(Page page, @Param("distributionProd") DistributionProd distributionProd, @Param("prodName") String prodName);

    IPage<DistributionProdPO> distributionProdPOPage(Page page, @Param("prodName") String prodName, @Param("sort") Integer sort, @Param("orderBy") Integer orderBy);

    DistributionProdPO getDistributionProdPOByProdId(@Param("prodId") Long prodId);

    int updateState(@Param("distributionProdId") Long distributionProdId, @Param("state") int state);

    IPage<DistributionProdLog> getDistributionProdLogPage(PageParam<DistributionProdLog> page, @Param("distributionProdLog") DistributionProdLog distributionProdLog);
}
