package com.ruoyi.ss.timeBill.mapper;

import com.ruoyi.ss.timeBill.domain.TimeBill;
import com.ruoyi.ss.timeBill.domain.TimeBillQuery;
import com.ruoyi.ss.timeBill.domain.TimeBillVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 时长订单Mapper接口
 *
 * @author ruoyi
 * @date 2024-07-24
 */
public interface TimeBillMapper
{
    /**
     * 查询时长订单
     *
     * @param billId 时长订单主键
     * @return 时长订单
     */
    public TimeBillVO selectTimeBillByBillId(Long billId);

    /**
     * 查询时长订单列表
     *
     * @param timeBill 时长订单
     * @return 时长订单集合
     */
    public List<TimeBillVO> selectTimeBillList(@Param("query")TimeBillQuery timeBill);

    /**
     * 新增时长订单
     *
     * @param timeBill 时长订单
     * @return 结果
     */
    public int insertTimeBill(TimeBill timeBill);

    /**
     * 修改时长订单
     *
     * @param timeBill 时长订单
     * @return 结果
     */
    public int updateTimeBill(@Param("data") TimeBill timeBill);

    /**
     * 删除时长订单
     *
     * @param billId 时长订单主键
     * @return 结果
     */
    public int deleteTimeBillByBillId(Long billId);

    /**
     * 批量删除时长订单
     *
     * @param billIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTimeBillByBillIds(Long[] billIds);

    /**
     * 逻辑删除
     */
    int logicDel(@Param("ids") List<Long> billIds);

    /**
     * 条件更新
     */
    int updateByQuery(@Param("data") TimeBill data, @Param("query") TimeBillQuery query);
}
