package cn.iocoder.yudao.module.rescue.mapper;

import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 加油记录Mapper接口
 *
 * @author zcy
 * @date 2023-09-26
 */
@Mapper
public interface RescueRefuelRecordMapper extends BaseMapper<RescueRefuelRecord>
{
    /**
     * 查询加油记录
     *
     * @param id 加油记录主键
     * @return 加油记录
     */
    public RescueRefuelRecord selectRescueRefuelRecordById(Long id);

    /**
     * 查询加油记录列表
     *
     * @param rescueRefuelRecord 加油记录
     * @return 加油记录集合
     */
    IPage<RescueRefuelRecord> selectRescueRefuelRecordList(@Param("map") RescueRefuelRecord rescueRefuelRecord, Page<RescueRefuelRecord> page);


    /**
     * 删除加油记录
     *
     * @param id 加油记录主键
     * @return 结果
     */
    public int deleteRescueRefuelRecordById(Long id);

    /**
     * 批量删除加油记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRescueRefuelRecordByIds(Long[] ids);

    JSONObject getMonthRescueRefuelRecord(@Param("driverId") Long driverId,@Param("time") String time,@Param("carId") Long carId);
    JSONObject listData(RescueInfo rescueInfo);
}
