stanley-king 4 lat temu
rodzic
commit
028563e58c
75 zmienionych plików z 188 dodań i 165 usunięć
  1. 64 64
      docker/compose/lz-28/docker-compose.yml
  2. 1 1
      docker/compose/stanley/docker-compose.yml
  3. 2 61
      helper/refill/RefillFactory.php
  4. 1 1
      helper/refill/afand/RefillCallBack.php
  5. 1 1
      helper/refill/afand/RefillPhone.php
  6. 0 0
      helper/refill/api/xyz/afand/config.php
  7. 46 0
      helper/refill/api/xyz/api.php
  8. 0 0
      helper/refill/api/xyz/bdt/RefillCallBack.php
  9. 0 0
      helper/refill/api/xyz/bdt/RefillOil.php
  10. 0 0
      helper/refill/api/xyz/bdt/RefillPhone.php
  11. 0 0
      helper/refill/api/xyz/bdt/config.php
  12. 0 0
      helper/refill/api/xyz/beixt/RefillCallBack.php
  13. 0 0
      helper/refill/api/xyz/beixt/RefillPhone.php
  14. 0 0
      helper/refill/api/xyz/beixt/config.php
  15. 0 0
      helper/refill/api/xyz/bjb/RefillCallBack.php
  16. 0 0
      helper/refill/api/xyz/bjb/RefillPhone.php
  17. 0 0
      helper/refill/api/xyz/bjb/config.php
  18. 0 0
      helper/refill/api/xyz/bjbnew/RefillCallBack.php
  19. 0 0
      helper/refill/api/xyz/bjbnew/RefillPhone.php
  20. 0 0
      helper/refill/api/xyz/bjbnew/config.php
  21. 0 0
      helper/refill/api/xyz/bjbyd/RefillCallBack.php
  22. 0 0
      helper/refill/api/xyz/bjbyd/RefillPhone.php
  23. 0 0
      helper/refill/api/xyz/bjbyd/config.php
  24. 0 0
      helper/refill/api/xyz/bxtwt/RefillCallBack.php
  25. 0 0
      helper/refill/api/xyz/bxtwt/RefillPhone.php
  26. 0 0
      helper/refill/api/xyz/bxtwt/config.php
  27. 0 0
      helper/refill/api/xyz/gftd/RefillCallBack.php
  28. 0 0
      helper/refill/api/xyz/gftd/RefillOil.php
  29. 0 0
      helper/refill/api/xyz/gftd/RefillPhone.php
  30. 0 0
      helper/refill/api/xyz/gftd/config.php
  31. 0 0
      helper/refill/api/xyz/gftdsinop/RefillCallBack.php
  32. 0 0
      helper/refill/api/xyz/gftdsinop/RefillOil.php
  33. 0 0
      helper/refill/api/xyz/gftdsinop/RefillPhone.php
  34. 0 0
      helper/refill/api/xyz/gftdsinop/config.php
  35. 0 0
      helper/refill/api/xyz/jiec/RefillCallBack.php
  36. 0 0
      helper/refill/api/xyz/jiec/RefillPhone.php
  37. 0 0
      helper/refill/api/xyz/jiec/config.php
  38. 0 0
      helper/refill/api/xyz/lx/RefillCallBack.php
  39. 0 0
      helper/refill/api/xyz/lx/RefillOil.php
  40. 0 0
      helper/refill/api/xyz/lx/RefillPhone.php
  41. 0 0
      helper/refill/api/xyz/lx/config.php
  42. 0 0
      helper/refill/api/xyz/saihu/RefillCallBack.php
  43. 0 0
      helper/refill/api/xyz/saihu/RefillOil.php
  44. 0 0
      helper/refill/api/xyz/saihu/RefillPhone.php
  45. 0 0
      helper/refill/api/xyz/saihu/config.php
  46. 0 0
      helper/refill/api/xyz/suhcpdd/RefillCallBack.php
  47. 0 0
      helper/refill/api/xyz/suhcpdd/RefillOil.php
  48. 0 0
      helper/refill/api/xyz/suhcpdd/RefillPhone.php
  49. 0 0
      helper/refill/api/xyz/suhcpdd/config.php
  50. 0 0
      helper/refill/api/xyz/suhctm/RefillCallBack.php
  51. 0 0
      helper/refill/api/xyz/suhctm/RefillOil.php
  52. 0 0
      helper/refill/api/xyz/suhctm/RefillPhone.php
  53. 0 0
      helper/refill/api/xyz/suhctm/config.php
  54. 0 0
      helper/refill/api/xyz/tianjt/RefillCallBack.php
  55. 0 0
      helper/refill/api/xyz/tianjt/RefillOil.php
  56. 0 0
      helper/refill/api/xyz/tianjt/RefillPhone.php
  57. 0 0
      helper/refill/api/xyz/tianjt/config.php
  58. 0 0
      helper/refill/api/xyz/tianx/RefillCallBack.php
  59. 0 0
      helper/refill/api/xyz/tianx/RefillPhone.php
  60. 0 0
      helper/refill/api/xyz/tianx/config.php
  61. 0 0
      helper/refill/api/xyz/weit/RefillCallBack.php
  62. 0 0
      helper/refill/api/xyz/weit/RefillPhone.php
  63. 0 0
      helper/refill/api/xyz/weit/config.php
  64. 0 0
      helper/refill/api/xyz/xc/RefillCallBack.php
  65. 0 0
      helper/refill/api/xyz/xc/RefillPhone.php
  66. 0 0
      helper/refill/api/xyz/xc/config.php
  67. 0 0
      helper/refill/api/xyz/yifa/RefillCallBack.php
  68. 0 0
      helper/refill/api/xyz/yifa/RefillPhone.php
  69. 0 0
      helper/refill/api/xyz/yifa/config.php
  70. 0 0
      helper/refill/api/xyz/zzx/RefillCallBack.php
  71. 0 0
      helper/refill/api/xyz/zzx/RefillOil.php
  72. 0 0
      helper/refill/api/xyz/zzx/RefillPhone.php
  73. 0 0
      helper/refill/api/xyz/zzx/config.php
  74. 45 9
      rdispatcher/dispatcher.php
  75. 28 28
      rdispatcher/processor.php

+ 64 - 64
docker/compose/lz-28/docker-compose.yml

@@ -67,67 +67,67 @@ services:
     depends_on:
       - "redisrv"
 
-#  websrv:
-#    image: php-fpm:alpine
-#    ports:
-#      - "9000:9000"
-#    volumes:
-#      - ../../conf/etc/localtime:/etc/localtime:ro
-#      - ../../../:/var/www/html
-#      - /nfs/upload:/var/www/html/data/upload
-#      - ../../conf/php-fpm/lz-php.ini:/usr/local/etc/php/php.ini
-#      - ../../conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
-#    container_name: "panda-web"
-#    command: [php-fpm]
-#    depends_on:
-#      - "redisrv"
-#
-#  queuesrv:
-#    image: php-zts-debug:7.3.18
-#    volumes:
-#      - ../../conf/etc/localtime:/etc/localtime:ro
-#      - ../../../:/var/www/html
-#      - /nfs/upload:/var/www/html/data/upload
-#      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-#    container_name: "panda-queue"
-#    command: [php,"/var/www/html/queue/index.php", "queue", "index"]
-#    depends_on:
-#      - "redisrv"
-#
-#  searcher:
-#    image: php-zts-debug:7.3.18
-#    volumes:
-#      - ../../conf/etc/localtime:/etc/localtime:ro
-#      - ../../../:/var/www/html
-#      - /nfs/upload:/var/www/html/data/upload
-#      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-#    container_name: "panda-searcher"
-#    command: [php, "/var/www/html/searcher.php"]
-#    depends_on:
-#      - "redisrv"
-#
-#  crontabsrv:
-#    image: php-zts-debug:7.3.18
-#    volumes:
-#      - ../../conf/etc/localtime:/etc/localtime:ro
-#      - ../../../:/var/www/html
-#      - /nfs/upload:/var/www/html/data/upload
-#      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-#      - ../../conf/crontab/root:/var/spool/cron/crontabs/root
-#    container_name: "panda-crontab"
-#    command: [crond,"-f"]
-#    depends_on:
-#      - "redisrv"
-#
-#  phpcli:
-#    image: php-zts-debug:7.3.18
-#    volumes:
-#      - ../../conf/etc/localtime:/etc/localtime:ro
-#      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-#      - ../../../:/var/www/html
-#      - /nfs/upload:/var/www/html/data/upload
-#    container_name: "panda-php"
-#    depends_on:
-#      - "redisrv"
-#      - "websrv"
-#      - "searcher"
+  websrv:
+    image: php-fpm:alpine
+    ports:
+      - "9000:9000"
+    volumes:
+      - ../../conf/etc/localtime:/etc/localtime:ro
+      - ../../../:/var/www/html
+      - /nfs/upload:/var/www/html/data/upload
+      - ../../conf/php-fpm/lz-php.ini:/usr/local/etc/php/php.ini
+      - ../../conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
+    container_name: "panda-web"
+    command: [php-fpm]
+    depends_on:
+      - "redisrv"
+
+  queuesrv:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../conf/etc/localtime:/etc/localtime:ro
+      - ../../../:/var/www/html
+      - /nfs/upload:/var/www/html/data/upload
+      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
+    container_name: "panda-queue"
+    command: [php,"/var/www/html/queue/index.php", "queue", "index"]
+    depends_on:
+      - "redisrv"
+
+  searcher:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../conf/etc/localtime:/etc/localtime:ro
+      - ../../../:/var/www/html
+      - /nfs/upload:/var/www/html/data/upload
+      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
+    container_name: "panda-searcher"
+    command: [php, "/var/www/html/searcher.php"]
+    depends_on:
+      - "redisrv"
+
+  crontabsrv:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../conf/etc/localtime:/etc/localtime:ro
+      - ../../../:/var/www/html
+      - /nfs/upload:/var/www/html/data/upload
+      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
+      - ../../conf/crontab/root:/var/spool/cron/crontabs/root
+    container_name: "panda-crontab"
+    command: [crond,"-f"]
+    depends_on:
+      - "redisrv"
+
+  phpcli:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../conf/etc/localtime:/etc/localtime:ro
+      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
+      - ../../../:/var/www/html
+      - /nfs/upload:/var/www/html/data/upload
+    container_name: "panda-php"
+    depends_on:
+      - "redisrv"
+      - "websrv"
+      - "searcher"

+ 1 - 1
docker/compose/stanley/docker-compose.yml

@@ -71,7 +71,7 @@ services:
     links:
       - redisrv
     container_name: "panda-dispatcher"
-    command: [php,"/var/www/html/rdispatcher/dispatcher.php","1"]
+    command: [php,"/var/www/html/rdispatcher/dispatcher.php","5"]
     depends_on:
       - "redisrv"
 

+ 2 - 61
helper/refill/RefillFactory.php

@@ -16,68 +16,9 @@ require_once(BASE_HELPER_PATH . '/refill/CalcMerchantPrice.php');
 require_once(BASE_HELPER_PATH . '/refill/util.php');
 
 
-require_once(BASE_HELPER_PATH . '/refill/tianjt/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/tianjt/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/tianjt/RefillCallBack.php');
+require_once(BASE_HELPER_PATH . '/refill/yzchannel.php');
 
-require_once(BASE_HELPER_PATH . '/refill/suhctm/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/suhctm/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/suhctm/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/suhcpdd/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/suhcpdd/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/suhcpdd/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/beixt/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/beixt/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/bxtwt/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/bxtwt/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/bjb/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/bjb/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/bdt/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/bdt/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/zzx/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/zzx/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/zzx/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/lx/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/lx/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/lx/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/saihu/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/saihu/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/saihu/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/yifa/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/yifa/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/jiec/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/jiec/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/xc/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/xc/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/gftd/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/gftd/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/gftdsinop/RefillOil.php');
-require_once(BASE_HELPER_PATH . '/refill/gftdsinop/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/weit/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/weit/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/bjbyd/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/bjbyd/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/tianx/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/tianx/RefillCallBack.php');
-
-require_once(BASE_HELPER_PATH . '/refill/afand/RefillPhone.php');
-require_once(BASE_HELPER_PATH . '/refill/afand/RefillCallBack.php');
+define('BASE_HELPER_RAPI_PATH',BASE_HELPER_PATH . '/refill/api/xyz');
 
 use Log;
 use mtopcard;

+ 1 - 1
helper/refill/afand/RefillCallBack.php

@@ -3,7 +3,7 @@
 
 namespace refill\afand;
 
-require_once(BASE_HELPER_PATH . '/refill/afand/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/afand/config.php');
 
 
 use refill;

+ 1 - 1
helper/refill/afand/RefillPhone.php

@@ -2,7 +2,7 @@
 
 namespace refill\afand;
 
-require_once(BASE_HELPER_PATH . '/refill/afand/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/afand/config.php');
 
 use refill;
 use Log;

helper/refill/afand/config.php → helper/refill/api/xyz/afand/config.php


+ 46 - 0
helper/refill/api/xyz/api.php

@@ -0,0 +1,46 @@
+<?php
+
+require_once(BASE_HELPER_RAPI_PATH . '/tianjt/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/tianjt/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/tianjt/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/suhctm/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/suhctm/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/suhctm/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/suhcpdd/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/suhcpdd/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/suhcpdd/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/beixt/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/beixt/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bxtwt/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bxtwt/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bjb/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bjb/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bdt/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bdt/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/zzx/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/zzx/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/zzx/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/lx/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/lx/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/lx/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/saihu/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/saihu/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/saihu/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/yifa/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/yifa/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/jiec/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/jiec/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/xc/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/xc/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/gftd/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/gftd/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/gftdsinop/RefillOil.php');
+require_once(BASE_HELPER_RAPI_PATH . '/gftdsinop/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/weit/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/weit/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bjbyd/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/bjbyd/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/tianx/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/tianx/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/afand/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/afand/RefillCallBack.php');

helper/refill/bdt/RefillCallBack.php → helper/refill/api/xyz/bdt/RefillCallBack.php


helper/refill/bdt/RefillOil.php → helper/refill/api/xyz/bdt/RefillOil.php


helper/refill/bdt/RefillPhone.php → helper/refill/api/xyz/bdt/RefillPhone.php


helper/refill/bdt/config.php → helper/refill/api/xyz/bdt/config.php


helper/refill/beixt/RefillCallBack.php → helper/refill/api/xyz/beixt/RefillCallBack.php


helper/refill/beixt/RefillPhone.php → helper/refill/api/xyz/beixt/RefillPhone.php


helper/refill/beixt/config.php → helper/refill/api/xyz/beixt/config.php


helper/refill/bjb/RefillCallBack.php → helper/refill/api/xyz/bjb/RefillCallBack.php


helper/refill/bjb/RefillPhone.php → helper/refill/api/xyz/bjb/RefillPhone.php


helper/refill/bjb/config.php → helper/refill/api/xyz/bjb/config.php


helper/refill/bjbnew/RefillCallBack.php → helper/refill/api/xyz/bjbnew/RefillCallBack.php


helper/refill/bjbnew/RefillPhone.php → helper/refill/api/xyz/bjbnew/RefillPhone.php


helper/refill/bjbnew/config.php → helper/refill/api/xyz/bjbnew/config.php


helper/refill/bjbyd/RefillCallBack.php → helper/refill/api/xyz/bjbyd/RefillCallBack.php


helper/refill/bjbyd/RefillPhone.php → helper/refill/api/xyz/bjbyd/RefillPhone.php


helper/refill/bjbyd/config.php → helper/refill/api/xyz/bjbyd/config.php


helper/refill/bxtwt/RefillCallBack.php → helper/refill/api/xyz/bxtwt/RefillCallBack.php


helper/refill/bxtwt/RefillPhone.php → helper/refill/api/xyz/bxtwt/RefillPhone.php


helper/refill/bxtwt/config.php → helper/refill/api/xyz/bxtwt/config.php


helper/refill/gftd/RefillCallBack.php → helper/refill/api/xyz/gftd/RefillCallBack.php


helper/refill/gftd/RefillOil.php → helper/refill/api/xyz/gftd/RefillOil.php


helper/refill/gftd/RefillPhone.php → helper/refill/api/xyz/gftd/RefillPhone.php


helper/refill/gftd/config.php → helper/refill/api/xyz/gftd/config.php


helper/refill/gftdsinop/RefillCallBack.php → helper/refill/api/xyz/gftdsinop/RefillCallBack.php


helper/refill/gftdsinop/RefillOil.php → helper/refill/api/xyz/gftdsinop/RefillOil.php


helper/refill/gftdsinop/RefillPhone.php → helper/refill/api/xyz/gftdsinop/RefillPhone.php


helper/refill/gftdsinop/config.php → helper/refill/api/xyz/gftdsinop/config.php


helper/refill/jiec/RefillCallBack.php → helper/refill/api/xyz/jiec/RefillCallBack.php


helper/refill/jiec/RefillPhone.php → helper/refill/api/xyz/jiec/RefillPhone.php


helper/refill/jiec/config.php → helper/refill/api/xyz/jiec/config.php


helper/refill/lx/RefillCallBack.php → helper/refill/api/xyz/lx/RefillCallBack.php


helper/refill/lx/RefillOil.php → helper/refill/api/xyz/lx/RefillOil.php


helper/refill/lx/RefillPhone.php → helper/refill/api/xyz/lx/RefillPhone.php


helper/refill/lx/config.php → helper/refill/api/xyz/lx/config.php


helper/refill/saihu/RefillCallBack.php → helper/refill/api/xyz/saihu/RefillCallBack.php


helper/refill/saihu/RefillOil.php → helper/refill/api/xyz/saihu/RefillOil.php


helper/refill/saihu/RefillPhone.php → helper/refill/api/xyz/saihu/RefillPhone.php


helper/refill/saihu/config.php → helper/refill/api/xyz/saihu/config.php


helper/refill/suhcpdd/RefillCallBack.php → helper/refill/api/xyz/suhcpdd/RefillCallBack.php


helper/refill/suhcpdd/RefillOil.php → helper/refill/api/xyz/suhcpdd/RefillOil.php


helper/refill/suhcpdd/RefillPhone.php → helper/refill/api/xyz/suhcpdd/RefillPhone.php


helper/refill/suhcpdd/config.php → helper/refill/api/xyz/suhcpdd/config.php


helper/refill/suhctm/RefillCallBack.php → helper/refill/api/xyz/suhctm/RefillCallBack.php


helper/refill/suhctm/RefillOil.php → helper/refill/api/xyz/suhctm/RefillOil.php


helper/refill/suhctm/RefillPhone.php → helper/refill/api/xyz/suhctm/RefillPhone.php


helper/refill/suhctm/config.php → helper/refill/api/xyz/suhctm/config.php


helper/refill/tianjt/RefillCallBack.php → helper/refill/api/xyz/tianjt/RefillCallBack.php


helper/refill/tianjt/RefillOil.php → helper/refill/api/xyz/tianjt/RefillOil.php


helper/refill/tianjt/RefillPhone.php → helper/refill/api/xyz/tianjt/RefillPhone.php


helper/refill/tianjt/config.php → helper/refill/api/xyz/tianjt/config.php


helper/refill/tianx/RefillCallBack.php → helper/refill/api/xyz/tianx/RefillCallBack.php


helper/refill/tianx/RefillPhone.php → helper/refill/api/xyz/tianx/RefillPhone.php


helper/refill/tianx/config.php → helper/refill/api/xyz/tianx/config.php


helper/refill/weit/RefillCallBack.php → helper/refill/api/xyz/weit/RefillCallBack.php


helper/refill/weit/RefillPhone.php → helper/refill/api/xyz/weit/RefillPhone.php


helper/refill/weit/config.php → helper/refill/api/xyz/weit/config.php


helper/refill/xc/RefillCallBack.php → helper/refill/api/xyz/xc/RefillCallBack.php


helper/refill/xc/RefillPhone.php → helper/refill/api/xyz/xc/RefillPhone.php


helper/refill/xc/config.php → helper/refill/api/xyz/xc/config.php


helper/refill/yifa/RefillCallBack.php → helper/refill/api/xyz/yifa/RefillCallBack.php


helper/refill/yifa/RefillPhone.php → helper/refill/api/xyz/yifa/RefillPhone.php


helper/refill/yifa/config.php → helper/refill/api/xyz/yifa/config.php


helper/refill/zzx/RefillCallBack.php → helper/refill/api/xyz/zzx/RefillCallBack.php


helper/refill/zzx/RefillOil.php → helper/refill/api/xyz/zzx/RefillOil.php


helper/refill/zzx/RefillPhone.php → helper/refill/api/xyz/zzx/RefillPhone.php


helper/refill/zzx/config.php → helper/refill/api/xyz/zzx/config.php


+ 45 - 9
rdispatcher/dispatcher.php

@@ -10,10 +10,13 @@ define('BASE_PATH',BASE_ROOT_PATH . '/rdispatcher');
 require_once(BASE_ROOT_PATH . '/global.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
-require_once(BASE_ROOT_PATH . '/helper/event_looper.php');
+
+require_once(BASE_HELPER_PATH . '/event_looper.php');
 require_once(BASE_HELPER_PATH . '/queue/rdispatcher.php');
 require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
-
+require_once(BASE_HELPER_PATH . '/message/msgstates.php');
+require_once(BASE_HELPER_PATH . '/message/msgutil.php');
+require_once(BASE_HELPER_PATH . '/message/subscriber.php');
 
 require_once(BASE_PATH . '/processor.php');
 require_once(BASE_PATH . '/proxy.php');
@@ -39,19 +42,52 @@ require_once(BASE_PATH . '/yzpolicy.php');
 //目前没发现问题
 Co::set(['hook_flags' => SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_TCP]);
 
-
 if (empty($_SERVER['argv'][1])) exit('parameter error');
 $count = intval($_SERVER['argv'][1]);
 
-function work_proc() {
+
+
+function all_channels() {
+    return ['refill'];
+}
+
+function work_proc()
+{
     Base::run_util();
+
+    $trdid = Thread::getCurrentThreadId();
+    Log::record("thread id = {$trdid}",Log::INFO);
+//
+//    $gMessageStates = new MsgStates();
+//    StatesHelper::init();
+//    $listener = new message\subscriber($gMessageStates);
+//    $listener->start();
+
     $looper = new processor();
     $looper->run();
 }
 
-Co\run(function() {
-    work_proc();
-});
+function corun()
+{
+    Log::record("start run process",Log::DEBUG);
+    Co\run(function() {
+        work_proc();
+    });
+
+//    $process = new swoole_process(function(swoole_process $process)
+//    {
+//        try {
+//            Log::record("start run process",Log::DEBUG);
+//            Co\run(function() {
+//                work_proc();
+//            });
+//        } catch (Exception $ex) {
+//            Log::record("",Log::ERR);
+//        }
+//    });
+//
+//    $pid = $process->start();
+//    return $pid;
+}
 
-//work_proc();
-//event\util::fork_workerex('work_proc',$count);
+event\util::fork_workerex('corun',$count);

+ 28 - 28
rdispatcher/processor.php

@@ -28,37 +28,37 @@ class processor extends queue\ILooper
                 $method = strtolower($key);
                 if($method == 'add')
                 {
-                    go(function () use ($params) {
-                        Log::record(__FUNCTION__,Log::DEBUG);
-                        $mchid = $params['mchid'];
-                        $buyer_id = $params['buyer_id'];
-                        $amount = $params['amount'];
-                        $card_no = $params['card_no'];
-                        $mch_order = $params['mch_order'];
-                        $notify_url = $params['notify_url'];
-                        $idcard = $params['idcard'] ?? '';
-                        $card_name = $params['card_name'] ?? '';
-                        $order_time = $params['order_time'] ?? 0;
-                        $commit_times = $params['commit_times'] ?? 0;
-
-                        $minfo = new member_info($buyer_id);
-                        $available = $minfo->available_predeposit();
-                        Log::record("available = {$available}",Log::DEBUG);
+//                    go(function () use ($params) {
+//                        Log::record(__FUNCTION__,Log::DEBUG);
+//                        $mchid = $params['mchid'];
+//                        $buyer_id = $params['buyer_id'];
+//                        $amount = $params['amount'];
+//                        $card_no = $params['card_no'];
+//                        $mch_order = $params['mch_order'];
+//                        $notify_url = $params['notify_url'];
+//                        $idcard = $params['idcard'] ?? '';
+//                        $card_name = $params['card_name'] ?? '';
+//                        $order_time = $params['order_time'] ?? 0;
+//                        $commit_times = $params['commit_times'] ?? 0;
+//
+//                        $minfo = new member_info($buyer_id);
+//                        $available = $minfo->available_predeposit();
+//                        Log::record("available = {$available}",Log::DEBUG);
+//
+//                        $resp = http_request('https://www.xyzshops.cn/mobile/index.php?act=index&op=index&client_type=ios');
+//                        Log::record("recv size=" . strlen($resp), Log::DEBUG);
+//                    });
 
-                        $resp = http_request('https://www.xyzshops.cn/mobile/index.php?act=index&op=index&client_type=ios');
-                        Log::record("recv size=" . strlen($resp), Log::DEBUG);
+                    $proxy = new proxy();
+                    go(function () use ($proxy,$params) {
+                        try {
+                            $proxy->add($params);
+                        }
+                        catch (Exception $x) {
+                            Log::record($x->getMessage(),Log::ERR);
+                        }
                     });
 
-//                    $proxy = new proxy();
-//                    go(function () use ($proxy,$params) {
-//                        try {
-//                            $proxy->add($params);
-//                        }
-//                        catch (Exception $x) {
-//                            Log::record($x->getMessage(),Log::ERR);
-//                        }
-//                    });
-
 //                    Swoole\Runtime::enableCoroutine(SWOOLE_HOOK_CURL);
 //                    Swoole\Coroutine\run(function () use ($proxy,$params) {
 //                        $proxy->add($params);