Commit 63b7a8bd by 宋毅

接口修改

parent 9974d222
......@@ -37,7 +37,7 @@ class Consultation extends APIBase {
pobj.mobile = pobj.phone;
// pobj.action_type = "submitIcpNeed";
if (!pobj.area) {
return self.getResultFail("area参数错误");
return system.getResultFailByErrMsg("area参数错误");
}
let param = {
requestId: req.requestId || "",
......
......@@ -19,7 +19,7 @@ class Order extends APIBase {
if (!pobj.orderNo) {
return system.getResultFailByErrMsg("orderNo不能为空");
}
pobj.isDirectBuy = pobj.isDirectBuy || 0;//1是直购,0是下单未付款,算订单未付款需求
pobj.isDirectBuy = pobj.isDirectBuy || 0;//1是直购并付款,0是下单未付款
pobj.status = 1;
if (pobj.isDirectBuy == 1 && !pobj.phone) {
return system.getResultFailByErrMsg("直接下单phone不能为空");
......@@ -37,10 +37,16 @@ class Order extends APIBase {
pobj.area = settings.areaConfig[pobj.area];
// pobj.action_type = "icpOrderStatus";
if (!pobj.area) {
return self.getResultFail("area参数错误");
return system.getResultFailByErrMsg("area参数错误");
}
if (pobj.isDirectBuy == 0) {//下单未付款订单直接创建需求信息
pobj.type = pobj.consultType;
pobj.mobile = pobj.phone;
pobj.intentionBizId = pobj.orderNo;//⽤户咨询编号
pobj.description = "未付款的订单过去的需求,咨询编号为未付款订单号";//⽤户需求信息
}
let param = {
requestId: req.requestId || self.getUUID(),
requestId: req.requestId || "",
// requestUrl: "/icp/order/notify",
requestjson: JSON.stringify(pobj),//请求地址
// pushUrl: "/action/intentionapi/springBoard",//调用地址
......@@ -48,8 +54,8 @@ class Order extends APIBase {
pushtimes: 0,//推送次数
pushStatus: "wts",//推送状态
version: 1,
interface_path: "service.receiveSve.icpOrderSve",//接口路径
interface_method: "submitOrder",//接口方法
interface_path: pobj.isDirectBuy == 1 ? "service.receiveSve.icpOrderSve" : "service.receiveSve.icpNeedSve",//接口路径
interface_method: pobj.isDirectBuy == 1 ? "submitOrder" : "submitNeed",//接口方法
}
await this.gatewaypushlogSve.create(param);
return system.getResultSuccess(null);
......@@ -65,7 +71,7 @@ class Order extends APIBase {
pobj.channelOrderNo = pobj.orderNo;
// pobj.action_type = "icpOrderClose";
let param = {
requestId: req.requestId || self.getUUID(),
requestId: req.requestId || "",
// requestUrl: "/icp/order/close",
requestjson: JSON.stringify(pobj),//请求地址
// pushUrl: "/action/intentionapi/springBoard",//调用地址
......
......@@ -25,7 +25,7 @@ class GatewaypushlogService extends ServiceBase {
try {
var icloginfo = icloginfos[i];
if (icloginfo.version == 1) {
self.newTaskHandle(icloginfo);
await self.newTaskHandle(icloginfo);
continue;
}
var requestdata = null;
......@@ -82,6 +82,8 @@ class GatewaypushlogService extends ServiceBase {
console.log("params..............................................", JSON.stringify(params))
let doRes = await invokeObj[item.interface_method].apply(invokeObj, params);
console.log("newTaskHandle..............................................", JSON.stringify(doRes))
item.pushStatus = "yts";
this.update(item);
return doRes;
}
......
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