package com.ruoyi.ss.locationLog.mapper;

import org.apache.ibatis.annotations.Param;
import com.ruoyi.ss.locationLog.domain.LocationLog;

import java.util.List;

/**
 * 定位日志Mapper接口
 *
 * @author ruoyi
 * @date 2024-08-20
 */
public interface LocationLogMapper
{
    /**
     * 查询定位日志
     *
     * @param locationId 定位日志主键
     * @return 定位日志
     */
    public LocationLog selectEtLocationLogByLocationId(Long locationId);

    /**
     * 查询定位日志列表
     *
     * @param rlLocationLog 定位日志
     * @return 定位日志集合
     */
    public List<LocationLog> selectEtLocationLogList(LocationLog rlLocationLog);

    /**
     * 查询定位日志列表
     *
     * @param mac
     * @return 定位日志集合
     */
    public List<LocationLog> selectEtLocationLogListByCreateTime(@Param("mac") String mac, @Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 新增定位日志
     *
     * @param rlLocationLog 定位日志
     * @return 结果
     */
    public int insertEtLocationLog(LocationLog rlLocationLog);

    /**
     * 修改定位日志
     *
     * @param rlLocationLog 定位日志
     * @return 结果
     */
    public int updateEtLocationLog(LocationLog rlLocationLog);

    /**
     * 删除定位日志
     *
     * @param locationId 定位日志主键
     * @return 结果
     */
    public int deleteEtLocationLogByLocationId(Long locationId);

    /**
     * 批量删除定位日志
     *
     * @param locationIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteEtLocationLogByLocationIds(Long[] locationIds);


    /**
     * 删除7天之前的定位日志
     *
     * @return 结果
     */
    int deleteLocationLogByCreateTime();

    /**
     * 获取最后一条消息
     *
     * @return 结果
     */
    String getLastMsg(String mac);
}
