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
4d3c9c68
Commit
4d3c9c68
authored
Aug 24, 2020
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add推送管理
parent
d9cab891
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
0 deletions
+79
-0
center-manage/app/base/controller/impl/common/pushCtl.js
+72
-0
center-manage/app/config/settings.js
+7
-0
No files found.
center-manage/app/base/controller/impl/common/pushCtl.js
0 → 100644
View file @
4d3c9c68
var
system
=
require
(
"../../../system"
)
const
http
=
require
(
"http"
)
const
querystring
=
require
(
'querystring'
);
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
class
PushCtl
extends
CtlBase
{
constructor
()
{
super
(
"common"
,
CtlBase
.
getServiceName
(
PushCtl
));
}
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
let
query
=
{
pageSize
:
pobj
.
pageInfo
.
pageSize
,
pageIndex
:
pobj
.
pageInfo
.
pageNo
};
let
search
=
pobj
.
search
;
if
(
search
.
messageBody
)
query
.
messageBody
=
search
.
messageBody
;
if
(
search
.
identify_code
)
query
.
identifyCode
=
search
.
identify_code
;
if
(
search
.
request_id
)
query
.
requestIdInfo
=
search
.
request_id
;
let
actionType
;
switch
(
pobj
.
bizpath
)
{
case
"/sysmag/pushfail"
:
actionType
=
"getPushFailureList"
;
break
;
case
"/sysmag/pusherror"
:
actionType
=
"getPushErrorList"
;
break
}
let
rtn
=
await
system
.
postJsonTypeReq
(
settings
.
pushUrl
(),
{
"actionType"
:
actionType
,
"actionBody"
:
query
});
if
(
rtn
.
statusCode
===
200
)
{
rtn
=
rtn
.
data
;
if
(
rtn
&&
rtn
.
status
===
1
)
{
return
system
.
getResult
({
results
:
{
count
:
rtn
.
totalCount
,
rows
:
rtn
&&
rtn
.
data
||
[]
}
});
}
else
{
return
system
.
getResultFail
(
rtn
&&
rtn
.
message
||
'请联系管理员'
);
}
}
else
{
return
system
.
getResultFail
(
rtn
)
}
}
async
repush
(
pobj
,
qobj
,
req
)
{
let
rtn
=
await
system
.
postJsonTypeReq
(
settings
.
pushUrl
(),
{
"actionType"
:
"pushAgainFailureLog"
,
"actionBody"
:
{
id
:
pobj
.
id
}
});
if
(
rtn
.
statusCode
===
200
)
{
return
rtn
.
data
;
}
else
{
return
system
.
getResultFail
(
rtn
)
}
}
}
module
.
exports
=
PushCtl
;
center-manage/app/config/settings.js
View file @
4d3c9c68
...
...
@@ -61,6 +61,13 @@ var settings = {
return
"http://logs-sytxpublic-msgq-service.chaolai/api/queueAction/producer/springBoard"
;
}
},
pushUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.18.101:4018/api/queueAction/producer/springBoard"
;
}
else
{
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
}
},
pmappname
:
"center-app"
,
pmappid
:
1
,
pmcompanyid
:
1
,
...
...
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