Commit 3c1b87e0 by 庄冰

product

parent 2141605f
......@@ -50,7 +50,7 @@ class OpProductAPI extends APIBase {
opResult = await this.productSve.findByTypeOneCode(action_body);
break;
case "getProductDetailByCode"://获取产品详情
opResult = await this.productSve.getProductDetailByCode(action_body.itemCode,pobj.uapp_id);
opResult = await this.productSve.getProductDetailByCode(action_body.channelItemCode,pobj.uapp_id);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
......
......@@ -36,17 +36,17 @@ class ProductService extends ServiceBase {
}
/**
* 获取产品详情2
* @param {*} pcode 产品码
* @param {*} appid 渠道id
* @param {*} channelItemCode 渠道产品码
* @param {*} uappid 渠道id
*/
async getProductDetailByCode(pcode,uappid){
if(!pcode){
async getProductDetailByCode(channelItemCode,uappid){
if(!channelItemCode){
return system.getResult(null, "产品编码有误");
}
if(!uappid){
return system.getResult(null, "渠道编码有误");
}
var sql = "select * from v_product where uapp_id="+uappid+" and item_code='"+pcode+"'";
var sql = "select * from v_product where uapp_id="+uappid+" and channel_item_code='"+channelItemCode+"'";
var tmpResult = await this.customQuery(sql);
if(tmpResult && tmpResult.length>0){
for(var i=0;i<tmpResult.length;i++){
......
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