package com.zsElectric.boot.business.service;

import com.zsElectric.boot.business.model.entity.ChargeOrderInfo;
import com.zsElectric.boot.business.model.form.ChargeOrderInfoForm;
import com.zsElectric.boot.business.model.form.applet.AppInvokeChargeForm;
import com.zsElectric.boot.business.model.form.applet.AppStopChargeForm;
import com.zsElectric.boot.business.model.query.ChargeOrderInfoQuery;
import com.zsElectric.boot.business.model.query.applet.AppChargeOrderInfoQuery;
import com.zsElectric.boot.business.model.vo.ChargeOrderInfoVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zsElectric.boot.business.model.vo.applet.AppChargeVO;

/**
 * 充电订单信息服务类
 *
 * @author zsElectric
 * @since 2025-12-17 19:13
 */
public interface ChargeOrderInfoService extends IService<ChargeOrderInfo> {

    /**
     *充电订单信息分页列表
     *
     * @return {@link IPage<ChargeOrderInfoVO>} 充电订单信息分页列表
     */
    IPage<ChargeOrderInfoVO> getChargeOrderInfoPage(ChargeOrderInfoQuery queryParams);

    /**
     * 获取充电订单信息表单数据
     *
     * @param id 充电订单信息ID
     * @return 充电订单信息表单数据
     */
     ChargeOrderInfoForm getChargeOrderInfoFormData(Long id);

    /**
     * 新增充电订单信息
     *
     * @param formData 充电订单信息表单对象
     * @return 是否新增成功
     */
    boolean saveChargeOrderInfo(ChargeOrderInfoForm formData);

    /**
     * 修改充电订单信息
     *
     * @param id   充电订单信息ID
     * @param formData 充电订单信息表单对象
     * @return 是否修改成功
     */
    boolean updateChargeOrderInfo(Long id, ChargeOrderInfoForm formData);

    /**
     * 删除充电订单信息
     *
     * @param ids 充电订单信息ID，多个以英文逗号(,)分割
     * @return 是否删除成功
     */
    boolean deleteChargeOrderInfos(String ids);

    IPage<ChargeOrderInfoVO> getPage(AppChargeOrderInfoQuery queryParams);

    AppChargeVO invokeCharge(AppInvokeChargeForm formData);

    AppChargeVO stopCharge(AppStopChargeForm formData);

    /**
     * 订单结算后的账户余额扣减
     *
     * @param chargeOrderId 充电订单ID
     */
    void orderSettlement(Long chargeOrderId);
}
