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

  async findMapByIds(ids, attrs) {
    var result = [];
    if(!ids || ids.length == 0) {
      return result;
    }

    attrs = attrs || "*";
    var sql = "SELECT " + attrs + " FROM c_dkaggreement where id IN (:ids) ";
    var list = await this.customQuery(sql, {ids:ids});
    if(!list || list.length == 0) {
      return result;
    }

    for(var item of list) {
      result["id_" + item.id] = item;
    }
    return result;
  }
}
module.exports=DKaggreementDao;
