|
|
@@ -1211,4 +1211,34 @@ public class AccountUtils {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据营业执照号分页查找该企业的用户
|
|
|
+ * @param spaceUU
|
|
|
+ * @param userUU
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public static String getToken(Long spaceUU, Long userUU) throws Exception {
|
|
|
+ String url = AccountConfig.getUserSaveUrl();
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
+ url = url + "/getToken";
|
|
|
+ String appId = SSOHelper.getSSOService().getConfig().getAppName();
|
|
|
+ ModelMap data = new ModelMap();
|
|
|
+ data.put("spaceUU", spaceUU);
|
|
|
+ data.put("userUU", userUU);
|
|
|
+ HttpUtil.ResponseWrap res = HttpUtil.doGet(url, data);
|
|
|
+ if (!res.isSuccess()) {
|
|
|
+ throw new Exception(res.getContent());
|
|
|
+ } else {
|
|
|
+ ResultWrap result = JSON.parseObject(res.getContent(), ResultWrap.class);
|
|
|
+ if (!result.isSuccess()) {
|
|
|
+ throw new Exception(result.getErrMsg());
|
|
|
+ } else if (result.getContent() != null) {
|
|
|
+ return result.getContent().toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|