You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\Service\v3\Implementations;
use App\Model\v3\Store;use App\Service\v3\Interfaces\StoreServiceInterface;
class StoreService implements StoreServiceInterface{
public function do() { // TODO: Implement do() method.
}
public function check($storeId) { $store = Store::query()->where([ ['id','=',$storeId], ['is_rest','=',0], ['status','=',2] ]) ->select('time1','time2','time3','time4') ->first(); if(!empty($store)){ $nowTime = time(); $time1 = strtotime(($store->time1)); $time2 = strtotime(($store->time2)); if($time1 < $nowTime && $nowTime < $time2){ return true; } $time3 = strtotime(($store->time3)); $time4 = strtotime(($store->time4)); if($time3 < $nowTime && $nowTime < $time4){ return true; } } return false; }
public function undo() { // TODO: Implement undo() method.
}
public function detail($storeId) { return Store::query() ->with('market') ->where('id',$storeId) ->first()->toArray(); }}
|