Commit b77c5854 by 任晓松

产品推荐

parent 35699442
......@@ -37,6 +37,9 @@ class ProductAPI extends WEBBase {
case "getProductPrice":
opResult = await this.utilsProductSve.getProductPrice(pobj,pobj.actionBody)
break;
case "getProductRecommend":
opResult = await this.utilsProductSve.getProductRecommend(pobj,pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
}
......
......@@ -80,6 +80,43 @@ class UtilsProductService extends AppServiceBase {
let url = settings.centerAppUrl() + "action/opProduct/springBoard";
return await this.restPostUrl(pobj, url);
}
/**
* 获取推荐产品
* @param pobj
* @param actionBody
* @returns {Promise<void>}
*/
async getProductRecommend(pobj,actionBody){
const type = actionBody.type;
if(!type){
return system.getResult(-1,'type can be not empty')
}
switch (type) {
case 1:
if(!actionBody.companyName){
return system.getResultFail(-1,'companyName can be not empty')
}
break;
case 2:
if(!actionBody.companyName){
return system.getResultFail(-1,'companyName can be not empty')
}
if(!actionBody.productCode){
return system.getResultFail(-1,'productCode can be not empty')
}
break;
case 3:
if(!actionBody.productCode){
return system.getResultFail(-1,'productCode can be not empty')
}
break;
default:
return system.getResultFail(-1,'type 参数错误');
}
let url = settings.centerAppUrl() + "action/opProduct/springBoard";
return await this.restPostUrl(pobj,url);
}
}
module.exports = UtilsProductService;
......@@ -214,7 +214,13 @@ module.exports = function (app) {
}
return res.end("success");
}catch (e) {
var client_ip = system.get_client_ip(req);
logCtl.error({
optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "渠道订单支付通知处理异常",
op: "center-channel/orderNotify/channelPayNotify",
content: "回调参数:req=" + JSON.stringify(req) + "error:" + e.stack,
clientIp: client_ip || ""
});
}
});
......
......@@ -3,6 +3,7 @@
1. [产品列表-根据产品大类获取](#getProductListByOneCode)
1. [产品列表-根据产品二类获取](#getProductListByTwoCode)
1. [产品详情](#getProductDetail)
1. [产品推荐](#getProductRecommend)
## **<a name="getProductListByOneCode"> 产品列表-根据产品大类编码获取</a>**
......@@ -15,7 +16,8 @@
``` javascript
{
"pathCode":"sbfu" //查询的路径:大类code
"pathCode":"sbfu", //查询的路径:大类code
"productName":"工商" // N 产品名称
}
```
......@@ -178,4 +180,173 @@
"requestId": "5913fc3ae97a402e93330c2d488f1f7e"
}
```
## **<a name="getProductRecommend"> 产品推荐</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getProductRecommend
``` javascript
{
"companyName":"科技部测试",// N 公司名称
"productCode":"gszc",// N 产品code
"type":2 //Y 1只查公司的推荐(company_name Y),2公司+产品(product_code Y company_name Y),3只查询产品(product_code Y)
}
```
#### 返回结果 0为成功,否则为失败
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"uapp_id": 26,//平台id--显示不用
"path_code": "/sbfu/sbzc/",//产品路径编码--显示不用
"path_name": "/商标服务/商标注册/",//产品路径名称--显示不用
"item_code": "zzsbzc",//产品code
"item_name": "商标注册【自助申请】",//产品名称
"channel_item_code": "zzsbzc",//渠道产品code
"channel_item_name": "商标注册【自助申请】",//渠道产品名称
"pic_url": "http://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_qft_pi15755163570461.png",//产品的图片
"product_short_desc": "适合熟知商标注册流程的企业用户", //产品的介绍
"product_desc": "[\"自己检索商标,准备官方所需注册材料\",\"提交迅速,及时反馈\",\"全流程跟踪,掌握申请进度\"]", //产品的描述列表
"desc_url": null,//产品介绍图片地址
"icon_url": null,//产品的icon
"productType_id": 2,//产品类型id--显示用不到
"sort": 1,//排序
"pay_code": "zzsbzc-1", //支付价格code
"service_charge": 30,//服务费
"public_expense": 270,//官费
"price": 300,//价格
"price_type": "mj",//定价类型:mj:每件,mc:每次,mt:每天,my:每月,mn:每年,qj:区间
"price_type_name": "每件",//定价类型名称
"price_desc": "每件(10小项)",//定价描述
"min_qty": null,//区间最小值
"max_qty": null//区间最大值
},
{
"product_id": 85,
"uapp_id": 38,
"path_code": "/sbfu/sbzc/",
"path_name": "/商标服务/商标注册/",
"item_code": "zzsbzc",
"item_name": "商标自助注册",
"channel_item_code": "zzsbzc",
"channel_item_name": "商标自助注册",
"pic_url": "",
"product_short_desc": "适合熟知商标注册流程的企业用户",
"product_desc": "[\"自己检索商标,准备官方所需注册材料\",\"提交迅速,及时反馈\",\"全流程跟踪,掌握申请进度\"]",
"desc_url": null,
"icon_url": null,
"productType_id": 63,
"sort": 1,
"pay_code": "zzsbzc-1",
"service_charge": 30,
"public_expense": 270,
"price": 300,
"price_type": "mj",
"price_type_name": "件",
"price_desc": "每件(10小项)",
"additions_desc": null,
"min_qty": null,
"max_qty": null,
"pc_pic_url": "https://mall-image.gongsibao.com/images/202007/thumb_img/2737_thumb_P_1593555482849.jpg",
"pc_desc_url": ""
},
{
"product_id": 86,
"uapp_id": 38,
"path_code": "/sbfu/sbzc/",
"path_name": "/商标服务/商标注册/",
"item_code": "fzsbzc",
"item_name": "商标辅助注册",
"channel_item_code": "fzsbzc",
"channel_item_name": "商标辅助注册",
"pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_3644155747559516320191016635163223322.png",
"product_short_desc": null,
"product_desc": "[\"由专业代理人帮您检索分析,成功率高\",\"为您优化注册方案,全方位保护\",\"代理人全流程服务,24小时拿到官方申请号\"]",
"desc_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_8071566301043178201920193723178zc_11341557742471246201913181431246代理人.jpg",
"icon_url": null,
"productType_id": 63,
"sort": 3,
"pay_code": "fzsbzc-1",
"service_charge": 429,
"public_expense": 270,
"price": 699,
"price_type": "mj",
"price_type_name": "件",
"price_desc": "每件(10小项)",
"additions_desc": null,
"min_qty": null,
"max_qty": null,
"pc_pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_3644155747559516320191016635163223322.png",
"pc_desc_url": "[{\"descUrl\":\"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_8071566301043178201920193723178zc_11341557742471246201913181431246%E4%BB%A3%E7%90%86%E4%BA%BA.jpg\",\"sort\":1}]"
},
{
"product_id": 87,
"uapp_id": 38,
"path_code": "/sbfu/sbzc/",
"path_name": "/商标服务/商标注册/",
"item_code": "dbsbzc",
"item_name": "商标担保注册",
"channel_item_code": "dbsbzc",
"channel_item_name": "商标担保注册",
"pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_108415573041498072019816299807WX20190508-162857@2x.png",
"product_short_desc": null,
"product_desc": "[\"专业代理人精准评估,风险共担\",\"注册不成功,全额退款\",\"24小时拿到官方申请号\"]",
"desc_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_2594155775291371220191321833712%E9%8E%B7%E5%91%AC%E7%B9%9A%E9%8D%9F%E5%97%98%E7%88%A3%E5%A8%89%E3%84%A5%E5%94%BD.jpg",
"icon_url": null,
"productType_id": 63,
"sort": 5,
"pay_code": "dbsbzc-1",
"service_charge": 1029,
"public_expense": 270,
"price": 1299,
"price_type": "mj",
"price_type_name": "件",
"price_desc": "每件(10小项)",
"additions_desc": null,
"min_qty": null,
"max_qty": null,
"pc_pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_108415573041498072019816299807WX20190508-162857@2x.png",
"pc_desc_url": "[{\"descUrl\":\"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_2594155775291371220191321833712%E9%8E%B7%E5%91%AC%E7%B9%9A%E9%8D%9F%E5%97%98%E7%88%A3%E5%A8%89%E3%84%A5%E5%94%BD.jpg\",\"sort\":1}]"
},
{
"product_id": 116,
"uapp_id": 38,
"path_code": "/gsfu/zcxg/",
"path_name": "/工商服务/注册相关/",
"item_code": "gsdb",
"item_name": "登报",
"channel_item_code": "gsdb",
"channel_item_name": "登报",
"pic_url": "",
"product_short_desc": "公司宝 登报申明 公司注销声明/公司减资声明/原件丢失声明等",
"product_desc": "",
"desc_url": null,
"icon_url": null,
"productType_id": 60,
"sort": 0,
"pay_code": "bjgsdb-1",
"service_charge": 0,
"public_expense": 0,
"price": 200,
"price_type": "mj",
"price_type_name": "件",
"price_desc": "北京",
"additions_desc": null,
"min_qty": null,
"max_qty": null,
"pc_pic_url": "https://mall-image.gongsibao.com/images/202001/thumb_img/0_thumb_P_1579138397162.jpg",
"pc_desc_url": "[{\"descUrl\":\"https://mall-image.gongsibao.com/uploads/image/2019/08/19/783aebc5718a573eff1e267b88fc1f8a.jpg\",\"sort\":1}]"
}
],
"requestId": "c39ee8a924074904b1694dd3bf2d6c4b"
}
```
\ No newline at end of file
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