package com.yonge.cooleshow.portal.service;

import com.yonge.cooleshow.mbg.model.UserOrderPayment;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Description
 *
 * @author liujunchi
 * @date 2022-04-24
 */
public interface UserOrderPaymentService {

    /**
     * 保存订单记录
     *
     * @param userOrderPayment
     */
    @Transactional
    void save(UserOrderPayment userOrderPayment);

    @Transactional
    void saveOrUpdate(UserOrderPayment userOrderPayment);

    /**
     * 根据订单查询 订单支付信息
     *
     * @param orderSn 订单号
     * @return
     */
    List<UserOrderPayment> getByOrderNo(String orderSn);

    /**
     * 查询支付中的订单， 最多只有一个
     *
     * @param orderSn
     * @return
     */
    UserOrderPayment getByOrderNoAndStatusPaying(String orderSn);

    /**
     * 查询回调支付信息
     */
    UserOrderPayment getByAdapayNo(String paymentNo);
}
