TRX 1 year ago
parent
commit
92c4e2bb76

+ 25 - 0
FullCardClient/src/main/java/com/zhongshu/card/client/service/UserFeignService.java

@@ -0,0 +1,25 @@
+package com.zhongshu.card.client.service;
+
+import com.github.microservice.auth.client.example.ExampleConstant;
+import com.zhongshu.card.client.model.feign.ProjectWxPayModel;
+import com.zhongshu.card.client.model.feign.ProjectWxPayParam;
+import com.zhongshu.card.client.ret.ResultContent;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+
+@FeignClient(name = "fullcardserver-trx/userInfo")
+public interface UserFeignService {
+
+    @Operation(summary = "得到用户详情", description = "得到用户详情")
+    @RequestMapping(value = "manager/getUserDetailByUserId", method = RequestMethod.GET)
+    ResultContent<ProjectWxPayModel> getUserDetailByUserId(
+            @Parameter(name = "userId", description = "用户userId")
+            @RequestParam("userId") String userId);
+
+}

+ 12 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/org/UserInfoController.java

@@ -137,4 +137,16 @@ public class UserInfoController {
         param.setState(UserState.Normal);
         return organizationService.getUserOrgList(param);
     }
+
+    //------------------------------------feign start -----------------------------
+
+    @Operation(summary = "得到用户详情", description = "得到用户详情")
+    @RequestMapping(value = {"manager/getUserDetailByUserId"}, method = {RequestMethod.GET})
+    public ResultContent<UserCountModel> getUserDetailByUserId(
+            @Parameter(name = "userId", description = "用户UserId", example = "")
+            @RequestParam("userId") String userId) {
+        return userAccountService.getUserDetail(userId);
+    }
+
+
 }