hasWhere
最近项目使用模型关联查询数据,因为模型关联之后返回的数据可以是一对多的数组,使用join链表查询则是返回多条数据,使用模型关联就少不了对关联的模型进行查询。
使用hasWhere 需要注意的是 haswhere只有静态方法 没有->
/**
* 获取未完成接单列表
* @param $user_id
* @return \think\Paginator
* @throws \think\exception\DbException
*/
public function getNotList($user_id = false)
{
return ReceivingModel::hasWh