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

package com.yami.shop.delivery.comment.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.Transport2;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.delivery.comment.param.ShopTransport;
import org.springframework.cache.annotation.CacheEvict;

/**
 * @author lgh on 2018/11/16.
 */
public interface Transport2Service extends IService<Transport2> {

    void insertTransportAndTransfee(Transport2 transport);

    void updateTransportAndTransfee(Transport2 transport);

    void deleteTransportAndTransfeeAndTranscity(Long[] ids);

    Transport2 getTransportAndAllItems(Long transportId);

    Transport2 findByDistance(Long shopId, Double distance);

    Transport2 findByDistance(Long shopId, Integer platform);

    Transport2 findByPlatform(Long channelId);

    Transport2 findByDistance(Long shopId, Double distance, Double weight);

    ShopTransport findShopTransports(Long shopName);

    @CacheEvict(cacheNames = "TransportAndAllItems", key = "#transportId")
    default void removeTransportAndAllItemsCache(Long transportId) {
    }

    Transport2 queryTransport2ByChannelId(Long channelId);

    IPage<Transport2> transport2List(PageParam<Transport2> page);

}
