代码调整

This commit is contained in:
2023-06-15 16:01:50 +08:00
parent d9468d2c5e
commit 4350a2c342
22 changed files with 720 additions and 42 deletions

View File

@@ -31,6 +31,15 @@ public interface UserFeignClient {
@GetMapping("/getUserByName/{loginName}")
HttpResult<UserDTO> getUserByName(@PathVariable("loginName") String loginName);
/**
* 根据手机号查询用户信息
*
* @param phone 登录名
* @return 用户基本信息
*/
@GetMapping("/getUserByPhone/{phone}")
HttpResult<UserDTO> getUserByPhone(@PathVariable("phone")String phone);
/**
* 认证后根据用户名判断用户状态
* @param loginName 登录名
@@ -55,4 +64,6 @@ public interface UserFeignClient {
*/
@PostMapping("/userByIdList")
HttpResult<List<User>> getUserByIdList(@RequestBody List<String> ids);
}

View File

@@ -43,6 +43,12 @@ public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeign
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<UserDTO> getUserByPhone(String phone) {
log.error("{}异常,降级处理,异常为:{}","根据手机号查询用户信息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<Boolean> judgeUserStatus(String loginName) {
log.error("{}异常,降级处理,异常为:{}","认证后根据用户名判断用户状态",cause.toString());