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
592e7434
Commit
592e7434
authored
Jul 16, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
c66260a3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
center-manage/app/base/api/api.base.js
+1
-1
center-manage/app/base/controller/ctl.base.js
+2
-2
center-manage/app/base/system.js
+1
-1
center-manage/app/base/utils/logClient.js
+3
-3
center-manage/app/config/settings.js
+2
-0
No files found.
center-manage/app/base/api/api.base.js
View file @
592e7434
...
...
@@ -55,7 +55,7 @@ class APIBase{
this
.
logClient
.
log
(
pobj
,
req
,
rtn
)
return
rtn
;
}
catch
(
e
)
{
this
.
logClient
.
log
(
pobj
,
req
,
{}
)
this
.
logClient
.
log
(
pobj
,
req
,
null
,
e
.
stack
)
console
.
log
(
e
.
stack
,
"api调用异常--error..................."
);
var
rtnerror
=
system
.
getResultFail
(
-
200
,
"出现异常,请联系管理员"
);
return
rtnerror
;
...
...
center-manage/app/base/controller/ctl.base.js
View file @
592e7434
...
...
@@ -94,10 +94,10 @@ class CtlBase {
return
system
.
getResultFail
(...
xarg
);
}
var
rtn
=
await
this
[
methodname
](
pobj
,
query
,
req
);
this
.
logClient
.
log
(
pobj
,
req
,
rtn
,
null
,
"center-manger"
)
this
.
logClient
.
log
(
pobj
,
req
,
rtn
,
null
)
return
rtn
;
}
catch
(
e
)
{
this
.
logClient
.
log
(
pobj
,
req
,
null
,
e
.
stack
,
"center-manger"
)
this
.
logClient
.
log
(
pobj
,
req
,
null
,
e
.
stack
)
console
.
log
(
e
.
stack
,
"出现异常,请联系管理员......."
);
return
system
.
getResultFail
(
-
200
,
"出现异常,请联系管理员"
);
}
...
...
center-manage/app/base/system.js
View file @
592e7434
...
...
@@ -276,7 +276,7 @@ class System {
actionBody
:
{
opTitle
:
opTitle
||
""
,
// N 操作的业务标题
identifyCode
:
identifyCode
||
"brg-center-manage"
,
// Y 操作的业务标识
indexName
:
"brg-user-center"
,
// Y es索引值,同一个项目用一个值
indexName
:
settings
.
logindex
,
// Y es索引值,同一个项目用一个值
messageBody
:
params
,
//日志的描述信息
resultInfo
:
isLogData
?
resultInfo
:{
status
:
resultInfo
.
status
},
//返回信息
errorInfo
:
errorInfo
,
//错误信息
...
...
center-manage/app/base/utils/logClient.js
View file @
592e7434
...
...
@@ -13,11 +13,11 @@ class LogClient {
var
u
=
uuid
.
replace
(
/
\-
/g
,
""
);
return
u
;
}
async
log
(
pobj
,
req
,
rtn
ok
,
errinfo
,
appname
)
{
rtn
.
requestId
=
this
.
getUUID
()
async
log
(
pobj
,
req
,
rtn
info
,
errinfo
)
{
rtn
info
.
requestId
=
this
.
getUUID
()
req
.
params
.
param
=
pobj
//第三个字段应该存公司id
system
.
execLogs
(
appname
+
"_"
+
req
.
xctx
.
codetitle
,
req
.
params
,
pobj
.
company_id
,
rtnok
,
errinfo
).
then
(
res
=>
{
system
.
execLogs
(
settings
.
appname
+
"_"
+
req
.
xctx
.
codetitle
,
req
.
params
,
pobj
.
company_id
+
"_"
,
rtninfo
,
errinfo
).
then
(
res
=>
{
if
(
res
&&
res
.
status
==
1
)
{
console
.
log
(
"log.....success"
)
}
else
{
...
...
center-manage/app/config/settings.js
View file @
592e7434
...
...
@@ -18,6 +18,8 @@ var settings = {
defaultpwd
:
"gsb2020"
,
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
port
:
process
.
env
.
NODE_PORT
||
80
,
logindex
:
"center_manage"
,
appname
:
"center_manage"
,
kongurl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
var
localsettings
=
require
(
"./localsettings"
);
...
...
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