Commit 993dd16a by 任晓松

增加code

parent 989b7f08
......@@ -57,12 +57,12 @@ class ProductService extends ServiceBase {
* @returns {Promise<void>}
*/
async getProductsByType(pobj){
const type = await this.producttypeDao.findOne({name:pobj.typeName},[]);
const type = await this.producttypeDao.findOne({code:pobj.typeName},[]);
if(!type){
return system.getResultFail(-1,'获取产品类型数据失败');
}
let products = await this.dao.model.findAll({
attributes:["name"],
attributes:["code","name"],
where:{product_type_id:type.id},raw:true
});
return system.getResult(products)
......
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