package com.gree.mall.miniapp.commonmapper.stock;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gree.mall.miniapp.annotation.DataPermission;
import com.gree.mall.miniapp.bean.material.stock.WorkerStockBean;
import com.gree.mall.miniapp.bean.material.stock.WorkerStockDTO;
import com.gree.mall.miniapp.plus.entity.WebsitGoodsCategory;
import com.gree.mall.miniapp.plus.entity.WorkerStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WorkerStockCMapper {


    @DataPermission
    @SqlParser(filter = true)
    List<WebsitGoodsCategory> queryWebsitGoodsCategoryList(
            @Param("websitId") String websitId,
            @Param("userId") String userId,
            @Param("goodsType") String goodsType
    );


    @DataPermission
    @SqlParser(filter = true)
    IPage<WorkerStockBean> queryWorkerStockList(
            IPage page,
            @Param("websitId") String websitId,
            @Param("userId") String userId,
            @Param("goodsType") String goodsType,
            @Param("categoryId") String categoryId
    );
    @SqlParser(filter = true)
    List<WorkerStock> queryExistWorkerStockList(@Param("companyWechatId") String companyWechatId,
                                                @Param("workerId") String workerId,
                                                @Param("stockList") List<WorkerStockDTO> stockList);

}
