2026-06-24 f4bd1f3c89d906131495a0aca5aaf82966378510
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package cn.iocoder.yudao.module.pay.service.transfer;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.transfer.PayTransferRespDTO;
import cn.iocoder.yudao.module.pay.api.transfer.dto.PayTransferCreateReqDTO;
import cn.iocoder.yudao.module.pay.api.transfer.dto.PayTransferCreateRespDTO;
import cn.iocoder.yudao.module.pay.controller.admin.transfer.vo.PayTransferPageReqVO;
import cn.iocoder.yudao.module.pay.dal.dataobject.transfer.PayTransferDO;
import jakarta.validation.Valid;
 
/**
 * 转账 Service 接口
 *
 * @author jason
 */
public interface PayTransferService {
 
    /**
     * 创建转账单,并发起转账
     *
     * @param reqDTO 创建请求
     * @return 转账单编号
     */
    PayTransferCreateRespDTO createTransfer(@Valid PayTransferCreateReqDTO reqDTO);
 
    /**
     * 获取转账单
     * @param id 转账单编号
     */
    PayTransferDO getTransfer(Long id);
 
    /**
     * 根据转账单号获取转账单
     *
     * @param no 转账单号
     * @return 转账单
     */
    PayTransferDO getTransferByNo(String no);
 
    /**
     * 获得转账单分页
     *
     * @param pageReqVO 分页查询
     * @return 转账单分页
     */
    PageResult<PayTransferDO> getTransferPage(PayTransferPageReqVO pageReqVO);
 
    /**
     * 同步渠道转账单状态
     *
     * @return 同步到状态的转账数量,包括转账成功、转账失败、转账中的
     */
    int syncTransfer();
 
    /**
     * 【单个】同步渠道转账单状态
     *
     * @param id 转账单编号
     */
    void syncTransfer(Long id);
 
    /**
     * 渠道的转账通知
     *
     * @param channelId  渠道编号
     * @param notify     通知
     */
    void notifyTransfer(Long channelId, PayTransferRespDTO notify);
 
}