Commit 22e95a19 by 宋毅

Merge branch 'center-app' of gitlab.gongsibao.com:jiangyong/zhichan into center-app

parents 7bf9b2bc 26160aae
......@@ -38,6 +38,9 @@ class OpProductAPI extends APIBase {
case "getaliicProduce"://阿里工商获取产品信息
opResult = await this.productSve.getaliicProduce(pobj.actionBody);
break;
case "getaliicProduce"://阿里icp获取产品信息
opResult = await this.productSve.getaliicpProduce(pobj.actionBody);
break;
case "getProductTypeInfo"://阿里工商获取需求類型
opResult = await this.producttypeSve.getProductTypeInfo(pobj.actionBody, pobj.appInfo);
break;
......
......@@ -63,26 +63,36 @@ class ProductService extends ServiceBase {
}
async getaliicProduce(actionBody) {
console.log(actionBody);
var producesql = "";
if (actionBody.regType == "ali.companyreg") {
var area=actionBody.area||"";
var area = actionBody.area || "";
producesql = "SELECT pc.pay_code payCode,pt.channel_item_code channelItemCode FROM `p_product` pt JOIN p_product_price pc ON pt.id = pc.product_id WHERE pt.channel_item_name LIKE '%" + actionBody.city
+ "%' AND pc.price_desc LIKE '%" + area
+ "%' and pc.additions_desc LIKE '%" + actionBody.companyCategory + "%' ;"
}else{
} else {
producesql = "SELECT pc.pay_code payCode,pt.channel_item_code channelItemCode FROM `p_product` pt JOIN p_product_price pc ON pt.id = pc.product_id WHERE pt.channel_item_name LIKE '%" + actionBody.park
+ "%' AND pc.price_desc LIKE '%" + actionBody.productType + "%' ;"
+ "%' AND pc.price_desc LIKE '%" + actionBody.productType + "%' ;"
}
console.log(producesql);
var produceinfo = await this.customQuery(producesql);
console.log(produceinfo);
if (produceinfo) {
actionBody.payCode = produceinfo[0].payCode;
actionBody.channelItemCode = produceinfo[0].channelItemCode;
}
console.log(actionBody);
return system.getResultSuccess(actionBody);
}
async getaliicpProduce(actionBody) {
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_name LIKE '%" + actionBody.area
+ "%' AND pt.path_code='/zzfw/icpsq/' ";
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);
}
}
module.exports = ProductService;
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