Commit acb6ff7f by 庄冰

阿里icp获取产品信息区分应用

parent f3ac6d91
......@@ -39,7 +39,7 @@ class OpProductAPI extends APIBase {
opResult = await this.productSve.getaliicProduce(pobj.actionBody);
break;
case "getaliicpProduce"://阿里icp获取产品信息
opResult = await this.productSve.getaliicpProduce(pobj.actionBody);
opResult = await this.productSve.getaliicpProduce(pobj.actionBody,pobj.appInfo);
break;
case "getProductTypeInfo"://阿里工商获取需求類型
opResult = await this.producttypeSve.getProductTypeInfo(pobj.actionBody, pobj.appInfo);
......
......@@ -88,9 +88,13 @@ class ProductService extends ServiceBase {
return system.getResultSuccess(actionBody);
}
async getaliicpProduce(actionBody) {
async getaliicpProduce(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;
......
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