package com.ruoyi.frequency.rechargeorder.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.controller.req.RechargeOrderReq;
import com.ruoyi.frequency.rechargeorder.entity.RechargeOrder;
import com.ruoyi.frequency.rechargeorder.model.result.RechargeOrderCount;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.UserVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 充值余额订单Service接口
 *
 * @author liwenlong
 * @date 2023-10-25
 */
public interface RechargeOrderService extends IService<RechargeOrder>
{
    /**
     * 查询充值余额订单
     *
     * @param id 充值余额订单主键
     * @return 充值余额订单
     */
    public RechargeOrder selectRechargeOrderById(Long id);

    /**
     * 查询充值余额订单列表
     *
     * @param rechargeOrder 充值余额订单
     * @return 充值余额订单集合
     */
    public List<RechargeOrder> selectRechargeOrderList(RechargeOrder rechargeOrder);

    RechargeOrderCount statistics(RechargeOrder rechargeOrder);
    /**
     * 新增充值余额订单
     *
     * @param rechargeOrder 充值余额订单
     * @return 结果
     */
    public int insertRechargeOrder(RechargeOrder rechargeOrder);

    /**
     * 修改充值余额订单
     *
     * @param rechargeOrder 充值余额订单
     * @return 结果
     */
    public int updateRechargeOrder(RechargeOrder rechargeOrder);

    /**
     * 批量删除充值余额订单
     *
     * @param ids 需要删除的充值余额订单主键集合
     * @return 结果
     */
    public int deleteRechargeOrderByIds(Long[] ids);

    /**
     * 删除充值余额订单信息
     *
     * @param id 充值余额订单主键
     * @return 结果
     */
    public int deleteRechargeOrderById(Long id);


    /**
     * 充值
     * @param req
     * @param userVo
     * @return
     */
    ResponseData rechargeOrder(RechargeOrderReq req, UserVo userVo);


    /**
     * 支付宝回调
     * @param request
     * @param response
     * @return
     */
    ResponseData rechargeAliNotify(HttpServletRequest request, HttpServletResponse response);


    /**
     * 微信回调
     * @param request
     * @param response
     * @return
     */
    ResponseData rechargeWxNotify(HttpServletRequest request, HttpServletResponse response);

    ResponseData rechargeLakalaNotify(Map<String, String> paramMap);
}
