Commit 75bf5f69 by 任晓松

根据条件获取产品信息

parent 8fed6587
......@@ -68,6 +68,9 @@ class OpProductAPI extends APIBase {
case "getAllProducts":
opResult = await this.productSve.getAllProducts();
break;
case "getProductByWhere":
opResult = await this.productSve.getProductByWhere(pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -520,5 +520,15 @@ class ProductService extends ServiceBase {
})
return system.getResultSuccess(arr);
}
/**
* 根据条件过去产品
* @param actionBody
* @returns {Promise<void>}
*/
async getProductByWhere(actionBody){
let item = await this.dao.findOne(actionBody.whereParams);
return system.getResult(item);
}
}
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