Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
bcd95055
Commit
bcd95055
authored
Apr 13, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改推送记录
parent
7c1e4cb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
100 deletions
+22
-100
center-channel/app/base/service/app.base.js
+22
-100
No files found.
center-channel/app/base/service/app.base.js
View file @
bcd95055
...
...
@@ -60,18 +60,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/restPostUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->restPostUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`推送操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostUrl"
,
null
,
stackStr
);
return
system
.
getResult
(
null
,
stackStr
);
}
}
...
...
@@ -87,18 +78,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/restPostWithHValueUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->restPostWithHValueUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostWithHValueUrl"
,
null
,
stackStr
);
return
system
.
getResult
(
null
,
stackStr
);
}
}
...
...
@@ -111,18 +93,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/restPostWithHAuthorizationUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->restPostWithHAuthorizationUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostWithHAuthorizationUrl"
,
null
,
stackStr
);
return
system
.
getResult
(
null
,
stackStr
);
}
}
...
...
@@ -135,18 +108,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/execPostUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"基类操作异常->execPostUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostWithHAuthorizationUrl"
,
null
,
stackStr
);
return
system
.
getResult
(
null
,
stackStr
);
}
}
...
...
@@ -177,49 +141,13 @@ class AppServiceBase {
var
rtn
=
await
aliyunClient
.
reqCustomByGet
(
params
);
return
rtn
;
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/opAliyunClientPost.js/opAliyunRpcReq"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->opAliyunRpcReq"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
params
.
appInfo
=
pobj
.
appInfo
;
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`推送操作异常-api-center-channel`
,
params
,
"center-channel-opAliyunRpcReq"
,
null
,
stackStr
);
return
system
.
getResult
(
null
,
stackStr
);
}
}
// /**
// * 阿里RPC调用-post请求
// * @param {*} pobj {action: rpcParam.action,reqbody: pobj.actionBody,rpcParam: rpcParam}
// * @param {*} params {为阿里的接口参数}
// */
// async opAliyunRpcReqByPost(pobj, params) {
// try {
// // var action = obj.action;
// // var reqbody = obj.reqbody;
// // var rpcParam = obj.rpcParam;
// var aliyunClient = system.getObject("util.aliyunClient");
// var rtn = await aliyunClient.reqCustomByPost(params);
// return rtn;
// } catch (e) {
// var errorMsg = "error:" + e.stack;
// //日志记录
// this.logCtl.error({
// appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
// appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
// requestId: pobj.requestId || "",
// op: "service/impl/utilsSve/opAliyunClientPost.js/opAliyunRpcReqByPost",
// content: errorMsg,
// // clientIp: pobj.clientIp,
// optitle: pobj.opType + "推送操作异常->opAliyunRpcReqByPost",
// });
// return system.getResult(null, errorMsg);
// }
// }
/**
* 处理成功后的信息
* @param {*} pobj
...
...
@@ -311,11 +239,11 @@ class AppServiceBase {
}
async
getAliossjavaFileUrl
(
pobj
,
params
)
{
//上传ali oss 文件调用
var
opType
=
pobj
.
opType
||
""
;
let
opType
=
pobj
.
opType
||
""
;
try
{
var
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
let
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
if
(
aliOssFileInfo
==
true
)
{
var
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
let
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
return
system
.
getResultSuccess
(
fileUrl
);
}
this
.
pushlogSve
.
createFailLogDb
({
...
...
@@ -331,15 +259,9 @@ class AppServiceBase {
});
return
system
.
getResult
(
null
,
"java ali oss upload fail"
);
}
catch
(
e
)
{
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/getAliossjavaFileUrl"
,
content
:
"error:"
+
e
.
stack
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
||
""
+
"aliossjava-upload阿里上传文件操作异常->getAliossjavaFileUrl"
,
});
params
.
appInfo
=
pobj
.
appInfo
;
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`aliossjava-upload阿里上传文件操作异常-api-center-channel`
,
params
,
"center-channel-getAliossjavaFileUrl"
,
null
,
stackStr
);
return
system
.
getResult
(
-
200
,
"java ali oss upload error"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment