作者 杨育虎

远程覆盖

... ... @@ -161,4 +161,5 @@ class Common extends Api
}
}
}
}
... ...
... ... @@ -349,7 +349,7 @@ class Index extends Api
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 2])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
->field('t.title as ftitle,s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
->select();
foreach ($shangwu2 as $k => $v) {
if ($v['fuser_id'] != null) {
... ... @@ -369,7 +369,7 @@ class Index extends Api
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 3])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as aid,p.name as aname,s.plane_type as aplane_type,s.status as astatus,s.user_id as auser_id')
->field('t.title as atitle,s.id as aid,p.name as aname,s.plane_type as aplane_type,s.status as astatus,s.user_id as auser_id')
->select();
foreach ($shangwu3 as $k => $v) {
if ($v['auser_id'] != null) {
... ... @@ -389,7 +389,7 @@ class Index extends Api
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 4])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as bid,p.name as bname,s.plane_type as bplane_type,s.status as bstatus,s.user_id as buser_id')
->field('t.title as btitle,s.id as bid,p.name as bname,s.plane_type as bplane_type,s.status as bstatus,s.user_id as buser_id')
->select();
foreach ($shangwu4 as $k => $v) {
if ($v['buser_id'] != null) {
... ... @@ -409,7 +409,7 @@ class Index extends Api
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 5])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as cid,p.name as cname,s.plane_type as cplane_type,s.status as cstatus,s.user_id as cuser_id')
->field('t.title as ctitle,s.id as cid,p.name as cname,s.plane_type as cplane_type,s.status as cstatus,s.user_id as cuser_id')
->select();
foreach ($shangwu5 as $k => $v) {
if ($v['cuser_id'] != null) {
... ... @@ -429,7 +429,7 @@ class Index extends Api
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 6])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as did,p.name as dname,s.plane_type as dplane_type,s.status as dstatus,s.user_id as duser_id')
->field('t.title as dtitle,s.id as did,p.name as dname,s.plane_type as dplane_type,s.status as dstatus,s.user_id as duser_id')
->select();
foreach ($shangwu6 as $k => $v) {
if ($v['duser_id'] != null) {
... ... @@ -498,7 +498,7 @@ class Index extends Api
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 2])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
->field('t.title as ftitle,s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
->select();
foreach ($xiawu2 as $k => $v) {
if ($v['fuser_id'] != null) {
... ... @@ -518,7 +518,7 @@ class Index extends Api
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 3])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as aid,p.name as aname,s.plane_type as aplane_type,s.status as astatus,s.user_id as auser_id')
->field('t.title as atitle,s.id as aid,p.name as aname,s.plane_type as aplane_type,s.status as astatus,s.user_id as auser_id')
->select();
foreach ($xiawu3 as $k => $v) {
if ($v['auser_id'] != null) {
... ... @@ -538,7 +538,7 @@ class Index extends Api
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 4])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as bid,p.name as bname,s.plane_type as bplane_type,s.status as bstatus,s.user_id as buser_id')
->field('t.title as btitle,s.id as bid,p.name as bname,s.plane_type as bplane_type,s.status as bstatus,s.user_id as buser_id')
->select();
foreach ($xiawu4 as $k => $v) {
if ($v['buser_id'] != null) {
... ... @@ -558,7 +558,7 @@ class Index extends Api
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 5])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as cid,p.name as cname,s.plane_type as cplane_type,s.status as cstatus,s.user_id as cuser_id')
->field('t.title as ctitle,s.id as cid,p.name as cname,s.plane_type as cplane_type,s.status as cstatus,s.user_id as cuser_id')
->select();
foreach ($xiawu5 as $k => $v) {
if ($v['cuser_id'] != null) {
... ... @@ -578,7 +578,7 @@ class Index extends Api
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 6])
->join('planename p', 'p.id=s.plane_type')
->field('s.id as did,p.name as dname,s.plane_type as dplane_type,s.status as dstatus,s.user_id as duser_id')
->field('t.title as dtitle,s.id as did,p.name as dname,s.plane_type as dplane_type,s.status as dstatus,s.user_id as duser_id')
->select();
foreach ($xiawu6 as $k => $v) {
if ($v['duser_id'] != null) {
... ...
... ... @@ -598,7 +598,7 @@ class Api
if ($is_week == '周一') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ... @@ -607,7 +607,7 @@ class Api
if ($is_week == '周二') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ... @@ -616,7 +616,7 @@ class Api
if ($is_week == '周三') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ... @@ -625,7 +625,7 @@ class Api
if ($is_week == '周四') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ... @@ -634,7 +634,7 @@ class Api
if ($is_week == '周五') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ... @@ -643,7 +643,7 @@ class Api
if ($is_week == '周六') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ... @@ -652,7 +652,7 @@ class Api
if ($is_week == '周日') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
if (!empty($count)) {
if (count($count) > 1) {
if (count($count) > 2) {
$this->error('超过最大可预约次数', 0);
die;
}
... ...