Commit 0d0a2167 by linboxuan

lin update

parent 65f2e8fe
...@@ -801,6 +801,32 @@ class UtilsOrderService extends AppServiceBase { ...@@ -801,6 +801,32 @@ class UtilsOrderService extends AppServiceBase {
async tmAccept(pobj) {// 2020 0828 lin 新增 ali商标交易 创建订单接口 async tmAccept(pobj) {// 2020 0828 lin 新增 ali商标交易 创建订单接口
try { try {
var actionBody = pobj.actionBody; var actionBody = pobj.actionBody;
// 检查商标注册号是否为上架
pobj.actionType = "tmStatusCheck";
pobj.actionBody.code = pobj.actionBody.registerNumber;
var url = settings.centerTmtransactionUrl() + "tmtransaction/action/trademarktransaction/springBoard";
var tmStatusCheckResult = await this.restPostUrl(pobj, url);
if(!tmStatusCheckResult.data) {
var result = {
"errorCode": "error",
"errorMsg": "标源状态不符合",
"module": { "orderNumber": "" },
"requestId": pobj.requestId,
"success": false
}
return result;
}
if(tmStatusCheckResult.data.publish_status != "uppershelf") {
var result = {
"errorCode": "error",
"errorMsg": "标源状态不符合",
"module": { "orderNumber": "" },
"requestId": pobj.requestId,
"success": false
}
return result;
}
//走addOrder流程
pobj.actionType = "getProductDetail"; pobj.actionType = "getProductDetail";
var url = settings.centerAppUrl() + "action/opProduct/springBoard"; var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemResult = await this.restPostUrl(pobj, url); var productItemResult = await this.restPostUrl(pobj, url);
...@@ -822,6 +848,15 @@ class UtilsOrderService extends AppServiceBase { ...@@ -822,6 +848,15 @@ class UtilsOrderService extends AppServiceBase {
var reqUrl = this.centerOrderUrl + "action/order/springBoard"; var reqUrl = this.centerOrderUrl + "action/order/springBoard";
pobj.actionBody.channelOrder.orderStatus = 64;// 2020 0908 lin 新增。64作为orderinfo的orderStatus的值。含义为已付部分款 pobj.actionBody.channelOrder.orderStatus = 64;// 2020 0908 lin 新增。64作为orderinfo的orderStatus的值。含义为已付部分款
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
// 2020 0911 lin 新增 addOrder后修改标源状态
pobj.actionType = "tmStatusUpdate";
pobj.actionBody.tm = [{
id: tmStatusCheckResult.data.id,
code: tmStatusCheckResult.data.code
}]
pobj.actionBody.status = "lowershelf"
var url = settings.centerTmtransactionUrl() + "tmtransaction/action/trademarktransaction/springBoard";
var tmStatusUpdateResult = await this.restPostUrl(pobj, url);
if(result) { if(result) {
var tmResult = { var tmResult = {
"errorCode": "OK", "errorCode": "OK",
......
...@@ -102,6 +102,13 @@ var settings = { ...@@ -102,6 +102,13 @@ var settings = {
return "http://center-app-service/"; return "http://center-app-service/";
} }
}, },
centerTmtransactionUrl: function () {
if (this.env == "dev") {
return "http://centerTmtransactioon.apps.com:4006/";
} else {
return "http://center-app-service/";
}
},
zzzdUrl: function () { zzzdUrl: function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://106.13.228.212:80"; return "http://106.13.228.212:80";
......
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