作者 wangzhi

xiugai

... ... @@ -465,14 +465,15 @@ class Yuyue extends Api
Db::name('goods_after')->where('plane_type_id', Db::name('plane')->where('id', $v['plane_id'])->value('plane_type_id'))->where('user_id', $v['user_id'])->update(['AfterMinutes' => $GoodsAfter['AfterMinutes'] - 60]);
/*修改预约单*/
Db::name('yuyue')->where('sun_id', $v['id'])->update(['status' => 2, 'type' => 1, 'updatetime' => time()]);
/*发送短信*/
$Mobile = Db::name('user')->where('id', $v['user_id'])->value('mobile');
if (!empty($Mobile) || $Mobile != '') {
$this->SendSms($Mobile, '【猎鹰飞行俱乐部】' . $Params['con']);
}
}
/*修改预约列表*/
Db::name('sun')->where('id', $v['id'])->update(['user_id' => '', 'status' => 2, 'updatetime' => time()]);
// Db::name('sun')->where('id', $v['id'])->update(['user_id' => '', 'status' => 2, 'updatetime' => time()]);
Db::name('sun')->where('id', $v['id'])->update(['status' => 2, 'updatetime' => time()]);
/*发送短信*/
$Mobile = Db::name('user')->where('id', $v['user_id'])->value('mobile');
if (!empty($Mobile) || $Mobile != '') {
$this->SendSms($Mobile, '【猎鹰飞行俱乐部】' . $Params['con']);
}
}
}
$this->success('成功', 1);
... ... @@ -565,20 +566,20 @@ class Yuyue extends Api
$SunInfo = Db::name('sun')->field('s.*')->alias('s')->join('plane p', 'p.id=s.plane_id')->where('p.base_id', $Params['base_id'])->where($Map)->select();
if (!empty($SunInfo)) foreach ($SunInfo as $k => $v) {
if (($this->TimeCrcle($v['id']) > strtotime($Params['start_time'] . ':00') - 1) && ($this->TimeCrcle($v['id']) < strtotime($Params['end_time'] . ':00'))) {
/*发送短信*/
if ($Params['status'] == 1) {
$Bool = $this->Send($v['user_id'], $v['id']);
if ($Bool != false) {
$Mobile = Db::name('user')->where('id', $v['user_id'])->value('mobile');
if (!empty($Mobile) || $Mobile != '') {
$this->SendSms($v['mobile'], '【猎鹰飞行俱乐部】' . $Params['con'] . '空域情况:' . $Params['kong']);
}
}
}
/*修改预约列表*/
Db::name('sun')->where('id', $v['id'])->update(['status' => 1, 'updatetime' => time()]);
}
}
/*发送短信*/
if ($Params['status'] == 1) {
$User = Db::name('user')->where('status', 0)->field('id as user_id,mobile')->select();
foreach ($User as $k => $v) {
// $Bool = $this->Send($v['user_id'], $v['id']);
if(!empty($v['mobile'])){
$this->SendSms($v['mobile'], '【猎鹰飞行俱乐部】' . $Params['con'] . '空域情况:' . $Params['kong']);
}
}
}
$this->success('成功', 1);
}
... ...