Commit b8478bdb by 任晓松

腾讯寻求导入

parent 29ff8d65
...@@ -124,6 +124,9 @@ class Need extends APIBase { ...@@ -124,6 +124,9 @@ class Need extends APIBase {
// break; // break;
break; break;
//-----------接入百度ICP------end---------------------------------- //-----------接入百度ICP------end----------------------------------
case "exportNeeds":
opResult = await this.utilsNeedSve.exportNeeds(pobj,req);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -1570,6 +1570,25 @@ class UtilsNeedService extends AppServiceBase { ...@@ -1570,6 +1570,25 @@ class UtilsNeedService extends AppServiceBase {
return rtn; return rtn;
} }
//-----------接入百度ICP------end---------------------------------- //-----------接入百度ICP------end----------------------------------
async exportNeeds(pobj,req){
let url = this.centerOrderUrl + 'action/need/springBoard';
if(!pobj.actionBody.needsArr){
return system.getResultFail(-1,'导入数据不能为空');
}
if(!pobj.actionBody.uapp_id){
return system.getResultFail(-1,'渠道id 不能为空');
}
pobj.actionType = 'bulkCreateNeeds';
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;
}
} }
module.exports = UtilsNeedService; module.exports = UtilsNeedService;
......
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