const system=require("../../system");
const ServiceBase=require("../sve.base");
class ProfitcenterService extends ServiceBase{
  constructor(){
     super(ServiceBase.getDaoName(ProfitcenterService));
     //this.appDao=system.getObject("db.appDao");
  }
  //获取提现的所有记录
  async findAllwithdrawRecord(obj){
    return this.dao.model.findAll({where:obj,order:[["created_at","desc"]]});
  }
  //获取申请提现的总额
  async getApplyingSum(){
    return this.dao.findSum("totalSum",{where:{opType:"applying"}});
  }
}
module.exports=ProfitcenterService;
