package com.ruoyi.ss.timeBill.service;

import com.ruoyi.ss.payBill.domain.vo.DoPayVO;
import com.ruoyi.ss.timeBill.domain.TimeBill;
import com.ruoyi.ss.timeBill.domain.TimeBillQuery;
import com.ruoyi.ss.timeBill.domain.TimeBillVO;
import com.ruoyi.ss.timeBill.domain.dto.TimeBillAddOrderDTO;
import com.ruoyi.ss.timeBill.domain.dto.TimeBillPayDTO;

import java.util.List;

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

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

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

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

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

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

    /**
     * 下单
     */
    String addOrder(TimeBillAddOrderDTO dto);

    /**
     * 查询正在使用中的订单
     */
    List<TimeBillVO> selectUsingList(TimeBillQuery query);

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

    /**
     * 结束使用订单
     */
    int close(TimeBillVO bill);

    /**
     * 根据条件更新数据
     */
    int updateByQuery(TimeBill data, TimeBillQuery query);

    /**
     * 支付订单
     */
    DoPayVO pay(TimeBillPayDTO dto);

}
