| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @Service |
| | |
| | | private String userName; |
| | | @Value("${grid.password:aek8CdcaM}") |
| | | private String passWord; |
| | | private String testUrl = "http://183.2.142.46:9007"; |
| | | private String testUrl = "http://183.2.142.21:9007"; |
| | | |
| | | public R<GridUserVo> getUserInfo(GridTokenVo gridTokenVo) { |
| | | String s = null; |
| | |
| | | requestVo.setHeadVo(headVo); |
| | | requestVo.setBodyVo(gridTokenVo); |
| | | try { |
| | | // log.info("xsdobject:{}",JSON.toJSONString(requestVo)); |
| | | // 开发环境 |
| | | if (SpringContextUtil.checkDev()) { |
| | | log.info("xsdurl:{}",testUrl + "/sys/getUserByToken"); |
| | |
| | | HeadVo headVo = initHeadVo(); |
| | | GridOrgUserRequestVo requestVo = new GridOrgUserRequestVo(); |
| | | requestVo.setHeadVo(headVo); |
| | | List<String> roleIds = new ArrayList<>(); |
| | | roleIds.add("43fc22e6-7276-11ef-a6d1-005056820c5f"); |
| | | roleIds.add("442be8dd-7276-11ef-a6d1-005056820c5f"); |
| | | roleIds.add("679b1846-71c5-11ef-a6d1-005056820c5f"); |
| | | roleIds.add("67affc74-71c5-11ef-a6d1-005056820c5f"); |
| | | gridOrgUsersVo.setRoleIds(roleIds); |
| | | 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"); |
| | | log.info("xsdurl:{}",testUrl + "/api/thrid/grid/user/get-org-users"+JSON.toJSONString(gridOrgUsersVo)); |
| | | s = HttpClientUtils.httpPostRaw(testUrl + "/api/thrid/grid/user/get-org-users", JSON.toJSONString(gridOrgUsersVo), new HashMap<>(), "utf-8"); |
| | | }else { |
| | | log.info("xsdurl:{}",gridUrl + "/sys/getUserByToken"); |
| | | log.info("xsdurl:{}",gridUrl + "/sys/user/getUserListByOrg"); |
| | | s = HttpClientUtils.httpPostRaw(gridUrl + "/sys/user/getUserListByOrg", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8"); |
| | | } |
| | | log.info("xsd:{}",s); |