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

  async findUnSendIds(limit) {
    let sql = "SELECT id from t_company_taxocr WHERE isSend = 0 LIMIT :limit";
    return await this.customQuery(sql, {limit: limit});
  }

  async findMapByIds(ids) {
    var result = {};
    var sql = "SELECT * FROM `t_company_taxocr` 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[item.id] = item;
    }
    return result;
  }

}
module.exports=TCompanytaxocrDao;
