Commit 99cd7f0c by 宋毅

tj

parent 4a85a274
...@@ -76,7 +76,8 @@ class AccessAuthAPI extends APIBase { ...@@ -76,7 +76,8 @@ class AccessAuthAPI extends APIBase {
uapp_key: element.appkey, uapp_key: element.appkey,
pushUrl: element.pushUrl, pushUrl: element.pushUrl,
pushContent: contentData, pushContent: contentData,
pushNumber: element.pushNumber + 1 pushNumber: element.pushNumber + 1,
resultInfo: opResult
} }
} }
self.pushlogSve.addPublicServiceLog(tmpPobj, { clientIp: element.clientIp }); self.pushlogSve.addPublicServiceLog(tmpPobj, { clientIp: element.clientIp });
......
...@@ -52,12 +52,13 @@ class PushlogService extends ServiceBase { ...@@ -52,12 +52,13 @@ class PushlogService extends ServiceBase {
} }
async addPublicServiceLog(pobj, req) { async addPublicServiceLog(pobj, req) {
var sql = "INSERT INTO `igirl_api`.`center_channel_public_servicelog` (`appkey`,`pushUrl`,`pushContent`,`pushNumber`,`clientIp`,created_at)" + var sql = "INSERT INTO `igirl_api`.`center_channel_public_servicelog` (`appkey`,`pushUrl`,`pushContent`,`resultInfo`,`pushNumber`,`clientIp`,created_at)" +
"VALUES(:appkey,:pushUrl,:pushContent,:pushNumber,:clientIp,:created_at)"; "VALUES(:appkey,:pushUrl,:pushContent,:resultInfo,:pushNumber,:clientIp,:created_at)";
var params = { var params = {
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "", appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
pushUrl: pobj.actionBody.pushUrl, pushUrl: pobj.actionBody.pushUrl,
pushContent: JSON.stringify(pobj.actionBody.pushContent), pushContent: pobj.actionBody.pushContent ? JSON.stringify(pobj.actionBody.pushContent) : "",
resultInfo: pobj.actionBody.resultInfo ? JSON.stringify(pobj.actionBody.resultInfo) : "",
pushNumber: pobj.actionBody.pushNumber || 0, pushNumber: pobj.actionBody.pushNumber || 0,
clientIp: req.clientIp || "", clientIp: req.clientIp || "",
created_at: new Date() created_at: new Date()
......
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