|
@@ -342,8 +342,12 @@ class ApiShopProject extends BaseController
|
|
|
{
|
|
{
|
|
|
$time = $this->request->param('time');
|
|
$time = $this->request->param('time');
|
|
|
$uid = $this->request->param('uid');
|
|
$uid = $this->request->param('uid');
|
|
|
-
|
|
|
|
|
- $rostering = $this->objRostering->details([['time', 'like', '%'.$time.'%'], ['uid', '=', $uid]]);
|
|
|
|
|
|
|
+ $where1 = [];
|
|
|
|
|
+ $where1[]=['time', 'like', '%'.$time.'%'];
|
|
|
|
|
+ if(!empty($uid)){
|
|
|
|
|
+ $where1[]=['uid', '=', $uid];
|
|
|
|
|
+ }
|
|
|
|
|
+ $rostering = $this->objRostering->details($where1);
|
|
|
|
|
|
|
|
if ($rostering->isSuccess()) {
|
|
if ($rostering->isSuccess()) {
|
|
|
$rostering = $rostering->getData();
|
|
$rostering = $rostering->getData();
|
|
@@ -353,7 +357,10 @@ class ApiShopProject extends BaseController
|
|
|
|
|
|
|
|
$Stime = strtotime($time);
|
|
$Stime = strtotime($time);
|
|
|
$Etime = strtotime($time) + 86400;
|
|
$Etime = strtotime($time) + 86400;
|
|
|
- $where[] = ['uid', '=', $uid];
|
|
|
|
|
|
|
+ if(!empty($uid)){
|
|
|
|
|
+ $where[] = ['uid', '=', $uid];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$where[] = ['time', '>=', $Stime];
|
|
$where[] = ['time', '>=', $Stime];
|
|
|
$where[] = ['time', '<=', $Etime];
|
|
$where[] = ['time', '<=', $Etime];
|
|
|
$rostering['reserved'] = [];
|
|
$rostering['reserved'] = [];
|