package com.lframework.xingyun.sc.mappers;

import com.lframework.starter.web.mapper.BaseMapper;
import com.lframework.xingyun.sc.entity.SerialNumber;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 物流单 Mapper 接口
 * </p>
 *
 * @author zmj
 */
public interface SerialNumberMapper extends BaseMapper<SerialNumber> {

    Integer deleteByAdjustId(String id);

    Integer deleteByAdjustIds(@Param("ids") List<String> ids);

    Integer updateByAdjustId(String id);

    Integer getSerialNumberCount(@Param("id")String id,@Param("serialNumber")String serialNumber,@Param("productId")String productId);

    List<SerialNumber> getSerialNumberList(@Param("id")String id,@Param("serialNumber")String serialNumber,@Param("productId")String productId,@Param("startNum")Integer startNum,@Param("pageSize")Integer pageSize);

    List<SerialNumber> getSerialNumberByProductId(String productId);

    Integer updateByProductId(String id);

    Integer updateByOutBillNo(String outBillNo);

    Integer updatePassByOutBillNo(String outBillNo);

    Integer updatePassBySerialNumber(@Param("serialNumber")String serialNumber,@Param("outBillNo")String outBillNo);

    List<SerialNumber> getSerialNumberByInBillNo(String inBillNo);

    List<String> getSerialByOutBillNo(@Param("outBillNo")String outBillNo,@Param("productId") String productId);

    List<String> getSerialIdByOutBillNo(@Param("outBillNo")String outBillNo,@Param("productId") String productId);

    List<String> getSerialIdByInBillNo(@Param("outBillNo")String outBillNo,@Param("productId") String productId);

    List<String> getSerialByInBillNo( @Param("inBillNo")String inBillNo,@Param("productId") String productId);

    Integer updateOutBillNoClean(String id);

    Integer updateInBillNoClean(String id);

    Integer updateOutBillNo(String outBillNo,String id);

    Integer updateInBillNo(String inBillNo,String id);

}
