Commit f1d09e8d by wkliang

fty

parent 94be3fef
...@@ -34,8 +34,16 @@ class ProductService extends ServiceBase { ...@@ -34,8 +34,16 @@ class ProductService extends ServiceBase {
where: { where: {
id: { [this.db.Op.in]: res } id: { [this.db.Op.in]: res }
}, },
attributes: ['id', 'product_name', 'price'] attributes: ['id', 'product_name', 'price'],
raw: true
}) })
for (let j = 0; j <= resItem.length; ++j) {
console.log(resItem[j])
if (resItem[j] && resItem[j].price) {
resItem[j].price = resItem[j].price / 100
}
}
result[i].setDataValue('items', resItem) result[i].setDataValue('items', resItem)
} }
return result return result
......
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