package com.xxfc.platform.tour.biz;

import com.xxfc.platform.tour.mapper.TourGoodSiteMapper;
import org.springframework.stereotype.Service;

import com.xxfc.platform.tour.entity.TourGoodSite;
import com.github.wxiaoqi.security.common.biz.BaseBiz;

import java.util.List;

/**
 * 路线站点表
 *
 * @author zjw
 * @email nishijjo@qq.com
 * @date 2019-06-06 11:41:51
 */
@Service
public class TourGoodSiteBiz extends BaseBiz<TourGoodSiteMapper,TourGoodSite> {


    //删除站点
    public  void delGoodSite(Integer goodId, List<Integer> ids){ mapper.delSite(goodId,ids);}

    public Long selectDepartureTimeByStartCompanyIdAndRouteId(Integer companyId, Integer routeId) {
        TourGoodSite tourGoodSite = new TourGoodSite();
        tourGoodSite.setCompanyId(companyId);
        tourGoodSite.setGoodId(routeId);
        TourGoodSite site = mapper.selectOne(tourGoodSite);
        return site.getDepartTime();
    }
}