const system = require("../../../system");
const Dao = require("../../dao.base");
class OorderdeliverDao extends Dao {
  constructor() {
    super(Dao.getModelName(OorderdeliverDao));
  }

  /**
   * 条件查询所有符合条件的产品
   * @param {*} params 
   */
  async listByIds(ids){
    if(!ids || ids.length == 0) {
      return [];
    }
    let sql = [];
    sql.push(`SELECT * FROM o_order_deliver WHERE id in (:deliverIdList)`);
    
    return await this.customQuery(sql.join(" "), {deliverIdList: ids});
  }

  async mapByIds(params) {
    let list = await this.listByIds(params);
    var result = {};
    for(let item of list) {
      result[item.id] = item;
    }
    return result;
  }
}
module.exports = OorderdeliverDao;