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

import java.util.List;

import org.springblade.system.client.UserClient;
import org.springblade.system.client.model.UserModel;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author wookvn
 *
 */
@Slf4j
@Component
public class UserClientFallbackFactory implements FallbackFactory<UserClient> {

	@Override
	public UserClient create(Throwable cause) {
		log.error("UserClient invoke fallback:{}", cause.getMessage());
		return new UserClient() {
			@Override
			public UserModel getById(Long id) {
				return null;
			}

			@Override
			public List<UserModel> listByIds(List<Long> ids) {
				return null;
			}

			@Override
			public List<UserModel> listByDeptId(Long deptId) {
				return null;
			}

			@Override
			public String genAccessToken(Long id) {
				return null;
			}

			@Override
			public UserModel getByThirdUserId(String thirdUserId) {
				return null;
			}

			@Override
			public String genToken(Long id,String expireIn) {
				return null;
			}
			@Override
			public List<UserModel> listByRoleId(String roleId){
				return null;
			}
			@Override
			public List<UserModel> listByPostId(String postId){
				return null;
			}

			@Override
			public List<UserModel> listByTenantId(String tenantId) {
				return null;
			}
		};
	}

}
