package com.ruoyi.system.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.PosFreight;
import com.ruoyi.system.domain.SysFeedback;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * freightMapper接口
 * 
 * @author ruoyi
 * @date 2023-07-15
 */
public interface PosFreightMapper  extends BaseMapper<PosFreight>
{
    //查询当前时段运费报价
    @Select("SELECT * FROM pos_freight WHERE  curtime() >  start_time AND curtime() <  end_time")  //查询语句
    List<PosFreight> getyunjia();  //反回结果
    //查询一分钟后时段运费报价
    @Select("SELECT * FROM pos_freight WHERE  DATE_ADD(curtime(),INTERVAL 1 minute) >  start_time AND DATE_ADD(curtime(),INTERVAL 1 minute) <  end_time")  //查询语句
    List<PosFreight> getmiuyunjia();  //反回结果

    /**
     * 查询freight
     * 
     * @param id freight主键
     * @return freight
     */
    public PosFreight selectPosFreightById(Long id);

    /**
     * 查询freight列表
     * 
     * @param posFreight freight
     * @return freight集合
     */
    public List<PosFreight> selectPosFreightList(PosFreight posFreight);

    /**
     * 新增freight
     * 
     * @param posFreight freight
     * @return 结果
     */
    public int insertPosFreight(PosFreight posFreight);

    /**
     * 修改freight
     * 
     * @param posFreight freight
     * @return 结果
     */
    public int updatePosFreight(PosFreight posFreight);

    /**
     * 删除freight
     * 
     * @param id freight主键
     * @return 结果
     */
    public int deletePosFreightById(Long id);

    /**
     * 批量删除freight
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePosFreightByIds(Long[] ids);
}
