Commit d7563092 by 宋毅

tj

parent 16972ca1
......@@ -212,6 +212,7 @@ class tmqueryCtl extends CtlBase {
return system.getResultSuccess({ encryptChannelUserId: req.session.userPinInfo.encryptChannelUserId });
}
this.logClient.info("jd","getUserInfo----->req参数:" + JSON.stringify(pobj));
// console.log();
var authUrl = pobj.authUrl;
var authToken = pobj.authToken;
var actionProcess = pobj.actionProcess;
......
......@@ -2,7 +2,7 @@ var childproc = require('child_process');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const uuidv4 = require('uuid/v4');
const system = require("../system");
// const system = require("../system");
class ExecClient {
constructor() {
this.cmdPostPattern = "curl -k -H 'Content-type: application/json' -d '{data}' {url}";
......@@ -10,7 +10,7 @@ class ExecClient {
this.cmdPostTK = "curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}";
this.cmdJDPostTK = "curl -k -H 'Content-type:text/plain;charset=UTF-8' -H 'metadata:true' -H 'Authorization:{tk}' -d '{data}' {url}";
this.logClient = system.getObject("util.logClient");
// this.logClient = system.getObject("util.logClient");
}
getUUID() {
var uuid = uuidv4();
......@@ -22,7 +22,8 @@ class ExecClient {
var result = await this.exec(cmd, {
maxBuffer: 1024 * 1024 * 15
});
this.logClient.info("jd", "getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->result:" + result.stdout);
console.log("getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->result:" + result.stdout);
// this.logClient.info("jd", "getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->result:" + result.stdout);
var rtn = result.stdout;
if (rtn) {
return JSON.parse(rtn);
......@@ -35,8 +36,8 @@ class ExecClient {
var requestId = this.getUUID();
var cmd = this.cmdJDPostTK.replace(/\{data\}/g,
data).replace(/\{url\}/g, url).replace(/\{tk\}/g, token);
console.log(cmd);
this.logClient.info("jd", "getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->" + cmd);
console.log("getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->" + cmd);
// this.logClient.info("jd", "getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->" + cmd);
return cmd;
}
async execPostTK(subData, url, token) {
......
......@@ -10,7 +10,7 @@
"type": "file",
"filename": "logs/infoFile/info",
"encoding": "utf-8",
"maxLogSize": 10000,
"maxLogSize": 1000000,
"backups": 5,
"pattern": "-yyyy-MM-dd-hh.log",
"category": "info_file"
......@@ -19,7 +19,7 @@
"type": "file",
"filename": "logs/errorFile/error",
"encoding": "utf-8",
"maxLogSize": 10000,
"maxLogSize": 1000000,
"backups": 5,
"pattern": "-yyyy-MM-dd-hh.log",
"category": "error_file"
......
......@@ -2,7 +2,7 @@
var system = require("../../base/system");
var metaCtl = system.getObject("web.common.metaCtl");
var tmqueryCtl = system.getObject("web.trademark.tmqueryCtl");
var logClient = system.getObject("util.logClient");
// var logClient = system.getObject("util.logClient");
module.exports = function (app) {
app.get("/jdtm/getUser", async function (req, res) {
try {
......@@ -32,7 +32,8 @@ module.exports = function (app) {
var skipUrl = "/#/jd/" + params.state + "?channelUserId=" + encodeURIComponent(userItemResult.data.encryptChannelUserId);
res.redirect(skipUrl);
} catch (error) {
this.logClient.error("jd", "req---->/jdtm/getUser---->error:" + error.stack);
console.log("req---->/jdtm/getUser---->error:" + error.stack);
// logClient.error("jd", "req---->/jdtm/getUser---->error:" + error.stack);
}
});
app.get("/jdtm/getUserTest", async function (req, res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment