package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.wrapper.UserPaymentOrderWrapper;

import java.util.List;

/**
 * 平台订单表
 * 2022-12-20 19:09:34
 */
public interface UserPaymentOrderService   {


    /**
     * 分页查询
     * @param page IPage<com.cooleshow.edu.domain.wrapper.UserPaymentOrderWrapper.UserPaymentOrder>
     * @param query UserPaymentOrderWrapper.UserPaymentOrderQuery
     * @return IPage<com.cooleshow.edu.domain.wrapper.UserPaymentOrderWrapper.UserPaymentOrder>
     */
    IPage<UserPaymentOrderWrapper.UserPaymentOrder> selectPage(IPage<UserPaymentOrderWrapper.UserPaymentOrder> page, UserPaymentOrderWrapper.UserPaymentOrderQuery query);


    /**
     * 用户支付订单信息
     * @param transNo 交易流水号
     * @param merOrderNo 订单编号
     * @return UserPaymentOrder
     */
    UserPaymentOrderWrapper.UserPaymentOrder getUserPaymentOrderByOrderNo( String merOrderNo);

    /**
     * 用户支付订单
     * @param userId 用户Id
     * @param merOrderNo 商户订单编号
     * @return UserPaymentOrder
     */
    UserPaymentOrderWrapper.UserPaymentOrder getUserPaymentOrderByUserId(Long userId, String merOrderNo);


    /**
     * 关闭用户支付订单
     * @param id 支付订单Id
     */
    void closeUserPaymentOrder(Long id);


    void updateById(UserPaymentOrderWrapper.UserPaymentOrder order);

    /**
     * 更新订单支付三方
     * @param order UserPaymentOrderWrapper.UserPaymentOrder
     */
    void updatePaymentVendorById(UserPaymentOrderWrapper.UserPaymentOrder order);

    /**
     * 创建订单
     *
     */
    void save(UserPaymentOrderWrapper.UserPaymentOrder orderReq);
}
