Commit 055d8b70 by 宋毅

Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order

parents 5c4e8847 895b1072
...@@ -15,6 +15,7 @@ class OrderInfoDao extends Dao { ...@@ -15,6 +15,7 @@ class OrderInfoDao extends Dao {
"orderNo", "orderNo",
"channelServiceNo", "channelServiceNo",
"channelOrderNo", "channelOrderNo",
"orderServiceNo",
"channelUserId", "channelUserId",
"ownerUserId", "ownerUserId",
"payTime", "payTime",
......
...@@ -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");
...@@ -43,12 +49,12 @@ class Push360Service { ...@@ -43,12 +49,12 @@ class Push360Service {
}; };
if (!result || !result.stdout) { if (!result || !result.stdout) {
logObj["returnType"] = "0"; logObj["returnType"] = "0";
logObj["opTitle"] = "数据推送ali返回失败"; logObj["opTitle"] = "数据推送360返回失败";
this.pushlogDao.create(logObj); this.pushlogDao.create(logObj);
return system.getResultFail(-502, "execPost data is empty"); return system.getResultFail(-502, "execPost data is empty");
} else { } else {
logObj["returnType"] = "1"; logObj["returnType"] = "1";
logObj["opTitle"] = "数据推送ali返回成功"; logObj["opTitle"] = "数据推送360返回成功";
this.pushlogDao.create(logObj); this.pushlogDao.create(logObj);
let stdout = JSON.parse(result.stdout); let stdout = JSON.parse(result.stdout);
return system.getResultSuccess(stdout); return system.getResultSuccess(stdout);
......
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