|
|
@ -9,6 +9,7 @@ use App\Service\v3\Interfaces\CollectStoreServiceInterface; |
|
|
use App\Service\v3\Interfaces\StoreServiceInterface; |
|
|
use App\Service\v3\Interfaces\StoreServiceInterface; |
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
use Psr\Http\Message\ResponseInterface; |
|
|
use Psr\Http\Message\ResponseInterface; |
|
|
|
|
|
use \App\Service\v3\Interfaces\BusinessHoursServiceInterface; |
|
|
|
|
|
|
|
|
class StoreController extends BaseController |
|
|
class StoreController extends BaseController |
|
|
{ |
|
|
{ |
|
|
@ -31,6 +32,12 @@ class StoreController extends BaseController |
|
|
*/ |
|
|
*/ |
|
|
protected $collectService; |
|
|
protected $collectService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Inject |
|
|
|
|
|
* @var BusinessHoursServiceInterface |
|
|
|
|
|
*/ |
|
|
|
|
|
protected $businessHoursService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 商户详情页 |
|
|
* 商户详情页 |
|
|
* 1、商户id用来查询的,还要有user_id |
|
|
* 1、商户id用来查询的,还要有user_id |
|
|
@ -48,4 +55,22 @@ class StoreController extends BaseController |
|
|
$data['goods_types'] = $this->categoryService->allForStore($params['store_id']); |
|
|
$data['goods_types'] = $this->categoryService->allForStore($params['store_id']); |
|
|
return $this->success(['store' => $data]); |
|
|
return $this->success(['store' => $data]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getBusinessHours() |
|
|
|
|
|
{ |
|
|
|
|
|
$storeId = $this->request->input('store_id'); |
|
|
|
|
|
$res = $this->businessHoursService->check($storeId); |
|
|
|
|
|
return $this->success($res); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function updateBusinessHours() |
|
|
|
|
|
{ |
|
|
|
|
|
$storeId = $this->request->input('store_id'); |
|
|
|
|
|
$time1 = $this->request->input('time1',''); |
|
|
|
|
|
$time2 = $this->request->input('time2',''); |
|
|
|
|
|
$time3 = $this->request->input('time3',''); |
|
|
|
|
|
$time4 = $this->request->input('time4',''); |
|
|
|
|
|
$res = $this->businessHoursService->do($storeId,$time1,$time2,$time3,$time4); |
|
|
|
|
|
return $this->success($res); |
|
|
|
|
|
} |
|
|
} |
|
|
} |