package com.ruoyi.web.modules.goods.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.goods.domain.BizGoods;
import com.ruoyi.web.modules.goods.vo.GoodsListVO;

/**
 * 商品 Mapper
 */
public interface BizGoodsMapper
{
    BizGoods selectById(@Param("goodsId") Long goodsId);

    BizGoods selectByIdAndShop(@Param("goodsId") Long goodsId, @Param("shopId") Long shopId);

    List<GoodsListVO> selectPlatformList(BizGoods query);

    int countPlatformPending();

    List<GoodsListVO> selectSellerList(BizGoods query);

    int countBlockingByShopId(@Param("shopId") Long shopId);

    int countByCategoryId(@Param("categoryId") Long categoryId);

    int countByShopCategoryId(@Param("shopCategoryId") Long shopCategoryId);

    int countByAttrTemplateId(@Param("templateId") Long templateId);

    int insert(BizGoods goods);

    int updateSeller(BizGoods goods);

    int updateSubmitStatus(@Param("goodsId") Long goodsId, @Param("goodsStatus") String goodsStatus,
            @Param("submitTime") java.util.Date submitTime, @Param("updateFirstSubmit") boolean updateFirstSubmit,
            @Param("updateBy") String updateBy);

    int updateAuditPass(@Param("goodsId") Long goodsId, @Param("updateBy") String updateBy);

    int updateAuditReject(@Param("goodsId") Long goodsId, @Param("rejectReason") String rejectReason,
            @Param("updateBy") String updateBy);

    int updateOffShelf(@Param("goodsId") Long goodsId, @Param("updateBy") String updateBy);

    int logicDeleteByIds(@Param("goodsIds") List<Long> goodsIds, @Param("shopId") Long shopId,
            @Param("updateBy") String updateBy);
}
