Commit d94009a7 by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents cb8fd482 177e4301
...@@ -18,7 +18,7 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -18,7 +18,7 @@ class UtilsOpNeedService extends AppServiceBase {
} }
/** /**
* 提交需求 h5/pc 通用提交需求接口 * 提交需求 h5/pc 通用提交需求接口 如果需求内容是具体sku价格项 则不适用 目前只有鑫创在用。
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
...@@ -32,19 +32,31 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -32,19 +32,31 @@ class UtilsOpNeedService extends AppServiceBase {
if (opResult.status != 0) { if (opResult.status != 0) {
return system.getResultFail(-5015, "需求类型查询失败"); return system.getResultFail(-5015, "需求类型查询失败");
} }
pobj.actionBody.service_product_id = opResult.data.service_product_id; sobj.actionType = "getProductDetail";
pobj.actionBody.productId = opResult.data.service_product_id; sobj.actionBody.channelItemCode = opResult.data.channel_type_code;
var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var opDetailResult = await this.restPostUrl(sobj, url);
if (opResult.status != 0) {
return system.getResultFail(-5015, "需求类型查询失败");
}
pobj.actionBody.service_product_id = opDetailResult.data.price_list[0].service_code;// 获取skuid skuid应在product price表 代表具体价格项
pobj.actionBody.productId = opResult.data.service_product_id;// productId 注意这里与上面不是相等的值。 productId代表一类产品应在type里
pobj.actionBody.appName = pobj.appInfo.app_name; pobj.actionBody.appName = pobj.appInfo.app_name;
pobj.actionBody.type_code = opResult.data.type_code; pobj.actionBody.type_code = opResult.data.type_code;
pobj.actionBody.type_name = opResult.data.type_name; pobj.actionBody.type_name = opResult.data.type_name;
pobj.actionBody.channel_type_code = opResult.data.channel_type_code; pobj.actionBody.channel_type_code = opResult.data.channel_type_code;
pobj.actionBody.channel_type_name = opResult.data.channel_type_name; pobj.actionBody.channel_type_name = opResult.data.channel_type_name;
pobj.actionBody.phone = pobj.actionBody.mobile;
} }
// 提交需求 // 提交需求
pobj.actionType = "opSubmitNeed"; pobj.actionType = "opSubmitNeed";
var reqUrl = this.centerOrderUrl + "action/opNeed/springBoard"; var reqUrl = this.centerOrderUrl + "action/opNeed/springBoard";
this.execClientNew.execLogs(`推送蜂擎前创建需求信息->opSubmitNeed->channel(opSubmitNeed)`, pobj, "center-channel-UtilsOpNeedService-opSubmitNeed", result, null);
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
pobj.actionBody.idempotentId = result.data.channelNeedNo;
pobj.actionBody.idempotentSource = opResult.data.channel_type_code;
pobj.actionBody.intentionBizId = result.data.channelNeedNo;// 这里用来推送后修改需求状态
this.utilsPushSve.business2Channel(pobj, "pushNeedBusiness"); this.utilsPushSve.business2Channel(pobj, "pushNeedBusiness");
} }
return result; return result;
......
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