package com.yiqi.common.enums;

/**
 * @author douya
 * @description 延迟查询时间
 * @date 2022/7/14
 */
public enum RefundQueryTimesEnum {

	one(1, 10 * 1L),

	two(2, 20 * 1L),

	three(3, 30 * 2L),

	four(4, 60 * 10L),

	five(5, 60 * 60L),

	six(6, 60 * 60 * 4L),

	seven(7, 60 * 60 * 6L);


	private Integer num;

	private Long delayTime;

	RefundQueryTimesEnum(Integer num, Long delayTime) {
		this.num = num;
		this.delayTime = delayTime;
	}

	public static Long getDelayTime(Integer queryNum) {
		for (RefundQueryTimesEnum queryTimesEnum : RefundQueryTimesEnum.values()) {
			if (queryTimesEnum.num.equals(queryNum)) {
				return queryTimesEnum.delayTime;
			}
		}
		return one.delayTime;
	}
}
