Commit 12918f79 by linboxuan

update opSubmitNeed

parent a9878944
...@@ -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,8 +32,15 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -32,8 +32,15 @@ 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;
...@@ -48,6 +55,8 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -48,6 +55,8 @@ class UtilsOpNeedService extends AppServiceBase {
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.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