Commit 3410498d by 庄冰

channel

parent add96442
...@@ -22,6 +22,8 @@ module.exports = (db, DataTypes) => { ...@@ -22,6 +22,8 @@ module.exports = (db, DataTypes) => {
productType_id :DataTypes.INTEGER,// 产品类型Id productType_id :DataTypes.INTEGER,// 产品类型Id
productOneType_id :DataTypes.INTEGER,// 产品大类Id productOneType_id :DataTypes.INTEGER,// 产品大类Id
deliveryUrl:DataTypes.STRING(500),// 交付地址 deliveryUrl:DataTypes.STRING(500),// 交付地址
productLogo:DataTypes.STRING(500),// 产品logo
productDesc:DataTypes.STRING(1024),// 产品描述
}, { }, {
paranoid: false,//假的删除 paranoid: false,//假的删除
underscored: true, underscored: true,
......
...@@ -56,7 +56,9 @@ class AppProductService extends ServiceBase { ...@@ -56,7 +56,9 @@ class AppProductService extends ServiceBase {
var pList = await this.dao.model.findAll({ var pList = await this.dao.model.findAll({
where:{productType_id:pProduct.id,app_id:app.id,status:1}, where:{productType_id:pProduct.id,app_id:app.id,status:1},
attributes:["id","app_id","itemCode","itemName","picUrl","channelItemCode","channelItemName", attributes:["id","app_id","itemCode","itemName","picUrl","channelItemCode","channelItemName",
"serviceItemCode","proPrice","serviceCharge","publicExpense","rateConfig","discountsRateConfig"], "serviceItemCode","proPrice","serviceCharge","publicExpense","rateConfig","discountsRateConfig",
"productLogo","productDesc"
],
raw:true raw:true
}); });
return system.getResultSuccess(pList); return system.getResultSuccess(pList);
...@@ -86,7 +88,9 @@ class AppProductService extends ServiceBase { ...@@ -86,7 +88,9 @@ class AppProductService extends ServiceBase {
var pList = await this.dao.model.findAll({ var pList = await this.dao.model.findAll({
where:{productOneType_id:pProduct.id,productType_id:{ [this.db.Op.ne]: 0 },app_id:app.id,status:1}, where:{productOneType_id:pProduct.id,productType_id:{ [this.db.Op.ne]: 0 },app_id:app.id,status:1},
attributes:["id","app_id","itemCode","itemName","picUrl","channelItemCode","channelItemName", attributes:["id","app_id","itemCode","itemName","picUrl","channelItemCode","channelItemName",
"serviceItemCode","proPrice","serviceCharge","publicExpense","rateConfig","discountsRateConfig"], "serviceItemCode","proPrice","serviceCharge","publicExpense","rateConfig","discountsRateConfig",
"productLogo","productDesc"
],
raw:true raw:true
}); });
return system.getResultSuccess(pList); return system.getResultSuccess(pList);
......
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