package com.yida.data.system.fallback;

import com.yida.data.common.core.annotation.Fallback;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.system.SystemUser;
import com.yida.data.common.core.entity.system.UserRole;
import com.yida.data.system.feign.RemoteUserService;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

@Slf4j
@Fallback
public class RemoteUserUserviceFallback implements FallbackFactory<RemoteUserService> {
    @Override
    public RemoteUserService create(Throwable cause) {
        return new RemoteUserService() {
            @Override
            public ResultBean<SystemUser> getInfoByUsername(String username) {
                return null;
            }

            @Override
            public ResultBean<SystemUser> getInfoByUsernameNoPermission(String username) {
                return null;
            }

            @Override
            public ResultBean<SystemUser> getInfoById(Long id) {
                return null;
            }

            @Override
            public ResultBean<List<SystemUser>> listInfoById(Long[] ids) {
                return null;
            }

            @Override
            public ResultBean<SystemUser> addUser(SystemUser systemUser) {
                return null;
            }

            @Override
            public ResultBean subscribeYidaApp(Long userId, Long schoolId, Integer type) {
                return null;
            }

            @Override
            public ResultBean updateUser(SystemUser systemUser) {
                return null;
            }

            @Override
            public ResultBean delUser(String[] ids) {
                return null;
            }

            @Override
            public ResultBean addUserRole(UserRole[] userRoles) {
                return null;
            }

            @Override
            public ResultBean bindRoleByMobile(String mobile, String roleName) {
                return null;
            }

            @Override
            public ResultBean bindRoleByUser(Long sysUserId, String roleName) {
                return null;
            }

            /**
             * 根据角色名修改用户角色
             *
             * @param userId
             * @param roleNames
             */
            @Override
            public ResultBean updateUserRoleByRoleName(Long userId, List<String> roleNames) {
                return null;
            }
        };
    }
}
