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

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

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

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