/**
 * 
 */
package org.springblade.system.client.factory;

import java.util.List;

import org.springblade.system.client.DataPermClient;
import org.springblade.system.client.model.DataPermModel;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * @author wookvn
 *
 */
@Slf4j
@Component
public class DataPermClientFallbackFactory implements FallbackFactory<DataPermClient> {

	@Override
	public DataPermClient create(Throwable cause) {
		log.error("DataPermClient invoke fallback:{}", cause.getMessage());
		return new DataPermClient() {

			@Override
			public DataPermModel getById(Integer id) {
				return null;
			}

			@Override
			public List<DataPermModel> listByIds(List<Integer> ids) {
				return null;
			}

			@Override
			public Boolean checkSuperPermission(Long userId) {
				return null;
			}

		};
	}

}
