diff --git a/app/api/controller/store/StoreController.php b/app/api/controller/store/StoreController.php new file mode 100644 index 000000000..4d378a6cd --- /dev/null +++ b/app/api/controller/store/StoreController.php @@ -0,0 +1,17 @@ +dataLists(new SystemStoreLists()); + } + + +} \ No newline at end of file diff --git a/app/api/lists/store/SystemStoreLists.php b/app/api/lists/store/SystemStoreLists.php new file mode 100644 index 000000000..672c7f404 --- /dev/null +++ b/app/api/lists/store/SystemStoreLists.php @@ -0,0 +1,71 @@ + ['phone'], + '%like%' => ['name'], + ]; + } + + + /** + * @notes 获取门店列表列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author admin + * @date 2024/05/31 17:45 + */ + public function lists(): array + { + $where[]=['is_show','=',YesNoEnum::YES]; + return SystemStore::where($this->searchWhere)->where($where) + ->field(['id', 'name', 'phone', 'detailed_address', 'image', 'is_show', + 'day_time','is_store','latitude','longitude' + ]) + ->limit($this->limitOffset, $this->limitLength) + ->order(['id' => 'desc']) + ->select() + ->toArray(); + } + + + /** + * @notes 获取门店列表数量 + * @return int + * @author admin + * @date 2024/05/31 17:45 + */ + public function count(): int + { + $where[]=['is_show','=',YesNoEnum::YES]; + return SystemStore::where($this->searchWhere)->where($where)->count(); + } + +} \ No newline at end of file