|
- <?php
- date_default_timezone_set('PRC');
- require_once '/usr/share/nginx/ZZCS/coding/st-xm/Common/Mysql.php';
-
- $pdo1 = conn();
- $pdo2 = conn();
-
- $time = date("H:i", time());
-
- //千岛湖
- //if ($time > '13:55' && $time < '14:05') {
- qiandaohu($pdo1,$pdo2);
- //}
-
-
- //提前一天 16点不能售的票
- function qiandaohu($pdo1,$pdo2)
- {
- $date = date("Y-m-d", time() + 24 * 3600);
- $time = date("Y-m-d H:i:s", time());
- $sql = "update run_main set run_status = 139,update_user_id = 2,update_time = '" . $time . "' where run_date <= '" . $date . "' and prod_id in (451978,451979,451965,451966,451706,451709,451707,451708,451968,451950,451971,451969,451967,452134,452135,452136,452137) and run_status = 138;";
- $result = $pdo1->exec($sql);
- echo $sql."\r\n";
- $sql = "update run_bus set run_bus_status = 139,update_user_id = 2,update_time = '" . $time . "' where run_id in (SELECT run_id from run_main where run_date <= '" . $date . "' and prod_id in (451978,451979,451965,451966,451706,451709,451707,451708,451968,451950,451971,451969,451967,452134,452135,452136,452137) and run_status = 139)";
- $result = $pdo2->exec($sql);
- echo $sql."\r\n";
- }
-
- echo date("Y-m-d H:i:s")." reset success!\r\n";
|