<?php

use App\Base\Base;
use App\Services\shop\ShopService;
use App\Exception\custom\ShopException;
class ShopController extends Base
{
    
    /**
     * 创建店铺
     *
     */
    public function add_shopAction()
    {
    	$params = $this->getRequest()->getRequest();
        $shop = ShopService::addShop($params);
        if (!empty($shop)) {
        	$this->success();
        }else{
            throw new ShopException(['cus'=>5]);
        }
    }
    
    /**
     * 门店列表
     *
     */
    public function get_shop_listAction()
    {
        $params = $this->getRequest()->getRequest();
        $subShopList = ShopService::getShopList($params);
        $this->success(['result' => $subShopList]);
    }



}