IOnlinePaymentDao.java 857 Bytes
package com.diligrp.cashier.trade.dao;

import com.diligrp.cashier.shared.mybatis.MybatisMapperSupport;
import com.diligrp.cashier.trade.domain.PaymentStateDTO;
import com.diligrp.cashier.trade.model.OnlinePayment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * 支付申请数据访问层
 */
@Repository("onlinePaymentDao")
public interface IOnlinePaymentDao extends MybatisMapperSupport {

    void insertOnlinePayment(OnlinePayment payment);

    Optional<OnlinePayment> findByPaymentId(String paymentId);

    int compareAndSetState(PaymentStateDTO paymentDTO);

    List<OnlinePayment> listOnlinePayments(@Param("tradeId") String tradeId, @Param("type") Integer type,
                                           @Param("state") Integer state);
}