wlzboy
6 天以前 fe33646ee6e2d1e57f2b51812e94983a0e9efb04
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
package com.ruoyi.payment.infrastructure.config;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
/**
 * 业务回调配置
 * 
 * @author ruoyi
 */
@Data
@Component
@ConfigurationProperties(prefix = "payment.business")
public class BusinessCallbackConfig {
 
    /** 回调签名密钥 */
    private String callbackSignSecret;
 
    /** 最大重试次数 */
    private Integer callbackRetryMaxCount = 10;
 
    /** 重试间隔(分钟) */
    private String callbackRetryIntervals = "0,1,5,15,60";
 
    /**
     * 获取重试间隔数组
     */
    public int[] getRetryIntervalsArray() {
        String[] parts = callbackRetryIntervals.split(",");
        int[] intervals = new int[parts.length];
        for (int i = 0; i < parts.length; i++) {
            intervals[i] = Integer.parseInt(parts[i].trim());
        }
        return intervals;
    }
}