package com.xinquan.user.api.factory; import com.xinquan.common.core.domain.R; import com.xinquan.common.core.utils.page.PageDTO; import com.xinquan.system.api.domain.*; import com.xinquan.system.api.domain.vo.AppUserVO; import com.xinquan.system.api.model.AppCaptchaBody; import com.xinquan.system.api.model.AppLoginUser; import com.xinquan.system.api.model.AppVerifyCellPhoneBody; import com.xinquan.system.api.model.AppWXLoginBody; import com.xinquan.user.api.domain.dto.AppUserDTO; import com.xinquan.user.api.feign.RemoteAppUserService; import java.util.Collection; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; /** * @author mitao * @date 2024/8/21 */ @Component public class RemoteAppUserFallbackFactory implements FallbackFactory { private static final Logger log = LoggerFactory.getLogger(RemoteAppUserFallbackFactory.class); @Override public RemoteAppUserService create(Throwable cause) { return new RemoteAppUserService() { @Override public R addNoticeReplay(NoticeRecord noticeRecord) { return R.fail("后台远程调用 新增回复消息失败"); } @Override public R getAppUserById(String id) { return R.fail("远程调用 根据用户id查询用户信息失败"); } @Override public R> getAppUserByName(String name) { return R.fail("远程调用根据用户名称 查询用户失败"); } @Override public R> getAppUserByNameOrPhone(String name) { return R.fail("远程调用根据用户名称或者电话 查询用户失败"); } @Override public R> queryTag(String name) { return R.fail("远程调用 模糊查询标签列表失败"); } @Override public R getCurrentUser() { return null; } @Override public R> getPayCourse(Integer pageCurr, Integer pageSize) { return R.fail("查询用户已购课程失败"); } @Override public R getCourseStudyHistory(Long chapterId) { return null; } @Override public R> getUserByCourseId(Long courseId) { return R.fail("查询课程加入学习人数"); } @Override public R getUserByCondition(AppUserDTO dto, String source) { return R.fail("获取用户信息失败。"); } @Override public R registerAppUser(AppUserDTO appUserDTO, String source) { return R.fail("APP用户注册失败。"); } @Override public R wxLogin(AppWXLoginBody body, String inner) { return R.fail("APP用户微信登录失败。"); } @Override public R appleLogin(String appleId, String source) { return R.fail("APP用户苹果登录失败。"); } @Override public R appCaptchaLogin(AppCaptchaBody body, String source) { return R.fail("APP用户验证码登录失败。"); } @Override public R verifyCellPhone(AppVerifyCellPhoneBody body, String source) { return R.fail("APP用户微信苹果登录验证手机号失败。"); } @Override public R updateAppUser(AppUserDTO dto, String source) { return R.fail("修改APP用户信息失败。"); } @Override public R> getAppUserList(Collection appUserIdSet, String source) { return R.fail("获取APP用户列表失败。"); } }; } }