import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';

@Injectable({
  providedIn: 'root'
})
export class MerAccountRecordService {

  constructor(
      private http: HttpClient,
      private common: CommonsService
  ) { }

  /**
   * 查询记录
   *
   * @param params 上传对象
   * @param  callBack   回调
   * @return data 返回结果
   */
  public getRecordList(params: object, callBack) {
    this.http.get(environment.baseUrl + 'merAccountRecord/getRecordList?' + this.common.getWhereCondition(params)).subscribe(data => {
      callBack(data);
    });
  }
}
