package com.ruoyi.ss.businessRecord.mapper;

import com.ruoyi.ss.businessRecord.domain.SmBusinessRecord;
import com.ruoyi.ss.businessRecord.domain.SmBusinessRecordQuery;
import com.ruoyi.ss.businessRecord.domain.SmBusinessRecordVo;

import java.util.List;

/**
 * 经营记录Mapper接口
 *
 * @author ruoyi
 * @date 2024-03-19
 */
public interface SmBusinessRecordMapper
{
    /**
     * 查询经营记录
     *
     * @param id 经营记录主键
     * @return 经营记录
     */
    public SmBusinessRecordVo selectSmBusinessRecordById(Long id);

    /**
     * 查询经营记录列表
     *
     * @param smBusinessRecord 经营记录
     * @return 经营记录集合
     */
    public List<SmBusinessRecordVo> selectSmBusinessRecordList(SmBusinessRecordQuery smBusinessRecord);

    /**
     * 新增经营记录
     *
     * @param smBusinessRecord 经营记录
     * @return 结果
     */
    public int insertSmBusinessRecord(SmBusinessRecord smBusinessRecord);

    /**
     * 修改经营记录
     *
     * @param smBusinessRecord 经营记录
     * @return 结果
     */
    public int updateSmBusinessRecord(SmBusinessRecord smBusinessRecord);

    /**
     * 删除经营记录
     *
     * @param id 经营记录主键
     * @return 结果
     */
    public int deleteSmBusinessRecordById(Long id);

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

    /**
     * 查询最后一条数据
     * @param dto
     * @return
     */
    SmBusinessRecordVo selectLatest(SmBusinessRecordQuery dto);

    /**
     * 查询每天最后一条数据
     * @param dto 查询条件
     */
    List<SmBusinessRecordVo> selectDailyLatest(SmBusinessRecordQuery dto);
}
