Commit 21192f3e by 任晓松

importOrders

parent 3f5a6b0e
......@@ -80,6 +80,9 @@ class ProductAPI extends WEBBase {
case "getUsuallyContacts"://查询常用联系人、申请人
opResult = await this.utilsOrderSve.getUsuallyContacts(pobj,pobj.actionBody);
break;
case "importOrders":
opResult = await this.utilsOrderSve.importOrders(pobj,req);
break;
case "pushTest":
opResult = await this.utilsOrderSve.pushTest(pobj,pobj.actionBody);
break;
......
......@@ -285,6 +285,31 @@ class UtilsOrderService extends AppServiceBase {
return result;
}
/**
* 腾讯订单导入
* @param pobj
* @param req
* @returns {Promise<void>}
*/
async importOrders(pobj,req){
let url = this.centerOrderUrl + 'action/order/springBoard';
if(!pobj.actionBody.ordersArr){
return system.getResultFail(-1,'导入数据不能为空');
}
if(!pobj.actionBody.uapp_id){
return system.getResultFail(-1,'渠道id 不能为空');
}
pobj.actionType = 'bulkCreateOrders';
let result = await this.execPostByTimeOut(req,pobj,url,"json",null,60);
if (!result || result.status != 0) {
return system.getResult(null, result.msg);
}
if (!result.data || result.data.status != 0) {
return system.getResult(null, result.data.msg);
}
return result.data.data;
}
async getOrderDetails(pobj, actionBody) {
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
......
......@@ -18,6 +18,7 @@ module.exports = {
"rtSubmitMaterial", "rtNotification", "rtSubmitSolution", "rtCloseNeed", "rtClosePlan",
"getParamsFor360", "addOrderWeb", "getPayRecords", "getLoginInfo", "putUserMobileByVcode",
"putUserPwdByMobile", "icpNotifyNew","getOrderStatisticsByUappId","getOrderStatisticsByProduct","getOrdersComparison","getOrdersComparisonList",
"importOrders","importNeeds",
//百度工商注册
"regGetInfoByChannelNeedNo","submitRegNeed","regFeedbackSubmit","regOrderStatus","regOrderClose",
"getSolutionByChannelOrderNo","regSubmitSolution","regNeedClose",
......
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