package com.yc.ship.module.trade.framework.common;


import java.util.List;

/**
 * &#064;Description ：TODO
 * &#064;Author ：qsl
 * &#064;Date ：2025/11/30 09:46
 */
public class ThreadLocalUtil {

    /**
     * 改签明细
     */
    private static final ThreadLocal<List<Long>> changeDetailListThreadLocal = new ThreadLocal<>();

    /**
     * 旅行社ID,目前只有外部旅行社才有
     */
    private static final ThreadLocal<Long> agencyIdHolder = new ThreadLocal<>();

    /**
     * 小程序子产品缓存
     */
    public static void setChangeDetailList(List<Long> changeDetailList) {
        changeDetailListThreadLocal.set(changeDetailList);
    }

    public static List<Long> getChangeDetailList() {
        return changeDetailListThreadLocal.get();
    }

    public static void clearChangeDetailList() {
        changeDetailListThreadLocal.remove();
    }

    public static void setAgencyId(Long agencyId) {
        agencyIdHolder.set(agencyId);
    }

    public static Long getAgencyId() {
        return agencyIdHolder.get();
    }

    public static void clearAgencyId() {
        agencyIdHolder.remove();
    }

}
