Commit 46e835ec by 兰国旗

baidureg

parent 550f89a6
......@@ -59,6 +59,12 @@ class OpProductAPI extends APIBase {
case "updateProductPrice":
opResult = await this.productSve.updateProductPrice(pobj.actionBody,pobj.appInfo);
break;
//2020-12-17 baidu reg start -----------------
case "getRegProduce"://获取ICP产品信息
opResult = await this.productSve.getRegProduce(pobj.actionBody,pobj.appInfo);
break;
//2020-12-17 baidu reg end -----------------
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -119,6 +119,24 @@ class ProductService extends ServiceBase {
return system.getResultSuccess(actionBody);
}
//baidu reg gongshang 询价 2020-12-17
async getRegProduce(actionBody,appInfo) {
var uapp_id = appInfo && appInfo.uapp_id?appInfo.uapp_id:"";
var producesql = "SELECT pc.pay_code payCode,pt.channel_item_code channelItemCode,pc.price price FROM `p_product` pt JOIN p_product_price pc ON pt.id = pc.product_id WHERE pt.channel_item_code LIKE '%" + actionBody.typeCode
+ "%' AND pc.price_desc='"+actionBody.province+"' ";
if(uapp_id){
producesql = producesql+" and uapp_id="+uapp_id;
}
var produceinfo = await this.customQuery(producesql);
if (produceinfo) {
actionBody.payCode = produceinfo[0].payCode;
actionBody.channelItemCode = produceinfo[0].channelItemCode;
actionBody.price = produceinfo[0].price;
}
return system.getResultSuccess(actionBody);
}
/**
* 工商H5 产品询价
* @param actionBody
......
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