| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Servers;
- use App\Models\Main\MainShop;
- use Illuminate\Support\Facades\DB;
- /**
- * 商家管理
- */
- class ShopServer
- {
- static private $server = null;
- private function __construct()
- {
- }
- /**
- * 创建对象
- * @return ShopServer
- */
- static function creatServer()
- {
- if (empty(self::$server)) self::$server = new ShopServer();
- return self::$server;
- }
- /**
- * 获取店铺详情
- * @param $shop_id
- * @return MainShop|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Illuminate\Database\Query\Builder|object|null
- */
- function getShopInfo($shop_id){
- //$status 1正常 2闭店
- return MainShop::where('id',$shop_id)->select(['id','shop_name','status','shop_logo','shop_phone','address'])->first();
- }
- }
|