public boolean consumeDepository(ResourceItem res) {
        boolean flag = false;
        if (res != null && !res.isItemEmpty()) {
            synchronized (instance) {
                if (depository.containsKey(res.getResourceName())
                    && depository.get(res.getResourceName()) >= res.getResourceNum()) {
                    if (depository.get(res.getResourceName()) > res.getResourceNum()) {
                        Integer diff = depository.get(res.getResourceName()) - res.getResourceNum();
                        depository.put(res.getResourceName(), diff);
                    } else {
                        depository.remove(res.getResourceName());//消耗过后资源数目为零直接删除该资源
                    }
                    flag = true;
                } else {
                    log.info("资源不存在或数量不足！");
                }

            }
        } else {
            log.error("入参不能为空", new IllegalArgumentException());
        }
        return flag;
    }