he2802 преди 4 години
родител
ревизия
c902b5fe2a

+ 1 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserController.java

@@ -30,7 +30,7 @@ import java.util.List;
  * @author ruoyi
  * @date 2021-06-08
  */
-@Api(value = "客户端用户控制器", tags = {"客户端用户管理"})
+@Api(value = "用户控制器", tags = {"客户端用户管理"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController
 @RequestMapping("/app/user")

+ 6 - 4
zhongzheng-api/src/main/java/com/zhongzheng/controller/wx/WxLoginController.java

@@ -12,6 +12,7 @@ import com.zhongzheng.framework.web.service.*;
 import com.zhongzheng.modules.system.service.ISysMenuService;
 import com.zhongzheng.modules.user.entity.ClientLoginUser;
 import com.zhongzheng.modules.user.service.IUserService;
+import com.zhongzheng.modules.user.vo.UserVo;
 import com.zhongzheng.modules.wx.bo.WxLoginBody;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -34,6 +35,9 @@ public class WxLoginController
     @Autowired
     private WxTokenService wxTokenService;
 
+    @Autowired
+    private  IUserService iUserService;
+
     /**
      * 登录方法
      *
@@ -85,12 +89,10 @@ public class WxLoginController
      */
     @ApiOperation("登录用户信息")
     @GetMapping("getInfo")
-    public AjaxResult getInfo()
+    public AjaxResult<UserVo> getInfo()
     {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
-        Map<String,Object> map = new HashMap<>();
-        map.put("union_id", loginUser.getUser().getUnionId());
-        return AjaxResult.success(map);
+        return AjaxResult.success(iUserService.queryById(loginUser.getUser().getUserId()));
     }
 
 }