You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
1.1 KiB

  1. <?php
  2. date_default_timezone_set('PRC');
  3. require_once '/usr/share/nginx/ZZCS/coding/st-xm/Common/Mysql.php';
  4. $pdo = conn();
  5. $time = date("H:i", time());
  6. //千岛湖
  7. //if ($time > '13:55' && $time < '14:05') {
  8. qiandaohu($pdo);
  9. //}
  10. //提前一天 16点不能售的票
  11. function qiandaohu($pdo)
  12. {
  13. $date = date("Y-m-d", time() + 24 * 3600);
  14. $time = date("Y-m-d H:i:s", time());
  15. $sql = "update run_main set run_status = 139,update_user_id = 2,update_time = '" . $time . "' where run_date <= '" . $date . "' and prod_id in (450517,450522,450499,450504,448780,448781,450529,450530,450550,450551,450588,450589,450698,450699,450700,450701,450702,450703,450802,450803) and run_status = 138;
  16. 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 (450517,450522,450499,450504,448780,448781,450529,450530,450550,450551,450588,450589,450698,450699,450700,450701,450702,450703,450802,450803) and run_status = 139)";
  17. $result = $pdo->exec($sql);
  18. echo $sql;
  19. }
  20. echo date("Y-m-d H:i:s")." reset success!";
  21. ?>