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 {
"orderNo",
"channelServiceNo",
"channelOrderNo",
"orderServiceNo",
"channelUserId",
"ownerUserId",
"payTime",
......
......@@ -6,6 +6,7 @@ class Push360Service {
constructor() {
this.pushlogDao = system.getObject("db.common.pushlogDao");
this.ordercontactsDao = system.getObject("db.dbcorder.ordercontactsDao");
this.orderinfoDao = system.getObject("db.dbcorder.orderinfoDao");
this.push360Url = settings.push360Url();
this.auth360Url = settings.auth360Url();
}
......@@ -16,12 +17,17 @@ class Push360Service {
if (actionBody.tmStatus == "WAITCOMMIT" || actionBody.tmStatus == "ddj") {
status = 30;
}
if (actionBody.tmStatus == "ROBOT") {
if (actionBody.tmStatus == "ROBOT" || actionBody.tmStatus == "ROBOTPAY") {
status = 40;
}
let order_id = actionBody.orderNo;
try {
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)
if (!rtn || !rtn.stdout) {
return system.getResult(null, "restPost data is empty");
......@@ -43,12 +49,12 @@ class Push360Service {
};
if (!result || !result.stdout) {
logObj["returnType"] = "0";
logObj["opTitle"] = "数据推送ali返回失败";
logObj["opTitle"] = "数据推送360返回失败";
this.pushlogDao.create(logObj);
return system.getResultFail(-502, "execPost data is empty");
} else {
logObj["returnType"] = "1";
logObj["opTitle"] = "数据推送ali返回成功";
logObj["opTitle"] = "数据推送360返回成功";
this.pushlogDao.create(logObj);
let stdout = JSON.parse(result.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