Commit 12decffd by 任晓松

update360推送

parent 814bc6da
...@@ -6,6 +6,7 @@ class Push360Service { ...@@ -6,6 +6,7 @@ class Push360Service {
constructor() { constructor() {
this.pushlogDao = system.getObject("db.common.pushlogDao"); this.pushlogDao = system.getObject("db.common.pushlogDao");
this.ordercontactsDao = system.getObject("db.dbcorder.ordercontactsDao"); this.ordercontactsDao = system.getObject("db.dbcorder.ordercontactsDao");
this.orderinfoDao = system.getObject("db.dbcorder.orderinfoDao");
this.push360Url = settings.push360Url(); this.push360Url = settings.push360Url();
this.auth360Url = settings.auth360Url(); this.auth360Url = settings.auth360Url();
} }
...@@ -16,12 +17,17 @@ class Push360Service { ...@@ -16,12 +17,17 @@ class Push360Service {
if (actionBody.tmStatus == "WAITCOMMIT" || actionBody.tmStatus == "ddj") { if (actionBody.tmStatus == "WAITCOMMIT" || actionBody.tmStatus == "ddj") {
status = 30; status = 30;
} }
if (actionBody.tmStatus == "ROBOT") { if (actionBody.tmStatus == "ROBOT" || actionBody.tmStatus == "ROBOTPAY") {
status = 40; status = 40;
} }
let order_id = actionBody.orderNo; let order_id = actionBody.orderNo;
try { try {
var rc = system.getObject("util.execClient"); var rc = system.getObject("util.execClient");
let orderItem = await this.orderinfoDao.getItemByOrderNo(order_id);
let totalNo = orderItem.orderServiceNo;
if(totalNo){
order_id = totalNo;
}
let rtn = await rc.exec360GetToken(this.auth360Url) let rtn = await rc.exec360GetToken(this.auth360Url)
if (!rtn || !rtn.stdout) { if (!rtn || !rtn.stdout) {
return system.getResult(null, "restPost data is empty"); return system.getResult(null, "restPost data is empty");
......
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