package com.fs.utils;

import com.fs.his.domain.FsIntegralOrder;

public class OrderContextHolder {
    private static final ThreadLocal<FsIntegralOrder> CONTEXT = new ThreadLocal<>();

    public static void setIntegralOrder(FsIntegralOrder order) {
        CONTEXT.set(order);
    }

    public static FsIntegralOrder getIntegralOrder() {
        return CONTEXT.get();
    }

    public static boolean hasIntegralOrder() {
        return CONTEXT.get() != null;
    }

    public static void clear() {
        CONTEXT.remove();
    }
}
