package com.cool.store.mapper;

import com.cool.store.entity.plan.ShopDeliveryPlanDO;
import com.cool.store.vo.desk.DeliveryPendingVO;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShopDeliveryPlanMapper {

    /**
     * 根据ID查询
     */
    ShopDeliveryPlanDO getById(@Param("id") Long id);

    /**
     * 根据门店ID查询
     */
    ShopDeliveryPlanDO getByShopId(@Param("shopId") Long shopId);

    /**
     * 插入
     */
    int insert(ShopDeliveryPlanDO record);

    /**
     * 更新
     */
    int update(ShopDeliveryPlanDO record);

    /**
     * 删除
     */
    int deleteById(@Param("id") Long id);

    /**
     * 查询所有
     */
    List<ShopDeliveryPlanDO> listAll();

    /**
     * 查询代办
     * @param keyword
     * @return
     */
    List<DeliveryPendingVO> getPendingList(@Param("keyword") String keyword, @Param("type") Integer type);
}