run.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. define('InShopNC',true);
  3. define('BASE_ROOT_PATH',str_replace('\\','/',dirname(__FILE__)));
  4. echo BASE_ROOT_PATH."\n";
  5. require_once (BASE_ROOT_PATH . '/fooder.php');
  6. $oms_ret = '{"apiCode":"success","apiDesc":"成功","hasnext":0,"data":[{"tid":8000000000002202,"type":null,"operationStatus":0,"status":null,"errorMessge":"买家昵称为空;"}]}';
  7. $oms_ret = '{"apiCode":"success","apiDesc":"成功","hasnext":0,"data":[{"tid":8000000000101202,"type":"insert","operationStatus":1,"status":1,"errorMessge":""}]}';
  8. $result = json_decode($oms_ret,true);
  9. if(!empty($result) && is_array($result))
  10. {
  11. if($result['apiCode'] == 'success')
  12. {
  13. if(!empty($result['data']) && is_array($result['data']) && count($result['data']) > 0)
  14. {
  15. if(empty($result['data'][0]['status']) || $result['data'][0]['status'] != 1) {
  16. Log::record("PUSHOMS ERR pay_sn=> {$pay_sn}",Log::ERR);
  17. } else {
  18. Log::record("PUSHOMS SUCCESS pay_sn=> {$pay_sn}",Log::DEBUG);
  19. }
  20. }
  21. }
  22. }
  23. echo $argv;
  24. function help_out()
  25. {
  26. echo "fetch_goods:start fetch goods.\r\n";
  27. echo "fillgcid:start fill all goods class id.\r\n";
  28. echo "checkgoods:check all goods class id.\r\n";
  29. }
  30. $y = strtotime('2016-12-12 01:01:01');
  31. $y = urldecode('%E4%B8%AD%E9%80%9A%E5%BF%AB%E9%80%92');
  32. $x=new date();
  33. define('StartTime', microtime(true));
  34. define('TIMESTAMP', time());
  35. if(count($argv) == 1) {
  36. return;
  37. }
  38. $gfcgi_run = 1;
  39. if($gfcgi_run == 0) { //模拟请求
  40. $file = BASE_ROOT_PATH . '/debug_run.php';
  41. include $file;
  42. Base::mobile_init();
  43. Base::mobile_control();
  44. } elseif ($gfcgi_run == 1) {
  45. $file = BASE_ROOT_PATH . '/research/research_run.php';
  46. include $file;
  47. } else {
  48. Base::run_util();
  49. $file = BASE_CRONTAB_PATH . '/crawl/fetch_goods.php';
  50. require $file;
  51. }
  52. ?>