diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/feign/IUserClient.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/feign/IUserClient.java index 99b1f4ea..b260b126 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/feign/IUserClient.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/feign/IUserClient.java @@ -22,6 +22,7 @@ import org.springblade.core.tool.api.R; import org.springblade.system.entity.User; import org.springblade.system.entity.UserInfo; import org.springblade.system.entity.UserOauth; +import org.springblade.system.vo.UserVO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -42,6 +43,7 @@ public interface IUserClient { String USER_INFO = API_PREFIX + "/user-info"; String USER_INFO_BY_TYPE = API_PREFIX + "/user-info-by-type"; String USER_INFO_BY_ID = API_PREFIX + "/user-info-by-id"; + String USER_INFO_BY_ID_OWN = API_PREFIX + "/user-info-by-id-own"; String USER_INFO_BY_ACCOUNT = API_PREFIX + "/user-info-by-account"; String USER_AUTH_INFO = API_PREFIX + "/user-auth-info"; String SAVE_USER = API_PREFIX + "/save-user"; @@ -56,6 +58,15 @@ public interface IUserClient { @GetMapping(USER_INFO_BY_ID) R userInfoById(@RequestParam("userId") Long userId); + /** + * 获取用户信息 + * + * @param userId 用户id + * @return + */ + @GetMapping(USER_INFO_BY_ID_OWN) + R userInfoByIdOwn(@RequestParam("userId") Long userId); + /** * 根据账号获取用户信息 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java b/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java index 7f5baf7f..c613bf2d 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java @@ -28,7 +28,7 @@ import org.springblade.core.launch.constant.AppConstant; public class SystemApplication { public static void main(String[] args) { - BladeApplication.run(AppConstant.APPLICATION_SYSTEM_NAME, SystemApplication.class, args); + BladeApplication.run(AppConstant.APPLICATION_SYSTEM_NAME.concat("-cyz"), SystemApplication.class, args); } } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java index 3229ac8f..43ae79c6 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java @@ -18,6 +18,7 @@ package org.springblade.system.feign; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.Condition; import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; @@ -26,6 +27,8 @@ import org.springblade.system.entity.UserInfo; import org.springblade.system.entity.UserOauth; import org.springblade.system.enums.UserEnum; import org.springblade.system.service.IUserService; +import org.springblade.system.vo.UserVO; +import org.springblade.system.wrapper.UserWrapper; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -51,6 +54,15 @@ public class UserClient implements IUserClient { return R.data(service.getById(userId)); } + @Override + @GetMapping(USER_INFO_BY_ID_OWN) + public R userInfoByIdOwn(Long userId) { + User user = new User(); + user.setId(userId); + User detail = service.getOne(Condition.getQueryWrapper(user)); + return R.data(UserWrapper.build().entityVO(detail)); + } + @Override @GetMapping(USER_INFO_BY_ACCOUNT) public R userByAccount(String tenantId, String account) {