Commit cd47d22b by 宋毅

tj

parent 190a3954
...@@ -5,6 +5,7 @@ class ProductAPI extends WEBBase { ...@@ -5,6 +5,7 @@ class ProductAPI extends WEBBase {
constructor() { constructor() {
super(); super();
this.utilsOpOrderSve = system.getObject("service.utilsSve.utilsOpOrderSve"); this.utilsOpOrderSve = system.getObject("service.utilsSve.utilsOpOrderSve");
this.utilsPushSve = system.getObject("service.utilsSve.utilsPushSve");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
...@@ -26,8 +27,12 @@ class ProductAPI extends WEBBase { ...@@ -26,8 +27,12 @@ class ProductAPI extends WEBBase {
pobj.requestId = req.requestId; pobj.requestId = req.requestId;
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "closeAliTrademarkApplication"://关闭阿里自主申请 case "closeAliTrademarkApplication"://关闭阿里自主申请actionBody:{product_id:产品id,parentCode:商标申请实例id}
opResult = await this.utilsOpOrderSve.updateContacts(pobj, pobj.actionBody); var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj, pobj.actionBody.product_id);
if (pushInterfaceResult.status != 0) {
pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
}
break; break;
case "updateContacts"://修改订单联系人 case "updateContacts"://修改订单联系人
opResult = await this.utilsOpOrderSve.updateContacts(pobj, pobj.actionBody); opResult = await this.utilsOpOrderSve.updateContacts(pobj, pobj.actionBody);
......
...@@ -20,7 +20,7 @@ class UtilsOpOrderService extends AppServiceBase { ...@@ -20,7 +20,7 @@ class UtilsOpOrderService extends AppServiceBase {
var productItemInterfaceResult = await this.restPostUrl(getProductInterfaceObj, getProductInterfaceUrl); var productItemInterfaceResult = await this.restPostUrl(getProductInterfaceObj, getProductInterfaceUrl);
return productItemInterfaceResult; return productItemInterfaceResult;
} }
async updateContacts(pobj, actionBody) { async updateContacts(pobj, actionBody) {//修改联系人
if (!actionBody.orderNo) { if (!actionBody.orderNo) {
return system.getResult(null, "actionBody.orderNo can not be empty,100310"); return system.getResult(null, "actionBody.orderNo can not be empty,100310");
} }
...@@ -30,7 +30,7 @@ class UtilsOpOrderService extends AppServiceBase { ...@@ -30,7 +30,7 @@ class UtilsOpOrderService extends AppServiceBase {
result.data = null; result.data = null;
return result; return result;
} }
async updateTmOrder(pobj, actionBody) { async updateTmOrder(pobj, actionBody) {//修改商标信息
if (!actionBody.orderNo) { if (!actionBody.orderNo) {
return system.getResult(null, "actionBody.orderNo can not be empty,100320"); return system.getResult(null, "actionBody.orderNo can not be empty,100320");
} }
...@@ -40,7 +40,7 @@ class UtilsOpOrderService extends AppServiceBase { ...@@ -40,7 +40,7 @@ class UtilsOpOrderService extends AppServiceBase {
result.data = null; result.data = null;
return result; return result;
} }
async opUpdatePushInfo(result, pobj, opType) { async opUpdatePushInfo(result, pobj, opType) {//操作商标信息修改推送的操作-本类内部使用
if (result.status == 0 && result.data.orderStatus < 4) { if (result.status == 0 && result.data.orderStatus < 4) {
result.data.appInfo = { result.data.appInfo = {
uapp_id: pobj.appInfo.uapp_id, uapp_id: pobj.appInfo.uapp_id,
...@@ -62,7 +62,6 @@ class UtilsOpOrderService extends AppServiceBase { ...@@ -62,7 +62,6 @@ class UtilsOpOrderService extends AppServiceBase {
} }
} }
async tmConfirm(pobj, actionBody) {//商标方案确认 async tmConfirm(pobj, actionBody) {//商标方案确认
if (!actionBody.orderNo) { if (!actionBody.orderNo) {
return system.getResult(null, "actionBody.orderNo can not be empty,100025"); return system.getResult(null, "actionBody.orderNo can not be empty,100025");
...@@ -75,8 +74,7 @@ class UtilsOpOrderService extends AppServiceBase { ...@@ -75,8 +74,7 @@ class UtilsOpOrderService extends AppServiceBase {
} }
return result; return result;
} }
//推送方案确认信息 async pushTmConfirm(result, pobj, actionBody) {//推送方案确认信息
async pushTmConfirm(result, pobj, actionBody) {
var orderdelivery = result.data; var orderdelivery = result.data;
var deliveryContent = orderdelivery.deliveryContent; var deliveryContent = orderdelivery.deliveryContent;
if (deliveryContent) { if (deliveryContent) {
...@@ -105,9 +103,9 @@ class UtilsOpOrderService extends AppServiceBase { ...@@ -105,9 +103,9 @@ class UtilsOpOrderService extends AppServiceBase {
tmpPobj.actionBody.product_info = productItemResult.data; tmpPobj.actionBody.product_info = productItemResult.data;
tmpPobj.actionBody.product_id = tmpPobj.actionBody.product_info.id; tmpPobj.actionBody.product_id = tmpPobj.actionBody.product_info.id;
//获取推送接口并推送 //获取推送接口并推送
var pushINterfaceResult = await this.getProductInterface(pobj.appInfo, tmpPobj.actionBody.product_id); var pushInterfaceResult = await this.getProductInterface(pobj.appInfo, tmpPobj.actionBody.product_id);
if (pushINterfaceResult.status == 0) { if (pushINterfaceResult.status == 0) {
tmpPobj.actionBody.product_info.interface_info = pushINterfaceResult.data; tmpPobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
this.utilsPushSve.pushBusInfo(tmpPobj, "pushOpSolution", 1); this.utilsPushSve.pushBusInfo(tmpPobj, "pushOpSolution", 1);
} }
} }
......
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