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;
|
}
|
}
|