Commit e5cfa583 by wkliang

fix

parent f1d09e8d
......@@ -29,6 +29,7 @@ class ProductService extends ServiceBase {
return data.id
})
result[i].setDataValue("ids", res)
result[i].setDataValue('price', result[i].price ? result[i].price / 100 : result[i].price)
delete result[i].dataValues.productitems
let resItem = await this.dao.model.findAll({
where: {
......@@ -40,7 +41,7 @@ class ProductService extends ServiceBase {
for (let j = 0; j <= resItem.length; ++j) {
console.log(resItem[j])
if (resItem[j] && resItem[j].price) {
if (resItem[j] && resItem[j].price && resItem[j].price > 0) {
resItem[j].price = resItem[j].price / 100
}
}
......
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