/**
 * 根据条件查询
 *
 * @param $param
 *
 * @return array|number
 */
public function getByCond( $param ) {
  $default = [
    'field'    => [ '*'],
    'keyword'  => '',
    'status'   => '',
    'with'     => [],
    'page'     => 1,
    'pageSize' => 10,
    'sort'     => 'id',
    'order'    => 'DESC',
    'count'    => FALSE,
    'getAll'   => FALSE
  ];

  $param = extend( $default, $param );

  $model = $this->getModel()->keyword($param['keyword'])->status($param['status']);
  if(!empty($param['with'])){
    $model = $model->with($param['with']);
  }

  if ( $param['count'] ) {
    return $model->count();
  }
  if(!$param['getAll']){
    $data = $model->get()->forPage($param['page'] , $param['pageSize'])->values();
  }else{
    $data = $model->get();
  }
  return $data;
}