From f65fc84efd8f746afe0403631c93e238fe753430 Mon Sep 17 00:00:00 2001 From: xusd <hugeinfo123> Date: Thu, 17 Oct 2024 11:02:13 +0800 Subject: [PATCH] feature:配合待办逻辑,新增根据机构获取机构用户接口 --- dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridUserService.java | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridUserService.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridUserService.java index 23e0946..5cb6066 100644 --- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridUserService.java +++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridUserService.java @@ -7,6 +7,7 @@ import cn.huge.module.grid.domain.vo.*; import cn.huge.module.sys.dto.GridRoleMenuDTO; import cn.huge.module.sys.dto.GridUserRoleDTO; +import cn.huge.module.sys.vo.GridOrgUsersVo; import cn.huge.module.sys.vo.GridRoleMenuVo; import cn.huge.module.sys.vo.GridUserRoleVo; import com.alibaba.fastjson.JSON; @@ -146,4 +147,31 @@ //初始化完成用户信息,返回给前端登录 return R.fail(); } + + public R<List<GridUserVo>> getUserListByOrg(GridOrgUsersVo gridOrgUsersVo) { + String s = null; + HeadVo headVo = initHeadVo(); + GridOrgUserRequestVo requestVo = new GridOrgUserRequestVo(); + requestVo.setHeadVo(headVo); + requestVo.setBodyVo(gridOrgUsersVo); + try { +// log.info("xsdobject:{}",JSON.toJSONString(requestVo)); + // 开发环境 + if (SpringContextUtil.checkDev()) { + log.info("xsdurl:{}",testUrl + "/api/thrid/grid/user/get-org-users"); + s = HttpClientUtils.httpPostRaw(testUrl + "/api/thrid/grid/user/get-org-users", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8"); + }else { + log.info("xsdurl:{}",gridUrl + "/sys/getUserByToken"); + s = HttpClientUtils.httpPostRaw(gridUrl + "/sys/user/getUserListByOrg", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8"); + } + log.info("xsd:{}",s); + } catch (Exception e) { + log.info("xsderror:{}",e.getLocalizedMessage()); + throw new RuntimeException(e); + } + JSONArray data = JSONObject.parseObject(s).getJSONArray("data"); + List<GridUserVo> gridUserVos = data.toJavaList(GridUserVo.class); + return R.ok(gridUserVos); + + } } -- Gitblit v1.8.0