更新修复bug

This commit is contained in:
yaooo 2023-11-28 11:23:49 +08:00
parent 7eec3bb829
commit e34fc42e86
3 changed files with 16 additions and 3 deletions

View File

@ -104,7 +104,11 @@ class LandPlantActionLists extends BaseAdminDataLists implements ListsSearchInte
*/ */
public function count(): int public function count(): int
{ {
return Db::name('land_plant_action')->alias('lpa')->where($this->searchWhere)->where($this->userSearch())->where($this->querySearch())->count(); return Db::name('land_plant_action')->alias('lpa')
->where($this->searchWhere)->where($this->userSearch())->where($this->querySearch())
->leftJoin('user u','u.id = lpa.user_id')
->leftJoin('land_plant lp','lp.id = lpa.plant_id')
->count();
} }
} }

View File

@ -108,7 +108,11 @@ class LandPlantLists extends BaseAdminDataLists implements ListsSearchInterface
*/ */
public function count(): int public function count(): int
{ {
return Db::name('land_plant')->alias('lp')->where($this->searchWhere)->where($this->userSearch())->where($this->querySearch())->count(); return Db::name('land_plant')->alias('lp')
->where($this->searchWhere)->where($this->userSearch())->where($this->querySearch())
->leftJoin('user u','u.id = lp.user_id')
->leftJoin('land l','l.id = lp.land_id')
->count();
} }
} }

View File

@ -103,7 +103,12 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface
*/ */
public function count(): int public function count(): int
{ {
return Db::name('product')->alias('p')->where($this->searchWhere)->where($this->userSearch())->where($this->querySearch())->count(); return Db::name('product')->alias('p')
->where($this->searchWhere)->where($this->userSearch())->where($this->querySearch())
->leftJoin('user u','u.id = p.user_id')
->leftJoin('land_product lp','lp.product_id = p.id')
->leftJoin('land l','l.id = lp.land_id')
->count();
} }
} }