解决tp5时间区间连表查询报错的问题 会提示找不到表,经测试只有时间连表查询有bug,别的都没事

解决办法,起别名
$total = $this->model
->alias(['fa_xb_order'=>'xborder'])//解决tp5 连表查询,时间区间查询报错的bug
->with(['xborder','xbordergoods'])
->where($where)
->order($sort, $order)
->count();

$list = $this->model
->alias(['fa_xb_order'=>'xborder'])
->with(['xborder','xbordergoods'])
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();

 

THE END