Commit 2aa7e3a4 by wkliang

fix

parent a778c194
...@@ -65,6 +65,9 @@ class ActionAPI extends APIBase { ...@@ -65,6 +65,9 @@ class ActionAPI extends APIBase {
result = await this.productSve.createOrUpdate(action_body) result = await this.productSve.createOrUpdate(action_body)
break break
case 'getAllDic': case 'getAllDic':
if (!action_body.types) {
delete action_body.types
}
result = await this.productSve.getAllDic(action_body.types) result = await this.productSve.getAllDic(action_body.types)
break; break;
case 'getByIds': case 'getByIds':
......
...@@ -16,9 +16,9 @@ class productDao extends Dao { ...@@ -16,9 +16,9 @@ class productDao extends Dao {
return await this.model.findAndCountAll(params) return await this.model.findAndCountAll(params)
} }
async getByIds (ids, type = [1, 2]) { async getByIds (ids) {
return await this.model.findAll({ return await this.model.findAll({
where: { id: { [this.db.Op.in]: ids }, source_id: 10001, product_type: { [this.db.Op.in]: type } } where: { id: { [this.db.Op.in]: ids }, source_id: 10001}
}) })
} }
......
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