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.2 KiB

  1. <?php
  2. date_default_timezone_set('PRC');
  3. require_once '/usr/share/nginx/ZZCS/coding/st-xm/Common/Mysql.php';
  4. $pdo1 = conn();
  5. $pdo2 = conn();
  6. $time = date("H:i", time());
  7. //千岛湖
  8. //if ($time > '13:55' && $time < '14:05') {
  9. qiandaohu($pdo1,$pdo2);
  10. //}
  11. //提前一天 16点不能售的票
  12. function qiandaohu($pdo1,$pdo2)
  13. {
  14. $date = date("Y-m-d", time() + 24 * 3600);
  15. $time = date("Y-m-d H:i:s", time());
  16. $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;";
  17. $result = $pdo1->exec($sql);
  18. echo $sql."\r\n";
  19. $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)";
  20. $result = $pdo2->exec($sql);
  21. echo $sql."\r\n";
  22. }
  23. echo date("Y-m-d H:i:s")." reset success!\r\n";