|
|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
|
namespace App\Services\Admin\YeWu;
|
|
|
|
|
|
|
|
|
|
use App\Services\SendMessgeService;
|
|
|
|
|
use DateInterval;
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
@ -309,6 +310,7 @@ WHERE
|
|
|
|
|
|
|
|
|
|
if ($u_mainList) {
|
|
|
|
|
DB::commit();
|
|
|
|
|
$this->SendMsg($oldMainInfos,$do_type);
|
|
|
|
|
return \Yz::Return(true, '预约成功', ['planid' => $planid, 'mainlistids' => $mainlistids]);
|
|
|
|
|
} else {
|
|
|
|
|
DB::rollBack();
|
|
|
|
|
@ -380,4 +382,16 @@ WHERE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//短信提醒
|
|
|
|
|
public function SendMsg($infos,$dotype=1)
|
|
|
|
|
{
|
|
|
|
|
$s=new SendMessgeService();
|
|
|
|
|
foreach ($infos as $key => $info) {
|
|
|
|
|
$mainInfo = DB::table('s_list as a')
|
|
|
|
|
->select('a.*', 'b.period_begin_time', 'b.period_end_time')
|
|
|
|
|
->leftJoin('s_period as b', 'a.reservation_time', '=', 'b.id')
|
|
|
|
|
->where(['a.id' => $info->id])->first();
|
|
|
|
|
$s->sendMessage($info->user_phone,'测试短信,项目:'.$mainInfo->entrust.',时间:'.$mainInfo->reservation_date.' '.substr($mainInfo->period_begin_time,0,5).'-'.substr($mainInfo->period_end_time,0,5));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|