Commit 3192b303 by linboxuan

lin add getGatewayPushFailLogList

parent b05ec69a
...@@ -2,29 +2,39 @@ const CtlBase = require("../../ctl.base"); ...@@ -2,29 +2,39 @@ const CtlBase = require("../../ctl.base");
var system = require("../../../system"); var system = require("../../../system");
class PushlogCtl extends CtlBase { class PushlogCtl extends CtlBase {
constructor() { constructor() {
super("qifutong", CtlBase.getServiceName(PushlogCtl)); super("qifutong", CtlBase.getServiceName(PushlogCtl));
}
// 获取 推送 log信息
async getPushFailLogList(pobj, qobj, req) {
try {
const rs = await this.service.getPushFailLogList(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
} }
// 获取 推送 log信息 }
async getPushFailLogList(pobj, qobj, req) {
try { async failLogrePush(pobj, qobj, req) {
const rs = await this.service.getPushFailLogList(pobj); if (!pobj.id) {
return system.getResult(rs); return system.getResult(null, "id can not be empty,100290");
} catch (err) { }
return system.getResult(null, err.message) try {
} const rs = await this.service.failLogrePush(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
} }
}
async failLogrePush(pobj, qobj, req) { async getGatewayPushFailLogList(pobj, qobj, req) {
if (!pobj.id) { try {
return system.getResult(null, "id can not be empty,100290"); const rs = await this.service.getGatewayPushFailLogList(pobj);
} return system.getResult(rs);
try { } catch (err) {
const rs = await this.service.failLogrePush(pobj); return system.getResult(null, err.message)
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
} }
}
} }
module.exports = PushlogCtl; module.exports = PushlogCtl;
const ToQiFuTong = require('../../../utils/qifutong/baseClient').getInstance(); const ToQiFuTong = require('../../../utils/qifutong/baseClient').getInstance();
class PushlogService { class PushlogService {
async getPushFailLogList(pobj) { async getPushFailLogList(pobj) {
let { appid = "", likeStr = "" } = pobj; let { appid = "", likeStr = "" } = pobj;
const data = await ToQiFuTong.getPushFailLogList({ const data = await ToQiFuTong.getPushFailLogList({
appid, likeStr appid, likeStr
}); });
return data; return data;
} }
async failLogrePush(pobj) { async failLogrePush(pobj) {
let { content = {}, id } = pobj; let { content = {}, id } = pobj;
const data = await ToQiFuTong.failLogrePush({ const data = await ToQiFuTong.failLogrePush({
content, id content, id
}); });
return data; return data;
} }
async getGatewayPushFailLogList(pobj) {
let { likeParams = "", likeError = "" } = pobj;
const data = await ToQiFuTong.getGatewayPushFailLogList({
likeParams, likeError
});
return data;
}
} }
module.exports = PushlogService; module.exports = PushlogService;
\ No newline at end of file
...@@ -280,6 +280,13 @@ class BaseClient { ...@@ -280,6 +280,13 @@ class BaseClient {
return data; return data;
} }
async getGatewayPushFailLogList(pobj) {
const data = await this.pushQiFuTong('/web/action/opLog/getGatewayPushFailLogList', {
"actionType": "getGatewayPushFailLogList",
"actionBody": pobj
});
return data;
}
// 获取一段时间内的所有日期 // 获取一段时间内的所有日期
......
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