Commit 729fad29 by linboxuan

lin pannong

parent 7b6b6b93
...@@ -23,6 +23,28 @@ class edi extends APIBase { ...@@ -23,6 +23,28 @@ class edi extends APIBase {
return result return result
} }
async notify(pobj,query,req) {
console.log(pobj);
// 校验必填 pannong 2.1
var checkResult = await this.serviceNotifyCheck(pobj,req.headers);
if(checkResult.status != 0) {
return checkResult;
}
var qobj = {appInfo:pobj.appInfo};
qobj.actionBody = pobj;
var result = await this.utilsServiceSve.notifyService(qobj,qobj.actionBody,req);
return result
}
async notice(pobj,query,req) {
console.log("/api/opreceive/service/notice",pobj)
if(!pobj.actionType) {
return system.getResult(null, "pobj.actionType cannot be empty");
}
var result = await this.utilsServiceSve.noticeService(pobj,pobj.actionBody,req);
return result
}
async serviceCreateCheck(pobj,headers) { async serviceCreateCheck(pobj,headers) {
if(!headers.appkey) { if(!headers.appkey) {
return system.getResult(null, "headers.appkey cannot be empty"); return system.getResult(null, "headers.appkey cannot be empty");
...@@ -72,5 +94,23 @@ class edi extends APIBase { ...@@ -72,5 +94,23 @@ class edi extends APIBase {
return system.getResultSuccess() return system.getResultSuccess()
} }
async serviceNotifyCheck(pobj,headers) {
if(!headers.appkey) {
return system.getResult(null, "headers.appkey cannot be empty");
}
if(!headers.sign) {
return system.getResult(null, "headers.sign cannot be empty");
}
if(!pobj.bizId) {
return system.getResult(null, "bizId cannot be empty");
}
if(!pobj.status) {
return system.getResult(null, "status cannot be empty");
}
if(pobj.status != 4 && pobj.status != 8 && pobj.status != 16) {
return system.getResult(null, "status error");
}
return system.getResultSuccess()
}
} }
module.exports = edi; module.exports = edi;
\ No newline at end of file
...@@ -104,7 +104,7 @@ class SignService{ ...@@ -104,7 +104,7 @@ class SignService{
} }
} }
module.exports = SignService; module.exports = SignService;
var task = new SignService(); // var task = new SignService();
// var obj = { // var obj = {
// "intentionBizId": "TRE-nmnHtEoTjeEtest", // "intentionBizId": "TRE-nmnHtEoTjeEtest",
...@@ -134,6 +134,11 @@ var task = new SignService(); ...@@ -134,6 +134,11 @@ var task = new SignService();
// "companyArea":"北京" // "companyArea":"北京"
// } // }
// } // }
// var obj = {
// "bizId":"202011031421",
// "status":"16"
// }
// task.createSign(obj,"7cbb892450174167b5c7e01we4717z51").then(d=>{ // task.createSign(obj,"7cbb892450174167b5c7e01we4717z51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!"); // console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// }); // });
\ No newline at end of file
...@@ -19,6 +19,6 @@ module.exports = { ...@@ -19,6 +19,6 @@ module.exports = {
"putUserPwdByMobile", "icpNotifyNew" "putUserPwdByMobile", "icpNotifyNew"
], ],
apiMustUserpinList: ["submitNeed", "paySuccess", "icpNotify", "getLoginInfo", "icpNotifyNew", "submitIcpProgramme","serviceProviderSubmitMaterial","abolishIcpProgramme","submitService"], apiMustUserpinList: ["submitNeed", "paySuccess", "icpNotify", "getLoginInfo", "icpNotifyNew", "submitIcpProgramme","serviceProviderSubmitMaterial","abolishIcpProgramme","submitService"],
apiSecretPathList: ["/api/icp/consultation/submit","/api/icp/feedback/submit","/api/icp/order/notify","/api/opreceive/service/create"] apiSecretPathList: ["/api/icp/consultation/submit","/api/icp/feedback/submit","/api/icp/order/notify","/api/opreceive/service/create","/api/opreceive/service/notify"]
} }
} }
...@@ -442,7 +442,7 @@ module.exports = function (app) { ...@@ -442,7 +442,7 @@ module.exports = function (app) {
} }
} }
if (["getAppTokenByHosts", "getAppTokenByAppKey", "getTmNclFilterSearch"].indexOf(req.body.actionType) >= 0) { if (["getAppTokenByHosts", "getAppTokenByAppKey", "getTmNclFilterSearch","feedback"].indexOf(req.body.actionType) >= 0) {
req.body.actionBody.appHosts = req.host; req.body.actionBody.appHosts = req.host;
next(); next();
return; return;
......
...@@ -354,6 +354,23 @@ var settings = { ...@@ -354,6 +354,23 @@ var settings = {
} else { } else {
return "15754717260";// 7.7修改正式环境优客 辅助/担保订单推送业务员手机号 刘文悦 return "15754717260";// 7.7修改正式环境优客 辅助/担保订单推送业务员手机号 刘文悦
} }
},
pannongServiceConfig: function() {
if (this.env == "dev") {
return {
appid: "10015683988",
appkey: "b74b73acf78cc2851aa559e93c84f7888adq23we"
}
} else {
// 2020 1106 lin 正式环境还未给出
}
},
pannongUrl: function() {
if (this.env == "dev") {
return "http://39.101.172.142:8980/"
} else {
// 2020 1106 lin 正式环境还未给出
}
} }
}; };
module.exports = settings; module.exports = settings;
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