package com.ruoyi.xq.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.xq.domain.WxTransOrder;
import com.ruoyi.xq.dto.admin.account.WxTransOrderAdminVo;
import com.ruoyi.xq.dto.app.pay.ConsumeResp;
import com.ruoyi.xq.enums.pay.PlatformTypeEnum;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * 微信交换订单Service接口
 *
 * @author 77
 * @date 2024-03-20
 */
public interface WxTransOrderService extends IService<WxTransOrder> {

    WxTransOrder createWxTransOrder(Long userId, Integer wxTransNum);

    WxTransOrder getByOrderNo(String orderNo);

    @Transactional(rollbackFor = Exception.class)
    ConsumeResp doSuccess(String orderNo, Map<String, String> params, String appId, PlatformTypeEnum payTypeEnum);

    Page<WxTransOrderAdminVo> pageAdmin(PageQuery pageQuery, WxTransOrderAdminVo bo);
}
