Commit 6e741a04 by linboxuan

Default Changelist

parent 57e18e55
...@@ -53,6 +53,12 @@ class ProductAPI extends WEBBase { ...@@ -53,6 +53,12 @@ class ProductAPI extends WEBBase {
case "getAllProducts": case "getAllProducts":
opResult = await this.utilsProductSve.getAllProducts(pobj); opResult = await this.utilsProductSve.getAllProducts(pobj);
break; break;
case "getProducts"://目前用作创建方案时获取当前app的商品(product)
opResult = await this.utilsProductSve.getProducts(pobj);
break;
case "getProductsPrice"://目前用作创建方案时获取当前app的商品的属性(product_price-price_desc)
opResult = await this.utilsProductSve.getProductsPrice(pobj);
break;
case "getAllProductType":// 获取产品大类 case "getAllProductType":// 获取产品大类
opResult = await this.utilsProductSve.getAllProductType(pobj); opResult = await this.utilsProductSve.getAllProductType(pobj);
break; break;
......
...@@ -101,7 +101,8 @@ var regCfg = { ...@@ -101,7 +101,8 @@ var regCfg = {
}, },
//区分渠道的uappid //区分渠道的uappid
uappId : { uappId : {
'baidu':44 'baidu':44,
'zhogxiaowei': 38
}, },
//交付状态 //交付状态
deliverRegStatus:{ deliverRegStatus:{
......
...@@ -74,9 +74,12 @@ class Need extends APIBase { ...@@ -74,9 +74,12 @@ class Need extends APIBase {
case "tmNotifySub"://tm建案成功 case "tmNotifySub"://tm建案成功
opResult = await self.centerorderSve.tmsave(pobj, pobj.actionBody); opResult = await self.centerorderSve.tmsave(pobj, pobj.actionBody);
break; break;
case "writeCommunicationLog"://icp接收方案反馈信息 case "writeCommunicationLog"://写入跟进记录。通用
opResult = await this.utilsNeedSve2.writeCommunicationLog(pobj); opResult = await this.utilsNeedSve2.writeCommunicationLog(pobj);
break; break;
case "queryCommunicationLog"://获取跟进记录。通用
opResult = await this.utilsNeedSve2.queryCommunicationLog(pobj);
break;
case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息 case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息
opResult = await this.utilsNeedSve2.queryExpertApplyCommunicationLogs(pobj); opResult = await this.utilsNeedSve2.queryExpertApplyCommunicationLogs(pobj);
break; break;
......
...@@ -462,6 +462,13 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -462,6 +462,13 @@ class RegCenterOrderService extends AppServiceBase {
return system.getResultFail(-101, pushBaiduRegSolution.msg) return system.getResultFail(-101, pushBaiduRegSolution.msg)
} }
} }
if (needinfo.uapp_id == regCfg.uappId.zhogxiaowei) {
// 2021 1103 lin 等待推送方案地址。确定返回值是什么
var result = await this.restPostUrl(res.data.needsolutions[0], 'http://zhongxiaowei.com/createSolutions');
if (pushBaiduRegSolution.status != 0) {
return system.getResultFail(-101, pushBaiduRegSolution.msg)
}
}
this.logCtl.info({ this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "", appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "", appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
......
...@@ -203,6 +203,15 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -203,6 +203,15 @@ class UtilsNeedService2 extends AppServiceBase {
return getResultSuccess(res); return getResultSuccess(res);
} }
async queryCommunicationLog(pobj) {
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if(result && result.data && result.data.followContent){
return getResultSuccess(result.data.followContent);
}else{
return system.getResult(null, "未查到跟进记录 100500");
}
}
} }
module.exports = UtilsNeedService2; module.exports = UtilsNeedService2;
\ No newline at end of file
...@@ -18,7 +18,7 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -18,7 +18,7 @@ class UtilsOpNeedService extends AppServiceBase {
} }
/** /**
* 提交需求 h5/pc 通用提交需求接口 如果需求内容是具体sku价格项 则不适用 目前只有鑫创在用。 * 提交需求 h5/pc 通用提交需求接口 如果需求内容是具体sku价格项 则不适用 目前只有鑫创and中小微在用。
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
...@@ -30,16 +30,12 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -30,16 +30,12 @@ class UtilsOpNeedService extends AppServiceBase {
var url = settings.centerAppUrl() + "action/opProduct/springBoard"; var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var opResult = await this.restPostUrl(sobj, url); var opResult = await this.restPostUrl(sobj, url);
if (opResult.status != 0) { if (opResult.status != 0) {
return system.getResultFail(-5015, "需求类型查询失败"); return system.getResultFail(-5015, "产品类型查询失败");
} }
sobj.actionType = "getProductDetail"; if (!opResult.data) {
sobj.actionBody.channelItemCode = opResult.data.channel_type_code; return system.getResultFail(-5016, "请检查产品类型编码");
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.service_product_id = opResult.data.service_product_id;// 获取skuid skuid应在product price表 代表具体价格项
pobj.actionBody.productId = opResult.data.service_product_id;// productId 注意这里与上面不是相等的值。 productId代表一类产品应在type里 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;
...@@ -51,8 +47,8 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -51,8 +47,8 @@ class UtilsOpNeedService extends AppServiceBase {
// 提交需求 // 提交需求
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);
this.execClientNew.execLogs(`推送蜂擎前创建需求信息->opSubmitNeed->channel(opSubmitNeed)`, pobj, "center-channel-UtilsOpNeedService-opSubmitNeed", result, null);
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.idempotentSource = opResult.data.channel_type_code;
......
...@@ -155,6 +155,26 @@ class UtilsProductService extends AppServiceBase { ...@@ -155,6 +155,26 @@ class UtilsProductService extends AppServiceBase {
} }
/** /**
* 目前用作创建方案时获取当前app的商品(product)
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any>}
*/
async getProducts(pobj) {
let url = settings.centerAppUrl() + 'action/opProduct/springBoard';
let result = await this.restPostUrl(pobj, url);
return result;
}
/**
* 目前用作创建方案时获取当前app的商品的属性(product_price-price_desc)
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any>}
*/
async getProductsPrice(pobj) {
let url = settings.centerAppUrl() + 'action/opProduct/springBoard';
let result = await this.restPostUrl(pobj, url);
return result;
}
/**
* 获取全部产品大类 * 获取全部产品大类
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any>} * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any>}
*/ */
......
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