提交内容:获取token

备注:获取token
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-18 18:40:15 +08:00
parent d089d552e5
commit 678acaa982
2 changed files with 18 additions and 3 deletions

View File

@ -19,7 +19,6 @@ import java.io.InputStreamReader;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
@ -38,7 +37,7 @@ public class ApiService {
private static final String API_ENDPOINT = "/iuap-api-auth/open-auth/selfAppAuth/getAccessToken";
public static String getBIPToken(String domainName) {
String token = null;
String token = "获取失败";
try {
String timestamp = Long.toString(System.currentTimeMillis());
String signature = generateSignature("appKey" + APP_KEY + "timestamp" + timestamp);
@ -81,7 +80,7 @@ public class ApiService {
}
in.close();
token = JSON.parseObject(response.toString()).getJSONObject("data").getString("access_token");
logger.info("响应结果: " + response);
logger.info("响应结果{}\ntoken", response, token);
} catch (Exception e) {
logger.info("getBIPToken错误: " + e);
}

View File

@ -0,0 +1,16 @@
package shkd.sys.sys.plugin.operation;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.sdk.plugin.Plugin;
/**
* 动态表单插件
*/
public class PushTransdetailOperationServicePlugin extends AbstractOperationServicePlugIn implements Plugin {
@Override
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
super.afterExecuteOperationTransaction(e);
}
}