Sfoglia il codice sorgente

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

xiaoyu 3 anni fa
parent
commit
bfa1a3bafa
100 ha cambiato i file con 14685 aggiunte e 1935 eliminazioni
  1. 3 0
      .vscode/settings.json
  2. 0 882
      data/config/guozi/refill.ini.php
  3. 140 128
      data/config/xyz/refill.ini.php
  4. 7 7
      data/config/guozi/base.ini.php
  5. 0 0
      data/config/yl/pay.ini.php
  6. 5418 0
      data/config/yl/refill.ini.php
  7. 0 0
      data/config/yl/special.ini.php
  8. 0 0
      data/config/yl/srv.ini.php
  9. 0 0
      data/config/yl/ugcman.config.ini
  10. 0 0
      data/config/yl/vgoods.ini.php
  11. 0 0
      data/config/yl/webacc.config.ini
  12. 0 147
      docker/compose/tmp/gz-acc/docker-compose.yml
  13. 0 45
      docker/compose/tmp/gz-worker/docker-compose.yml
  14. 0 149
      docker/compose/tmp/lz-acc/docker-compose.yml
  15. 0 4
      docker/compose/tmp/lz-acc/restart.sh
  16. 0 47
      docker/compose/tmp/lz-stat/docker-compose.yml
  17. 0 60
      docker/compose/tmp/lz-worker/docker-compose.yml
  18. 0 3
      docker/compose/tmp/lz-worker/restart.sh
  19. 0 146
      docker/compose/tmp/xyz-acc/docker-compose.yml
  20. 0 30
      docker/compose/tmp/xyz-admin/docker-compose.yml
  21. 0 83
      docker/compose/tmp/xyz-arw/docker-compose.yml
  22. 0 47
      docker/compose/tmp/xyz-stat/docker-compose.yml
  23. 0 38
      docker/compose/tmp/xyz-storage/docker-compose.yml
  24. 0 49
      docker/compose/tmp/xyz-worker/docker-compose.yml
  25. 0 4
      docker/compose/tmp/xyz-worker/restart.sh
  26. 0 45
      docker/compose/tmp/xyzab-worker/docker-compose.yml
  27. 3 0
      docker/compose/yl/conf/crontab/root
  28. 6 0
      docker/compose/yl/conf/crontab/slave_root
  29. BIN
      docker/compose/yl/conf/etc/localtime
  30. 129 0
      docker/compose/yl/conf/nginx/nginx.conf
  31. 141 0
      docker/compose/yl/conf/nginx/nginx_admin.conf
  32. 146 0
      docker/compose/yl/conf/php-fpm/php-fpm.conf
  33. 12 0
      docker/compose/yl/conf/php/mch-spwan-start
  34. 11 0
      docker/compose/yl/conf/php/mobile-spwan-start
  35. 1944 0
      docker/compose/yl/conf/php/php-swoole.ini
  36. 1942 0
      docker/compose/yl/conf/php/php.ini
  37. 944 0
      docker/compose/yl/conf/redis/6379.conf
  38. 944 0
      docker/compose/yl/conf/redis/6380.conf
  39. 39 0
      docker/compose/yl/ylacc/docker-compose.yml
  40. 59 0
      docker/compose/yl/yladmin/docker-compose.yml
  41. 30 0
      docker/compose/yl/ylcli/docker-compose.yml
  42. 36 0
      docker/compose/yl/ylmaster-crond/docker-compose.yml
  43. 50 0
      docker/compose/yl/ylslave-crond/docker-compose.yml
  44. 98 0
      docker/compose/yl/ylstat/docker-compose.yml
  45. 13 0
      docker/compose/yl/ylstorage/docker-compose.yml
  46. 39 0
      docker/compose/yl/ylworker/docker-compose.yml
  47. 4 0
      docker/compose/yl/ylworker/restart_all.sh
  48. 3 0
      docker/compose/yl/ylworker/restart_cordsrv.sh
  49. 3 0
      docker/compose/yl/ylworker/stop_all.sh
  50. 1 0
      helper/fcgisrv/BaseServer.php
  51. 8 8
      helper/refill/api/xyz/dashang/config.php
  52. 29 1
      helper/refill/api/xyz/dashang/开户信息-1.txt
  53. BIN
      helper/refill/api/xyz/guochuang/20220318湖南电信调价函.png
  54. BIN
      helper/refill/api/xyz/guochuang/20220323辽宁移动调价函.png
  55. 2 2
      helper/refill/api/xyz/guochuang/config.php
  56. 4 2
      helper/refill/api/xyz/hangtong/config.php
  57. 10 0
      helper/refill/api/xyz/hangtong/椰子.txt
  58. BIN
      helper/refill/api/xyz/kuaikuaifs/20220318广东移动调价函.png
  59. 1 1
      helper/refill/api/xyz/kuaikuaifs/config.php
  60. BIN
      helper/refill/api/xyz/miaoxt_fs/20220322吉林青海辽宁移动调价函.png
  61. 3 2
      helper/refill/api/xyz/miaoxt_fs/config.php
  62. 4 4
      helper/refill/api/xyz/yunlingfs/RefillPhone.php
  63. 6 0
      helper/refill/api/xyz/yunlingfs/config.php
  64. 8 1
      helper/refill/api/xyz/yunlingfs/新系椰子分省通代理信息.txt
  65. 52 0
      helper/refill/api/yl/afand/RefillCallBack.php
  66. 110 0
      helper/refill/api/yl/afand/RefillPhone.php
  67. 20 0
      helper/refill/api/yl/afand/config.php
  68. 49 0
      helper/refill/api/yl/afandeng/RefillCallBack.php
  69. 100 0
      helper/refill/api/yl/afandeng/RefillPhone.php
  70. 13 0
      helper/refill/api/yl/afandeng/config.php
  71. 47 0
      helper/refill/api/yl/afandfs/RefillCallBack.php
  72. 108 0
      helper/refill/api/yl/afandfs/RefillPhone.php
  73. 20 0
      helper/refill/api/yl/afandfs/config.php
  74. 19 0
      helper/refill/api/yl/afandfs/北京分省账户.txt
  75. BIN
      helper/refill/api/yl/afandfs/阿凡灯分省对接文档.docx
  76. 73 0
      helper/refill/api/yl/afandnew/RefillCallBack.php
  77. 114 0
      helper/refill/api/yl/afandnew/RefillPhone.php
  78. 14 0
      helper/refill/api/yl/afandnew/afd007.txt
  79. 32 0
      helper/refill/api/yl/afandnew/config.php
  80. 628 0
      helper/refill/api/yl/afandnew/阿凡灯充值系统2.2.doc
  81. 50 0
      helper/refill/api/yl/afd/RefillCallBack.php
  82. 110 0
      helper/refill/api/yl/afd/RefillPhone.php
  83. 12 0
      helper/refill/api/yl/afd/config.php
  84. 13 0
      helper/refill/api/yl/afd/账号信息.txt
  85. BIN
      helper/refill/api/yl/afd/阿凡灯系统接口文档.docx
  86. 50 0
      helper/refill/api/yl/api.php
  87. 40 0
      helper/refill/api/yl/bailian/RefillCallBack.php
  88. 132 0
      helper/refill/api/yl/bailian/RefillOil.php
  89. 48 0
      helper/refill/api/yl/bailian/config.php
  90. 14 0
      helper/refill/api/yl/bailian/开户信息.txt
  91. 67 0
      helper/refill/api/yl/baixuan/RefillCallBack.php
  92. 155 0
      helper/refill/api/yl/baixuan/RefillPhone.php
  93. 44 0
      helper/refill/api/yl/baixuan/config.php
  94. 20 0
      helper/refill/api/yl/baixuan/商品编码.txt
  95. 13 0
      helper/refill/api/yl/baixuan/开户信息.txt
  96. 67 0
      helper/refill/api/yl/baixuan_normal/RefillCallBack.php
  97. 155 0
      helper/refill/api/yl/baixuan_normal/RefillPhone.php
  98. 40 0
      helper/refill/api/yl/baixuan_normal/config.php
  99. 16 0
      helper/refill/api/yl/baixuan_normal/商品编码.txt
  100. 0 0
      helper/refill/api/yl/baixuan_normal/开户信息.txt

+ 3 - 0
.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "esbonio.server.enabled": true
+}

+ 0 - 882
data/config/guozi/refill.ini.php

@@ -1,882 +0,0 @@
-<?php
-
-global $config;
-
-$config['refill_oil_specs'] = [100, 200, 500, 1000, 2000];
-$config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
-
-//充值额度基本表
-$config['refill_specs'] = [
-    'petrochina'  => $config['refill_oil_specs'],
-    'sinopec'     => $config['refill_oil_specs'],
-    'chinamobile' => $config['refill_phone_specs'],
-    'chinaunicom' => $config['refill_phone_specs'],
-    'chinatelecom' => $config['refill_phone_specs']
-];
-
-//充值渠道配置表
-//速汇充京东加油通道
-$tianjt_oil = ['name' => 'tianjt', 'store_id' => 7,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6290, 'price' => 97.0, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6291, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6292, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6293, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
-
-//速汇充天猫加油通道
-$suhctm_oil = ['name' => 'suhctm', 'store_id' => 7,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
-
-$suhcpdd_oil = ['name' => 'suhcpdd', 'store_id' => 7,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
-
-//赵梓暄提供的加油通道
-$zzx_oil = ['name' => 'zzx', 'store_id' => 13,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6307, 'price' => 97.8, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
-        200 => [['goods_id' => 6308, 'price' => 195.6, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
-        500 => [['goods_id' => 6309, 'price' => 489, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
-        1000 => [['goods_id' => 6310, 'price' => 978, 'quality' => 1, 'card_type' => 'petrochina,sinopec']]
-    ],
-    'refill_type' => 'api'];
-
-//赵梓暄提供的加油通道
-$lx_oil = ['name' => 'lx', 'store_id' => 14,'qualitys' => '1',
-    'amount' => [
-        500 => [['goods_id' => 6322, 'price' => 479, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6311, 'price' => 958, 'quality' => 1, 'card_type' => 'sinopec']] //,
-//        2000 => ['goods_id' => 6322, 'price' => 1916]
-    ],
-    'period' => ['start' => '14:00', 'end' => '19:00'], 'official_sn' => true, 'refill_type' => 'inner_store'];
-
-//赛虎
-$saihu_oil = ['name' => 'saihu', 'store_id' => 15,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6313, 'price' => 97, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6314, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6315, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6316, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']],
-        2000 => [['goods_id' => 6317, 'price' => 1940, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'refill_type' => 'api'];
-
-#官方中石油通道
-$gftd_oil = ['name' => 'gftd', 'store_id' => 19,'qualitys' => '5',
-    'amount' => [
-        100 => [['goods_id' => 6339, 'price' => 95, 'quality' => 5, 'card_type' => 'petrochina']],
-        200 => [['goods_id' => 6340, 'price' => 190, 'quality' => 5, 'card_type' => 'petrochina']],
-        500 => [['goods_id' => 6341, 'price' => 475, 'quality' => 5, 'card_type' => 'petrochina']],
-        1000 => [['goods_id' => 6342, 'price' => 950, 'quality' => 5, 'card_type' => 'petrochina']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-#官方中石化通道
-$gftdsinop_oil = ['name' => 'gftdsinop', 'store_id' => 20,'qualitys' => '5',
-    'amount' => [
-        100 => [['goods_id' => 6343, 'price' => 95, 'quality' => 5, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6344, 'price' => 190, 'quality' => 5, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6345, 'price' => 475, 'quality' => 5, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6346, 'price' => 950, 'quality' => 5, 'card_type' => 'sinopec']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-#亿畅通中石化通道
-$yichangt_oil = ['name' => 'yichangt', 'store_id' => 50,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6541, 'price' => 96.9, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6542, 'price' => 193.8, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6543, 'price' => 484.5, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6544, 'price' => 969, 'quality' => 1, 'card_type' => 'sinopec']],
-        2000 => [['goods_id' => 6554, 'price' => 1938, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-$jumi_oil = ['name' => 'jumi', 'store_id' => 47,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6550, 'price' => 98, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6551, 'price' => 196, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6552, 'price' => 490, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6553, 'price' => 980, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-$zeheng_oil = ['name' => 'zeheng', 'store_id' => 51,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6555, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6556, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6557, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6558, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-$lingzh_oil = ['name' => 'lingzhoil', 'store_id' => 56, 'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6579, 'price' => 97, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        200 => [['goods_id' => 6580, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        500 => [['goods_id' => 6581, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        1000 => [['goods_id' => 6582, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        2000 => [['goods_id' => 6583, 'price' => 1940, 'quality' => 1, 'card_type' => 'sinopec,petrochina']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-$feinimoshu_oil = ['name' => 'feinimoshu', 'store_id' => 57, 'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6589, 'price' => 48.5, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        100 => [['goods_id' => 6590, 'price' => 97, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        200 => [['goods_id' => 6591, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        500 => [['goods_id' => 6592, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        1000 => [['goods_id' => 6593, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec,petrochina']],
-        2000 => [['goods_id' => 6594, 'price' => 1940, 'quality' => 1, 'card_type' => 'sinopec,petrochina']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-$oil_providers = [
-    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
-    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
-    ['name' => 'suhcpdd', 'cfg' => $suhcpdd_oil],
-    ['name' => 'zzx', 'cfg' => $zzx_oil],
-    ['name' => 'lx', 'cfg' => $lx_oil],
-    ['name' => 'saihu', 'cfg' => $saihu_oil],
-    ['name' => 'gftd', 'cfg' => $gftd_oil],
-    ['name' => 'gftdsinop', 'cfg' => $gftdsinop_oil],
-    ['name' => 'yichangt', 'cfg' => $yichangt_oil],
-    ['name' => 'jumi', 'cfg' => $jumi_oil],
-    ['name' => 'zeheng', 'cfg' => $zeheng_oil],
-    ['name' => 'lingzhoil', 'cfg' => $lingzh_oil],
-    ['name' => 'feinimoshu', 'cfg' => $feinimoshu_oil]
-];
-$config['oil_providers'] = $oil_providers;
-
-$beixt_phone = ['name' => 'beixt', 'store_id' => 8,'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6295, 'price' => 48.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6296, 'price' => 97.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6297, 'price' => 195,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
-
-$bxtwt_phone = ['name' => 'bxtwt', 'store_id' => 10,'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6298, 'price' => 48,   'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6299, 'price' => 96,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6300, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
-
-$bjb_phone = ['name' => 'bjb', 'store_id' => 12,'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6305, 'price' => 9.51,  'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6306, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6301, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6302, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6303, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6304, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6327, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6328, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$lingzh_phone = ['name' => 'lingzh', 'store_id' => 28,'qualitys' => '1,3,4,5',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6389, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6389, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6389, 'price' => 9.53, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6389, 'price' => 8.95, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6389, 'price' => 9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-        ],
-        20 => [
-            ['goods_id' => 6390, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6390, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6390, 'price' => 19.06, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6390, 'price' => 17.9, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6390, 'price' => 18, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6391, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6391, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6391, 'price' => 28.59, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6391, 'price' => 26.85, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6391, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6392, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6392, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6392, 'price' => 47.65, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6392, 'price' => 44.75, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6392, 'price' => 45, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6393, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6393, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6393, 'price' => 95.3, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6393, 'price' => 89.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6393, 'price' => 90, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6394, 'price' => 190.60, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6394, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6394, 'price' => 190.60, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6394, 'price' => 179, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6394, 'price' => 180, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6395, 'price' => 285.90, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6395, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6395, 'price' => 285.90, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6395, 'price' => 268.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6395, 'price' => 270, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-        ],
-        500 => [
-            ['goods_id' => 6396, 'price' => 476.50, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6396, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
-            ['goods_id' => 6396, 'price' => 476.50, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6396, 'price' => 447.5,  'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6396, 'price' => 450, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$bjbyd_phone = ['name' => 'bjbyd', 'store_id' => 24,'qualitys' => '1',
-    'amount' => [
-        30 => [['goods_id' => 6367, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6368, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6369, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6370, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$afandnew_phone = ['name' => 'afandnew', 'store_id' => 25,'qualitys' => '1',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6454, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6454, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 6455, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6455, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6386, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6386, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6371, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6371, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6372, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6372, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6373, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6373, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6387, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6387, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 6388, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6388, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ]
-    ],
-    'refill_type' => 'api'];
-
-$tianx_phone = ['name' => 'tianx', 'store_id' => 25,'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6371, 'price' => 46.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6372, 'price' => 93,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6373, 'price' => 186, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
-
-$yifa_phone = ['name' => 'yifa', 'store_id' => 16,'qualitys' => '1',
-    'amount' => [
-        30 => [['goods_id' => 6318, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6319, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6320, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6321, 'price' => 191,  'quality' => 1, 'card_type' => 'chinamobile']]
-    ],
-    'refill_type' => 'api'];
-
-$jiec_phone = ['name' => 'jiec', 'store_id' => 17,'qualitys' => '1',
-    'amount' => [
-        30 => [['goods_id' => 6323, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6324, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6325, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6326, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6329, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6330, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$weit_phone = ['name' => 'weit', 'store_id' => 18,'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6337, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6338, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6331, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6332, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6333, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6334, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6335, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6336, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$afand_phone = ['name' => 'afand', 'store_id' => 26,'qualitys' => '1',
-    'amount' => [
-        30 => [['goods_id' => 6374, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6375, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6376, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6377, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6378, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6379, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$afandeng_phone = ['name' => 'afandeng', 'store_id' => 27,'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6406, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6407, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6380, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6381, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6382, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6383, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6384, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6385, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$tongy_phone = ['name' => 'tongy', 'store_id' => 31,'qualitys' => '2',
-    'amount' => [
-        30 => [['goods_id' => 6408, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6408, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6408, 'price' => 29.64, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        50 => [['goods_id' => 6409, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6409, 'price' => 48.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6409, 'price' => 49.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        100 => [['goods_id' => 6410, 'price' => 99.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6410, 'price' => 97.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6410, 'price' => 98.8, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        200 => [['goods_id' => 6411, 'price' => 198.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6411, 'price' => 194.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6411, 'price' => 197.6, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        300 => [['goods_id' => 6412, 'price' => 297.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6412, 'price' => 291.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6412, 'price' => 296.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        500 => [['goods_id' => 6413, 'price' => 496, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6413, 'price' => 486.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6413, 'price' => 494, 'quality' => 2, 'card_type' => 'chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$weiyi_phone = ['name' => 'weiyi', 'store_id' => 32,'qualitys' => '1',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6414, 'price' => 9.48, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6414, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 6415, 'price' => 18.96, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6415, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6416, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6416, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6416, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6417, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6417, 'price' => 48, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6417, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6418, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6418, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6419, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6419, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6420, 'price' => 284.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6420, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 6421, 'price' => 474, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6421, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$tonglu_phone = ['name' => 'tonglu', 'store_id' => 33,'qualitys' => '4',
-    'amount' => [
-        10 => [['goods_id' => 6422, 'price' => 9.4, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6423, 'price' => 18.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6424, 'price' => 28.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6425, 'price' => 47, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6426, 'price' => 94, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6427, 'price' => 188, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6428, 'price' => 282, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6429, 'price' => 470, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$xc_phone = ['name' => 'xc', 'store_id' => 34, 'qualitys' => '4',
-    'amount' => [
-        10 => [['goods_id' => 6430, 'price' => 9.6, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6431, 'price' => 19.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6432, 'price' => 28.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6433, 'price' => 48, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6434, 'price' => 96, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6435, 'price' => 192, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6436, 'price' => 288, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6437, 'price' => 480, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$xunyin_phone = ['name' => 'xunyin', 'store_id' => 35,'qualitys' => '2',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6438, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6438, 'price' => 9.97, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 6439, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6439, 'price' => 19.94, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6440, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6441, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6441, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6442, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6442, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6443, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6443, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6444, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6444, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 6445, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6445, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
-    'amount' => [
-        10 => [['goods_id' => 6446, 'price' => 9.35, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6447, 'price' => 18.7, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6448, 'price' => 28.05, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6449, 'price' => 46.75, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6450, 'price' => 93.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6451, 'price' => 187, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6452, 'price' => 280.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6453, 'price' => 467.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '4',
-    'amount' => [
-        10 => [['goods_id' => 6464, 'price' => 9.35, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6465, 'price' => 18.6, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6466, 'price' => 27.9, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6467, 'price' => 46.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6468, 'price' => 93, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6469, 'price' => 186, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6470, 'price' => 279, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6471, 'price' => 465, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$luqian_phone = ['name' => 'luqian', 'store_id' => 40, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6472, 'price' => 9.4, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6473, 'price' => 18.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6474, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6475, 'price' => 47, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6476, 'price' => 94, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6477, 'price' => 188, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6478, 'price' => 282, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6479, 'price' => 470, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$afandfs_phone = ['name' => 'afandfs', 'store_id' => 41, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6480, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6481, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6482, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6483, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6484, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6485, 'price' => 189, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6486, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6487, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6457, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$yunlingfs_phone = ['name' => 'yunlingfs', 'store_id' => 42, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6488, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 6489, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile']],
-        30 => [['goods_id' => 6490, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6491, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6492, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6493, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 6494, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 6495, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$tiancheng_phone = ['name' => 'tiancheng', 'store_id' => 43, 'qualitys' => '1',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6496, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6496, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 6497, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6497, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6498, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6498, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6499, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6499, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6500, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6500, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6501, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6501, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6502, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6502, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 6503, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6503, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$suyuan_phone = ['name' => 'suyuan', 'store_id' => 39, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6464, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6465, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6466, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6467, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6468, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6469, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6470, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6471, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$xunao_phone = ['name' => 'xunao', 'store_id' => 44, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6504, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6505, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6506, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6507, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6508, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6509, 'price' => 189, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6510, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6511, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$weiyiman_phone = ['name' => 'weiyiman', 'store_id' => 45, 'qualitys' => '5',
-    'amount' => [
-        10 => [['goods_id' => 6512, 'price' => 8.9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6513, 'price' => 17.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6514, 'price' => 26.7, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6515, 'price' => 44.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6516, 'price' => 89, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6517, 'price' => 178, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6518, 'price' => 267, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6519, 'price' => 445, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$yonghe_phone = ['name' => 'yonghe', 'store_id' => 46,'qualitys' => '2',
-    'amount' => [
-        30 => [['goods_id' => 6520, 'price' => 29.955, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6520, 'price' => 29.985, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6520, 'price' => 29.82, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        50 => [['goods_id' => 6521, 'price' => 49.925, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6521, 'price' => 49.975, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6521, 'price' => 49.7, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        100 => [['goods_id' => 6522, 'price' => 99.85, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6522, 'price' => 99.95, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6522, 'price' => 99.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        200 => [['goods_id' => 6523, 'price' => 199.7, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6523, 'price' => 199.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6523, 'price' => 198.8, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        300 => [['goods_id' => 6524, 'price' => 299.55, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6524, 'price' => 299.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6524, 'price' => 298.2, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        500 => [['goods_id' => 6525, 'price' => 499.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6525, 'price' => 499.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6525, 'price' => 497, 'quality' => 2, 'card_type' => 'chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$jumi_phone = ['name' => 'jumikc', 'store_id' => 47, 'qualitys' => '2',
-    'amount' => [
-        10 => [['goods_id' => 6545, 'price' => 9.72, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6546, 'price' => 19.44, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6547, 'price' => 29.16, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6526, 'price' => 48.6, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6527, 'price' => 97.2, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6528, 'price' => 194.4, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6548, 'price' => 291.6, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6549, 'price' => 486, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$qianqian_phone = ['name' => 'qianqian', 'store_id' => 48, 'qualitys' => '1',
-    'amount' => [
-//        10 => [
-//            ['goods_id' => 6529, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-//        ],
-//        20 => [
-//            ['goods_id' => 74, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-//        ],
-        30 => [
-            ['goods_id' => 6529, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6529, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6530, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6530, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6531, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6531, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6532, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6532, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$fengye_phone = ['name' => 'fengye', 'store_id' => 49, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6533, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6534, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6535, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6536, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6537, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6538, 'price' => 189, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6539, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6540, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$yunsuoyao_phone = ['name' => 'yunsuoyao', 'store_id' => 55, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6571, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6572, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6573, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6574, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6575, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6576, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6577, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6578, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$afd_phone = ['name' => 'afd', 'store_id' => 54,'qualitys' => '1',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6563, 'price' => 9.48, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6563, 'price' => 9.43, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 6564, 'price' => 18.96, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6564, 'price' => 18.86, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6565, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6565, 'price' => 28.29, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6566, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6566, 'price' => 47.15, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6567, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6567, 'price' => 94.3, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6568, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6568, 'price' => 188.6, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6569, 'price' => 284.4, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6569, 'price' => 282.9, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 6570, 'price' => 474, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom'],
-            ['goods_id' => 6570, 'price' => 471.5, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ]
-    ],
-    'refill_type' => 'api'];
-
-$qianqianman_phone = ['name' => 'qianqianman', 'store_id' => 53, 'qualitys' => '7',
-    'amount' => [
-        50 => [
-            ['goods_id' => 6560, 'price' => 45.5, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6561, 'price' => 91, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6562, 'price' => 182, 'quality' => 7, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$weiyiwt_phone = ['name' => 'weiyiwt', 'store_id' => 58,'qualitys' => '1',
-    'amount' => [
-        10 => [
-            ['goods_id' => 6595, 'price' => 9.48, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6595, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 6596, 'price' => 18.96, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6596, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 6597, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6597, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6597, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 6598, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6598, 'price' => 48, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6598, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 6599, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6599, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 6600, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6600, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 6601, 'price' => 284.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6601, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 6602, 'price' => 474, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6602, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$phone_providers = [
-//    ['name' => 'beixt', 'cfg' => $beixt_phone],
-//    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
-    ['name' => 'bjb', 'cfg' => $bjb_phone],
-    ['name' => 'bjbyd', 'cfg' => $bjbyd_phone],
-//    ['name' => 'yifa', 'cfg' => $yifa_phone],
-//    ['name' => 'jiec', 'cfg' => $jiec_phone],
-//    ['name' => 'weit', 'cfg' => $weit_phone],
-
-    ['name' => 'afand', 'cfg' => $afand_phone],
-    ['name' => 'afandeng', 'cfg' => $afandeng_phone],
-    ['name' => 'afandnew', 'cfg' => $afandnew_phone],
-    ['name' => 'lingzh', 'cfg' => $lingzh_phone],
-    ['name' => 'tongy', 'cfg' => $tongy_phone],
-    ['name' => 'weiyi', 'cfg' => $weiyi_phone],
-    ['name' => 'tonglu', 'cfg' => $tonglu_phone],
-    ['name' => 'xc', 'cfg' => $xc_phone],
-    ['name' => 'xunyin', 'cfg' => $xunyin_phone],
-    ['name' => 'wantong', 'cfg' => $wantong_phone],
-    ['name' => 'yunling', 'cfg' => $yunling_phone],
-    ['name' => 'zhongst', 'cfg' => $zhongst_phone],
-    ['name' => 'luqian', 'cfg' => $luqian_phone],
-    ['name' => 'afandfs', 'cfg' => $afandfs_phone],
-    ['name' => 'yunlingfs', 'cfg' => $yunlingfs_phone],
-    ['name' => 'tiancheng', 'cfg' => $tiancheng_phone],
-    ['name' => 'xunao', 'cfg' => $xunao_phone],
-    ['name' => 'weiyiman', 'cfg' => $weiyiman_phone],
-    ['name' => 'yonghe', 'cfg' => $yonghe_phone],
-    ['name' => 'jumikc', 'cfg' => $jumi_phone],
-    ['name' => 'qianqian', 'cfg' => $qianqian_phone],
-    ['name' => 'fengye', 'cfg' => $fengye_phone],
-    ['name' => 'yunsuoyao', 'cfg' => $yunsuoyao_phone],
-    ['name' => 'afd', 'cfg' => $afd_phone],
-    ['name' => 'qianqianman', 'cfg' => $qianqianman_phone],
-    ['name' => 'weiyiwt', 'cfg' => $weiyiwt_phone],
-];
-$config['phone_providers'] = $phone_providers;
-
-
-//以下为三方通道
-$lingzhthird = ['name' => 'lingzhthird', 'store_id' => 52,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6559, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
-$third_providers = [
-    ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
-];
-$config['third_providers'] = $third_providers;

+ 140 - 128
data/config/xyz/refill.ini.php

@@ -759,18 +759,22 @@ $yunlingfs_phone = ['name' => 'yunlingfs', 'store_id' => 42, 'qualitys' => '1',
         20 => [['goods_id' => 6489, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile']],
         30 => [
             ['goods_id' => 6490, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6490, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6490, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6491, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6491, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6491, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 6492, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6492, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6492, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6493, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6493, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6493, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
@@ -982,22 +986,22 @@ $yunsuoyao_phone = ['name' => 'yunsuoyao', 'store_id' => 55, 'qualitys' => '1',
         30 => [
             ['goods_id' => 6573, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6573, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6573, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6573, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6574, 'price' => 48, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6574, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6574, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6574, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 6575, 'price' => 96, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6575, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6575, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6575, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6576, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6576, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6576, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6576, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 
         300 => [
@@ -1687,22 +1691,22 @@ $yunchonggong_phone = ['name' => 'yunchonggong', 'store_id' => 87,'qualitys' =>
         30 => [
             ['goods_id' => 6799, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6799, 'price' => 28.26, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6799, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6799, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6800, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6800, 'price' => 47.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6800, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6800, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 6801, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6801, 'price' => 94.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6801, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6801, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6802, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6802, 'price' => 188.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6802, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6802, 'price' => 189, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
 //            ['goods_id' => 6803, 'price' => 288, 'quality' => 1, 'card_type' => 'chinamobile'],
@@ -2260,22 +2264,22 @@ $wangliantx_phone = ['name' => 'wangliantx', 'store_id' => 112,'qualitys' => '1'
         30 => [
             ['goods_id' => 6981, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6981, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6981, 'price' => 28.83, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6981, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6982, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6982, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6982, 'price' => 48.05, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6982, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 6983, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6983, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6983, 'price' => 96.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6983, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 6984, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6984, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6984, 'price' => 192.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6984, 'price' => 189, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
 //            ['goods_id' => 6985, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile'],
@@ -2342,22 +2346,22 @@ $yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
         30 => [
             ['goods_id' => 7005, 'price' => 28.92, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7005, 'price' => 28.77, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7005, 'price' => 28.83, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7006, 'price' => 48.2, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7006, 'price' => 47.95, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7006, 'price' => 48.05, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7007, 'price' => 96.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7007, 'price' => 95.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7007, 'price' => 96.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7008, 'price' => 192.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7008, 'price' => 191.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7008, 'price' => 192.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7009, 'price' => 289.2, 'quality' => 1, 'card_type' => 'chinamobile'],
@@ -2547,62 +2551,62 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
         5  => [
             ['goods_id' => 7055, 'price' => 5.305, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.085, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.155, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
             ['goods_id' => 7056, 'price' => 6.306, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.102, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.156, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
             ['goods_id' => 7057, 'price' => 7.308, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7057, 'price' => 7.119, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.1575, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
             ['goods_id' => 7058, 'price' => 8.308, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7058, 'price' => 8.136, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
             ['goods_id' => 7059, 'price' => 9.3105, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.153, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.162, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.31, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.04, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.11, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 7061, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7061, 'price' => 20.18, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7061, 'price' => 20.19, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7062, 'price' => 30.33, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 29.985, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7062, 'price' => 30.27, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7062, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7062, 'price' => 30.024, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7063, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 49.975, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7063, 'price' => 50.04, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.175, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 99.95, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7065, 'price' => 199.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7065, 'price' => 200.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7066, 'price' => 299.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7066, 'price' => 300.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
@@ -2710,76 +2714,76 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 //        ],
         30 => [
             ['goods_id' => 7102, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7102, 'price' => 28.32, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7102, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7102, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7102, 'price' => 28.38, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7103, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7103, 'price' => 47.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7103, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7103, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7103, 'price' => 47, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7103, 'price' => 47.3, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7104, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7104, 'price' => 94.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7104, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7104, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7104, 'price' => 94, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7104, 'price' => 94.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7105, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7105, 'price' => 188.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7105, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7105, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7105, 'price' => 188, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7105, 'price' => 189.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
-//        300 => [
-//            ['goods_id' => 7106, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7106, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-//        ],
-//        500 => [
-//            ['goods_id' => 7107, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7107, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-//        ]
+        300 => [
+            ['goods_id' => 7106, 'price' => 282, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7106, 'price' => 283.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7107, 'price' => 470, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7107, 'price' => 473, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
     ],
     'refill_type' => 'api'];
 
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
-        10 => [
-            ['goods_id' => 7108, 'price' => 10.39, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7108, 'price' => 10.39, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 7109, 'price' => 20.46, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7109, 'price' => 20.46, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ],
+//        10 => [
+//            ['goods_id' => 7108, 'price' => 10.39, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7108, 'price' => 10.39, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7109, 'price' => 20.46, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7109, 'price' => 20.46, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        50 => [
+//            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
         100 => [
-            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7112, 'price' => 100.1, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7113, 'price' => 200.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7114, 'price' => 300.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7115, 'price' => 500.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2989,22 +2993,22 @@ $xingzy_normal_phone = ['name' => 'xingzy_normal', 'store_id' => 137, 'qualitys'
         30 => [
             ['goods_id' => 7181, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7181, 'price' => 28.47, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7181, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7181, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7182, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7182, 'price' => 47.45, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7182, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7182, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7183, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7183, 'price' => 94.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7183, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7183, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7184, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7184, 'price' => 189.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7184, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7184, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [['goods_id' => 7185, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
 //        500 => [['goods_id' => 7186, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
@@ -3235,22 +3239,22 @@ $dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'quality
         30 => [
             ['goods_id' => 7269, 'price' => 29.19, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7269, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7269, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinatelecom'],
+            ['goods_id' => 7269, 'price' => 28.47, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         50 => [
             ['goods_id' => 7270, 'price' => 48.15, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7270, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7270, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7270, 'price' => 47.45, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7271, 'price' => 96.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7271, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7271, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7271, 'price' => 94.9, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7272, 'price' => 192.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7272, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7272, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7272, 'price' => 189.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7273, 'price' => 284.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
@@ -4035,31 +4039,31 @@ $yamiao_normal_phone = ['name' => 'yamiao_normal', 'store_id' => 172, 'qualitys'
         30 => [
             ['goods_id' => 7465, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7465, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7465, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinatelecom'],
+            ['goods_id' => 7465, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 7466, 'price' => 47.95, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7466, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7466, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7466, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7466, 'price' => 47, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7467, 'price' => 95.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7467, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7467, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7467, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7467, 'price' => 94, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7468, 'price' => 191.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7468, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7468, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7468, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7468, 'price' => 188, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7469, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7469, 'price' => 287.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7469, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7469, 'price' => 285, 'quality' => 1, 'card_type' => 'chinatelecom']
 
         ],
         500 => [
-            ['goods_id' => 7470, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7470, 'price' => 479.5, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7470, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7470, 'price' => 475, 'quality' => 1, 'card_type' => 'chinatelecom']
 
@@ -4074,22 +4078,22 @@ $cangxin_phone = ['name' => 'cangxin', 'store_id' => 174, 'qualitys' => '1',
         30 => [
             ['goods_id' => 7474, 'price' => 28.77, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7474, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7474, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinatelecom'],
+            ['goods_id' => 7474, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         50 => [
             ['goods_id' => 7475, 'price' => 47.95, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7475, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7475, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7475, 'price' => 47, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7476, 'price' => 95.9, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7476, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7476, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7476, 'price' => 94, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7477, 'price' => 191.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7477, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7477, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7477, 'price' => 188, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [['goods_id' => 7478, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        500 => [['goods_id' => 7479, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
@@ -4413,17 +4417,17 @@ $chizeng_normal_phone = ['name' => 'chizeng_normal', 'store_id' => 182,'qualitys
             ['goods_id' => 7538, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7539, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7539, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7539, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7539, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7540, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7540, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7540, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7540, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7541, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7541, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7541, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7541, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
@@ -4756,21 +4760,29 @@ $cangxin_yi_phone = ['name' => 'cangxin_yi', 'store_id' => 191,'qualitys' => '2'
 
 $zhenghe_phone = ['name' => 'zhenghe', 'store_id' => 192,'qualitys' => '2',
     'amount' => [
-        10 => [['goods_id' => 7625, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 7626, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinamobile']],
+//        10 => [['goods_id' => 7625, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinamobile']],
+//        20 => [['goods_id' => 7626, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinamobile']],
         30 => [
             ['goods_id' => 7627, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7627, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         50 => [
             ['goods_id' => 7628, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7628, 'price' => 50, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         100 => [
             ['goods_id' => 7629, 'price' => 100.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7629, 'price' => 100, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         200 => [
             ['goods_id' => 7630, 'price' => 201, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7630, 'price' => 200, 'quality' => 2, 'card_type' => 'chinaunicom'],
+
+        ],
+        300 => [
+            ['goods_id' => 7631, 'price' => 301.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7631, 'price' => 300, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
-        300 => [['goods_id' => 7631, 'price' => 301.5, 'quality' => 2, 'card_type' => 'chinamobile']],
         500 => [['goods_id' => 7632, 'price' => 502.5, 'quality' => 2, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -5070,12 +5082,12 @@ $ruizhi_tax_phone = ['name' => 'ruizhi_tax', 'store_id' => 202, 'qualitys' => '2
             ['goods_id' => 7697, 'price' => 5.435, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         10 => [
-            ['goods_id' => 7698, 'price' => 10.67, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7698, 'price' => 10.98, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7698, 'price' => 10.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7698, 'price' => 10.62, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7699, 'price' => 21.04, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7699, 'price' => 21.96, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7699, 'price' => 20.82, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7699, 'price' => 21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
@@ -5126,33 +5138,33 @@ $pengxinda_phone = ['name' => 'pengxinda', 'store_id' => 203,'qualitys' => '2',
 //        ],
         30 => [
 //            ['goods_id' => 7708, 'price' => 31.11, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7708, 'price' => 31.11, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7708, 'price' => 31.065, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7708, 'price' => 31.11, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7709, 'price' => 51.85, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7709, 'price' => 51.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7709, 'price' => 51.775, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7709, 'price' => 51.85, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7710, 'price' => 103.7, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7710, 'price' => 103.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7710, 'price' => 103.7, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7710, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7710, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7710, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7711, 'price' => 207.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7711, 'price' => 207.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7711, 'price' => 207.4, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7711, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7711, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7711, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7712, 'price' => 311.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7712, 'price' => 311.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7712, 'price' => 311.1, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7712, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7712, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7712, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7713, 'price' => 518.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7713, 'price' => 518, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7713, 'price' => 518.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7713, 'price' => 518.5, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7713, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -5168,22 +5180,22 @@ $huazhong_phone = ['name' => 'huazhong', 'store_id' => 204, 'qualitys' => '1',
 //            ['goods_id' => 7715, 'price' => 18.96, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
         30 => [
-            ['goods_id' => 7716, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7716, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7716, 'price' => 28.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7716, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7717, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7717, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7717, 'price' => 46.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7717, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 7718, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7718, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7718, 'price' => 93.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7718, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7719, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7719, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7719, 'price' => 187.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7719, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],

+ 7 - 7
data/config/guozi/base.ini.php

@@ -29,7 +29,7 @@ $config['node_site_url'] 		= 'http://127.0.0.1:8090';
 $config['delivery_site_url']    = SRV_HOST.'/delivery';
 
 $config['system_manager_phones'] = [
-    '13911129867'
+    '15811535608' , '18500608333' , '18500350111' , '15136908757'
 ];
 
 if(defined('USE_REMOTE_IMAGE') && USE_REMOTE_IMAGE == true) {
@@ -49,15 +49,15 @@ $config['tablepre']	= 'lrlz_';
 $config['db'][1]['dbhost']       = MASTER_DBHOST;
 $config['db'][1]['dbport']       = '3306';
 $config['db'][1]['dbuser']       = 'root';
-$config['db'][1]['dbpwd']        = 'XYZshop@1234';
-$config['db'][1]['dbname']       = 'xyzshop';
+$config['db'][1]['dbpwd']        = 'XTZ@shop@951688';
+$config['db'][1]['dbname']       = 'ylshop';
 $config['db'][1]['dbcharset']    = 'UTF-8';
 
 $config['db']['slave'][0]['dbhost']     = SLAVE_DBHOST;
 $config['db']['slave'][0]['dbport']     = '3306';
 $config['db']['slave'][0]['dbuser']     = 'root';
-$config['db']['slave'][0]['dbpwd']      = 'XYZshop@1234';
-$config['db']['slave'][0]['dbname']     = 'xyzshop';
+$config['db']['slave'][0]['dbpwd']      = 'XTZ@shop@951688';
+$config['db']['slave'][0]['dbname']     = 'ylshop';
 $config['db']['slave'][0]['dbcharset']  = 'UTF-8';
 
 $config['session_expire'] 	= 3600;
@@ -75,7 +75,7 @@ $config['redis']['slave']['host']     	= SLAVE_REDISHOST;
 $config['redis']['slave']['port']     	= 6379;
 $config['redis']['slave']['pconnect'] 	= 0;
 
-$config['coroutine']['redis_host'] = '172.30.108.29';
+$config['coroutine']['redis_host'] = COROUTINE_REDISHOST;
 $config['coroutine']['redis_port'] = 6379;
 
 
@@ -107,7 +107,7 @@ $config['cache_open']    = true;
 
 $config['return_address'] = ['address' => '上海市金山区朱吕公路7335号','name' => "大熊猫(丽帆供应链)",'tel_phone' => '17301603655','zip_code' => '201600'];
 $config['area_version'] = 5;
-$config['appjump_prefix'] = 'xyzshop://dd.guozipay.com';
+$config['appjump_prefix'] = 'xyzshop://www.xyzshops.com';
 
 $config['client_setting'] = ['running' => 174,'home' => 0];
 $config['wsd_bradge_port'] = 60987;

data/config/guozi/pay.ini.php → data/config/yl/pay.ini.php


File diff suppressed because it is too large
+ 5418 - 0
data/config/yl/refill.ini.php


data/config/guozi/special.ini.php → data/config/yl/special.ini.php


data/config/guozi/srv.ini.php → data/config/yl/srv.ini.php


data/config/guozi/ugcman.config.ini → data/config/yl/ugcman.config.ini


data/config/guozi/vgoods.ini.php → data/config/yl/vgoods.ini.php


data/config/guozi/webacc.config.ini → data/config/yl/webacc.config.ini


+ 0 - 147
docker/compose/tmp/gz-acc/docker-compose.yml

@@ -1,147 +0,0 @@
-version: "3.7"
-
-services:
-  nginxsrv:
-    image: nginx:alpine
-    ports:
-      - "80:80"
-    volumes:
-      - ../../../:/var/www/html
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - /nfs/upload:/var/www/html/data/upload
-      - /nfs/merchant:/var/www/html/merchant
-      - /nfs/icp:/var/www/html/icp
-      - ../../conf/nginx/nginx-gz-http.conf:/etc/nginx/nginx.conf:ro
-    container_name: "panda-nginx"
-    command: [nginx,'-g','daemon off;']
-    extra_hosts:
-      - "docker.hostip:172.17.0.1"
-      - "eth.hostip:172.30.108.29"
-
-  redisrv:
-    image: redis:alpine
-    ports:
-      - "6379:6379"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/redis/6379.conf:/etc/redis/redis.conf
-      - /mnt/redisdata:/data
-    container_name: "panda-redis"
-    command: [redis-server,"/etc/redis/redis.conf"]
-
-  mobilesrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9100:9100"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-mobile-spwan-start:/usr/local/bin/docker-spwan-start
-    container_name: "panda-mobile"
-    command: ['docker-spwan-start']
-    depends_on:
-      - "redisrv"
-
-  mobilesrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9100:9100"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mobile-spwan-start:/usr/local/bin/docker-spwan-start
-    container_name: "panda-mobile"
-    command: ['docker-spwan-start']
-    depends_on:
-      - "redisrv"
-
-  raccsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9101:9101"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/racc-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-racc"
-    command: [docker-spwan-start]
-    depends_on:
-      - "redisrv"
-
-  mchsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9102:9102"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mch-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-merchant"
-    command: [docker-spwan-start]
-    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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../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"
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../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"
-
-  cronsec:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-cronsec"
-    command: [php,"/var/www/html/crontab/index.php",'minutes','second_queue']
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"
-    depends_on:
-      - "redisrv"

+ 0 - 45
docker/compose/tmp/gz-worker/docker-compose.yml

@@ -1,45 +0,0 @@
-version: "3.7"
-
-services:
-  cordsrv:
-    image: php-swool-redis:latest
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-php-swoole.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-codispatcher"
-    command: [php,"/var/www/html/rdispatcher/codispatcher.php","8"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../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"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-searcher"
-    command: [php, "/var/www/html/searcher.php"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"

+ 0 - 149
docker/compose/tmp/lz-acc/docker-compose.yml

@@ -1,149 +0,0 @@
-version: "3.7"
-
-services:
-  nginxsrv:
-    image: nginx:alpine
-    ports:
-      - "80:80"
-    volumes:
-      - ../../../:/var/www/html
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - /nfs/upload:/var/www/html/data/upload
-      - /nfs/merchant:/var/www/html/merchant
-      - /nfs/icp:/var/www/html/icp
-      - ../../conf/nginx/nginx-linzh-http.conf:/etc/nginx/nginx.conf:ro
-    container_name: "panda-nginx"
-    command: [nginx,'-g','daemon off;']
-    extra_hosts:
-      - "docker.hostip:172.17.0.1"
-      - "eth.hostip:172.16.110.28"
-
-  nginxhttps:
-    image: nginx:alpine
-    ports:
-      - "443:443"
-    volumes:
-      - ../../../:/var/www/html
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - /nfs/upload:/var/www/html/data/upload
-      - /nfs/merchant:/var/www/html/merchant
-      - ../../conf/nginx/cert:/etc/nginx/cert
-      - /nfs/icp:/var/www/html/icp
-      - ../../conf/nginx/nginx-linzh-https.conf:/etc/nginx/nginx.conf:ro
-    container_name: "panda-nginx-https"
-    command: [nginx,'-g','daemon off;']
-    extra_hosts:
-      - "docker.hostip:172.17.0.1"
-      - "eth.hostip:172.16.110.28"
-
-  redisrv:
-    image: redis:alpine
-    ports:
-      - "6379:6379"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/redis/6379.conf:/etc/redis/redis.conf
-      - /mnt/redisdata:/data
-    container_name: "panda-redis"
-    command: [redis-server,"/etc/redis/redis.conf"]
-
-  mobilesrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9100:9100"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-mobile-spwan-start:/usr/local/bin/docker-spwan-start
-    container_name: "panda-mobile"
-    command: ['docker-spwan-start']
-    depends_on:
-      - "redisrv"
-
-  raccsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9101:9101"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/racc-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-racc"
-    command: [docker-spwan-start]
-    depends_on:
-      - "redisrv"
-
-  mchsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9102:9102"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mch-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-merchant"
-    command: [docker-spwan-start]
-    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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../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"
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../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"
-
-  cronsec:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-cronsec"
-    command: [php,"/var/www/html/crontab/index.php",'minutes','second_queue']
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"
-    depends_on:
-      - "redisrv"

+ 0 - 4
docker/compose/tmp/lz-acc/restart.sh

@@ -1,4 +0,0 @@
-docker-compose stop -t 1200 mobilesrv raccsrv mchsrv websrv crontabsrv cronsec
-docker-compose up -d
-docker-compose up -d
-docker-compose ps

+ 0 - 47
docker/compose/tmp/lz-stat/docker-compose.yml

@@ -1,47 +0,0 @@
-version: "3.7"
-
-services:
-  readersrv:
-    image: pycpu:3.7.10
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-reader"
-    command: ['python','reader.py','-h', '172.16.110.28', '-p', '6379']
-
-  mchreadersrv:
-    image: pycpu:3.7.10
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-mchreader"
-    command: ['python','mchreader.py', '-h', '172.16.110.28', '-p', '6379']
-
-  ratiosrv:
-    image: pycpu:3.7.10
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-ratio"
-    command: ['python','ratio.py', '-h','172.16.110.28', '-p', '6379']
-
-  flasksrv:
-    image: pycpu:3.7.10
-    ports:
-      - "5000:5000"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-flask"
-    command: ['python','app.py']

+ 0 - 60
docker/compose/tmp/lz-worker/docker-compose.yml

@@ -1,60 +0,0 @@
-version: "3.7"
-
-services:
-#  rdsrv:
-#    image: php-zts-debug:7.3.18
-#    volumes:
-#      - ../../conf/etc/localtime:/etc/localtime:ro
-#      - ../../../:/var/www/html
-#      - /nfs/upload:/var/www/html/data/upload
-#      - /mnt/shoplog:/var/www/html/data/log
-#      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-#    container_name: "panda-dispatcher"
-#    command: [php,"/var/www/html/rdispatcher/dispatcher.php","20"]
-
-  cordsrv:
-    image: php-swool-redis:latest
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-php-swoole.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-codispatcher"
-    command: [php,"/var/www/html/rdispatcher/codispatcher.php","16"]
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../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"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/lz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-searcher"
-    command: [php, "/var/www/html/searcher.php"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"

+ 0 - 3
docker/compose/tmp/lz-worker/restart.sh

@@ -1,3 +0,0 @@
-docker-compose stop -t 1200 cordsrv
-docker-compose down
-docker-compose up -d

+ 0 - 146
docker/compose/tmp/xyz-acc/docker-compose.yml

@@ -1,146 +0,0 @@
-version: "3.7"
-
-services:
-  nginxsrv:
-    image: nginx:alpine
-    ports:
-      - "443:443"
-      - "80:80"
-    volumes:
-      - ../../../:/var/www/html
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - /nfs/upload:/var/www/html/data/upload
-      - /nfs/merchant:/var/www/html/merchant
-      - /nfs/icp:/var/www/html/icp
-      - ../../conf/nginx/cert:/etc/nginx/cert
-      - ../../conf/nginx/nginx-xyz-https.conf:/etc/nginx/nginx.conf:ro
-    container_name: "panda-nginx"
-    command: [nginx,'-g','daemon off;']
-    extra_hosts:
-      - "docker.hostip:172.17.0.1"
-      - "eth.hostip:172.26.105.125"
-
-  redisrv:
-    image: redis:alpine
-    ports:
-      - "6379:6379"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/redis/6379.conf:/etc/redis/redis.conf
-      - /mnt/redisdata:/data
-    container_name: "panda-redis"
-    command: [redis-server,"/etc/redis/redis.conf"]
-
-  mobilesrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9100:9100"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mobile-spwan-start:/usr/local/bin/docker-spwan-start
-    container_name: "panda-mobile"
-    command: ['docker-spwan-start']
-    depends_on:
-      - "redisrv"
-
-  raccsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9101:9101"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/racc-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-racc"
-    command: [docker-spwan-start]
-    depends_on:
-      - "redisrv"
-
-  mchsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9102:9102"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mch-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-merchant"
-    command: [docker-spwan-start]
-    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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-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"
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-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"
-
-  cronsec:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-cronsec"
-    command: [php,"/var/www/html/crontab/index.php",'minutes','second_queue']
-
-  wsdsrv:
-    image: php-zts-debug:7.3.18
-    ports:
-      - "60987:60987"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-wsd"
-    command: [php,"/var/www/html/wsd_bridge.php"]
-
-  phpcli:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"
-    depends_on:
-      - "redisrv"

+ 0 - 30
docker/compose/tmp/xyz-admin/docker-compose.yml

@@ -1,30 +0,0 @@
-version: "3.7"
-
-services:
-  mchsrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9102:9102"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mch-spwan-start-lz:/usr/local/bin/docker-spwan-start
-    container_name: "panda-merchant"
-    command: [docker-spwan-start]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-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]

+ 0 - 83
docker/compose/tmp/xyz-arw/docker-compose.yml

@@ -1,83 +0,0 @@
-version: "3.7"
-
-services:
-  nginxsrv:
-    image: nginx:alpine
-    ports:
-      - "443:443"
-      - "80:80"
-    volumes:
-      - ../../../:/var/www/html
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - /nfs/upload:/var/www/html/data/upload
-      - /nfs/merchant:/var/www/html/merchant
-      - /nfs/icp:/var/www/html/icp
-      - ../../conf/nginx/cert:/etc/nginx/cert
-      - ../../conf/nginx/nginx-xyz-https.conf:/etc/nginx/nginx.conf:ro
-    container_name: "panda-nginx"
-    command: [nginx,'-g','daemon off;']
-    extra_hosts:
-      - "docker.hostip:172.17.0.1"
-
-  mobilesrv:
-    image: php-zts:7.3.18
-    ports:
-      - "9100:9100"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/mobile-spwan-start:/usr/local/bin/docker-spwan-start
-    container_name: "panda-mobile"
-    command: ['docker-spwan-start']
-    depends_on:
-      - "redisrv"
-
-  cordsrv:
-    image: php-swool-redis:latest
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php-swoole.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-codispatcher"
-    command: [php,"/var/www/html/rdispatcher/codispatcher.php","16"]
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-queue"
-    command: [php,"/var/www/html/queue/index.php", "queue", "index"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-searcher"
-    command: [php, "/var/www/html/searcher.php"]
-
-  phpcli:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"

+ 0 - 47
docker/compose/tmp/xyz-stat/docker-compose.yml

@@ -1,47 +0,0 @@
-version: "3.7"
-
-services:
-  readersrv:
-    image: pycpu:3.7.10
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-reader"
-    command: ['python','reader.py', '-h', '172.26.105.125', '-p', '6379']
-
-  mchreadersrv:
-    image: pycpu:3.7.10
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-mchreader"
-    command: ['python','mchreader.py', '-h', '172.26.105.125', '-p', '6379']
-
-  ratiosrv:
-    image: pycpu:3.7.10
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-ratio"
-    command: ['python','ratio.py', '-h', '172.26.105.125', '-p', '6379']
-
-  flasksrv:
-    image: pycpu:3.7.10
-    ports:
-      - "5000:5000"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - /mnt/stdata:/var/www/html/data/stdata
-    container_name: "panda-flask"
-    command: ['python','app.py']

+ 0 - 38
docker/compose/tmp/xyz-storage/docker-compose.yml

@@ -1,38 +0,0 @@
-version: "3.7"
-
-services:
-  redisrv:
-    image: redis:alpine
-    ports:
-      - "6379:6379"
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/redis/6379.conf:/etc/redis/redis.conf
-      - /mnt/redisdata:/data
-    container_name: "panda-redis"
-    command: [redis-server,"/etc/redis/redis.conf"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-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"
-
-  cronsec:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-cronsec"
-    command: [php,"/var/www/html/crontab/index.php",'minutes','second_queue']

+ 0 - 49
docker/compose/tmp/xyz-worker/docker-compose.yml

@@ -1,49 +0,0 @@
-version: "3.7"
-
-services:
-  cordsrv:
-    image: php-swool-redis:latest
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php-swoole.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-codispatcher"
-    command: [php,"/var/www/html/rdispatcher/codispatcher.php","16"]
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-queue"
-    command: [php,"/var/www/html/queue/index.php", "queue", "index"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-searcher"
-    command: [php, "/var/www/html/searcher.php"]
-
-  phpcli:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"

+ 0 - 4
docker/compose/tmp/xyz-worker/restart.sh

@@ -1,4 +0,0 @@
-docker-compose stop -t 1200 cordsrv
-docker-compose down
-docker-compose up -d
-docker-compose ps

+ 0 - 45
docker/compose/tmp/xyzab-worker/docker-compose.yml

@@ -1,45 +0,0 @@
-version: "3.7"
-
-services:
-  cordsrv:
-    image: php-swool-redis:latest
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php-swoole.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-codispatcher"
-    command: [php,"/var/www/html/rdispatcher/codispatcher.php","1"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-queue"
-    command: [php,"/var/www/html/queue/index.php", "queue", "index"]
-
-  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
-      - /mnt/shoplog:/var/www/html/data/log
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-    container_name: "panda-searcher"
-    command: [php, "/var/www/html/searcher.php"]
-
-  phpcli:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - ../../conf/etc/localtime:/etc/localtime:ro
-      - ../../conf/php/xyz-php.ini:/usr/local/etc/php/php.ini
-      - ../../../:/var/www/html
-      - /nfs/upload:/var/www/html/data/upload
-      - /mnt/shoplog:/var/www/html/data/log
-    container_name: "panda-php"

+ 3 - 0
docker/compose/yl/conf/crontab/root

@@ -0,0 +1,3 @@
+# do daily/weekly/monthly maintenance
+# min	hour	day	month	weekday	command
+*    *   *   *   *   php /var/www/html/crontab/index.php minutes index

+ 6 - 0
docker/compose/yl/conf/crontab/slave_root

@@ -0,0 +1,6 @@
+# do daily/weekly/monthly maintenance
+# min	hour	day	month	weekday	command
+0   1   *   *   *   php /var/www/html/crontab/index.php date refill_clear
+1   0   *   *   *   php /var/www/html/crontab/index.php date merchant_nightime
+1   6   *   *   *   php /var/www/html/crontab/index.php date merchant_daytime
+0   0    *   *   *  php /var/www/html/crontab/index.php date merchant_available

BIN
docker/compose/yl/conf/etc/localtime


+ 129 - 0
docker/compose/yl/conf/nginx/nginx.conf

@@ -0,0 +1,129 @@
+user nginx;
+worker_processes  16;
+error_log   /var/error.log  info;
+worker_rlimit_nofile 10240;
+
+events {
+    worker_connections  8192;
+    multi_accept on;
+    use epoll;
+}
+
+http 
+{
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    underscores_in_headers on;
+    client_max_body_size 32M;
+    client_body_buffer_size 1024K;
+
+    tcp_nopush on;
+
+    sendfile            on;
+    keepalive_timeout   300;
+
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent" "$http_x_forwarded_for"';
+
+    server 
+    {
+    	listen       80;
+        set  $folder_name /var/www/html;
+        server_name ylapi.xyzshops.cn;
+        root $folder_name;
+        index index.html index.php; 
+
+    	proxy_connect_timeout 500s;
+        proxy_read_timeout 500s;
+        proxy_send_timeout 500s;
+
+        fastcgi_connect_timeout 75;
+        fastcgi_read_timeout 600;   
+        fastcgi_send_timeout 600;
+        fastcgi_buffer_size  32K;
+        fastcgi_buffers      32 32K;
+
+        set_real_ip_from 100.64.0.0/10;
+        real_ip_header X-Forwarded-For;
+
+        charset utf-8;
+        
+        location /logs {
+            deny all;
+            return 403;
+        }
+
+        location /data/log {
+            deny all;
+            return 403;
+        }
+        location / {
+            index  index.html index.htm index.php;
+        }
+        
+        location /mshop {
+            root $folder_name;
+            autoindex on;        
+            index  index.html index.htm index.php;
+	        try_files $uri $uri/ /mshop/index.html;
+        }
+
+        location /plot {
+            deny all;
+            return 403;
+        }
+
+        location /merchant {
+            deny all;
+            return 403;
+        }
+
+        location /mchsrv {
+            deny all;
+            return 403;
+        }
+
+        location ~ /mobile/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9700;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ /mobile/[/\w]+\.html$ {
+            try_files $uri $uri/ /mobile/index.html;
+        }
+
+        location ~ /racc/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9701;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ \.php$ {
+	        add_header Cache-Control no-store;
+            root           $folder_name;
+            fastcgi_pass   172.26.80.6:9600; #39.103.141.163
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_buffer_size  1024K;
+            fastcgi_buffers      32 1024K;
+            proxy_buffer_size  128k;     #设置缓冲区的大小和数量
+            proxy_buffers 100  128k;     #
+            proxy_read_timeout 900s;
+            proxy_send_timeout 900s;
+            fastcgi_read_timeout 900;
+            fastcgi_send_timeout 900;
+            keepalive_timeout    900;
+
+            include        fastcgi_params;
+        }
+    }
+}

+ 141 - 0
docker/compose/yl/conf/nginx/nginx_admin.conf

@@ -0,0 +1,141 @@
+user nginx;
+worker_processes  16;
+error_log   /var/error.log  info;
+worker_rlimit_nofile 10240;
+
+events {
+    worker_connections  8192;
+    multi_accept on;
+    use epoll;
+}
+
+http 
+{
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    underscores_in_headers on;
+    client_max_body_size 32M;
+    client_body_buffer_size 1024K;
+
+    tcp_nopush on;
+
+    sendfile            on;
+    keepalive_timeout   300;
+
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent" "$http_x_forwarded_for"';
+
+    server 
+    {
+    	listen       80;
+        set  $folder_name /var/www/html;
+        server_name ylweb.xyzshops.cn;
+        root $folder_name;
+        index index.html index.php; 
+
+    	proxy_connect_timeout 500s;
+        proxy_read_timeout 500s;
+        proxy_send_timeout 500s;
+
+        fastcgi_connect_timeout 75;
+        fastcgi_read_timeout 600;   
+        fastcgi_send_timeout 600;
+        fastcgi_buffer_size  32K;
+        fastcgi_buffers      32 32K;
+
+        set_real_ip_from 100.64.0.0/10;
+        real_ip_header X-Forwarded-For;
+
+        charset utf-8;
+        
+        location /logs {
+            deny all;
+            return 403;
+        }
+
+        location /data/log {
+            deny all;
+            return 403;
+        }
+        location / {
+            index  index.html index.htm index.php;
+        }
+        
+        location /mshop {
+            root $folder_name;
+            autoindex on;        
+            index  index.html index.htm index.php;
+	        try_files $uri $uri/ /mshop/index.html;
+        }
+
+        location /plot {
+            root $folder_name;
+            proxy_pass         http://172.26.95.252:5000; #指向39.101.140.116
+            proxy_redirect     off;
+
+            proxy_set_header   Host                 $host;
+            proxy_set_header   X-Real-IP            $remote_addr;
+            proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
+            proxy_set_header   X-Forwarded-Proto    $scheme;
+        }
+
+        location /merchant {
+            root $folder_name;
+            autoindex on;
+            index  index.html index.htm index.php;
+            try_files $uri $uri/ /merchant/index.html;
+        }
+
+        location ~ /mobile/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9700;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ /mobile/[/\w]+\.html$ {
+            try_files $uri $uri/ /mobile/index.html;
+        }
+
+        location ~ /racc/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9701;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ /mchsrv/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   172.26.80.6:9702;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ \.php$ {
+	        add_header Cache-Control no-store;
+            root           $folder_name;
+            fastcgi_pass   172.26.80.6:9600;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_buffer_size  1024K;
+            fastcgi_buffers      32 1024K;
+            proxy_buffer_size  128k;     #设置缓冲区的大小和数量
+            proxy_buffers 100  128k;     #
+            proxy_read_timeout 900s;
+            proxy_send_timeout 900s;
+            fastcgi_read_timeout 900;
+            fastcgi_send_timeout 900;
+            keepalive_timeout    900;
+
+            include        fastcgi_params;
+        }
+    }
+}

+ 146 - 0
docker/compose/yl/conf/php-fpm/php-fpm.conf

@@ -0,0 +1,146 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr/local). This prefix can be dynamically changed by using the
+; '-p' argument from the command line.
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /usr/local/var
+; Default Value: none
+;pid = run/php-fpm.pid
+
+; Error log file
+; If it's set to "syslog", log is sent to syslogd instead of being written
+; into a local file.
+; Note: the default prefix is /usr/local/var
+; Default Value: log/php-fpm.log
+;error_log = log/php-fpm.log
+
+; syslog_facility is used to specify what type of program is logging the
+; message. This lets syslogd specify that messages from different facilities
+; will be handled differently.
+; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
+; Default Value: daemon
+;syslog.facility = daemon
+
+; syslog_ident is prepended to every message. If you have multiple FPM
+; instances running on the same server, you can change the default value
+; which must suit common needs.
+; Default Value: php-fpm
+;syslog.ident = php-fpm
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; Log limit on number of characters in the single line (log entry). If the
+; line is over the limit, it is wrapped on multiple lines. The limit is for
+; all logged characters including message prefix and suffix if present. However
+; the new line character does not count into it as it is present only when
+; logging to a file descriptor. It means the new line character is not present
+; when logging to syslog.
+; Default Value: 1024
+;log_limit = 4096
+
+; Log buffering specifies if the log line is buffered which means that the
+; line is written in a single write operation. If the value is false, then the
+; data is written directly into the file descriptor. It is an experimental
+; option that can potentionaly improve logging performance and memory usage
+; for some heavy logging scenarios. This option is ignored if logging to syslog
+; as it has to be always buffered.
+; Default value: yes
+;log_buffering = no
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated.  This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; The maximum number of processes FPM will fork. This has been designed to control
+; the global number of processes when using dynamic PM within a lot of pools.
+; Use it with caution.
+; Note: A value of 0 indicates no limit
+; Default Value: 0
+; process.max = 128
+
+; Specify the nice(2) priority to apply to the master process (only if set)
+; The value can vary from -19 (highest priority) to 20 (lowest priority)
+; Note: - It will only work if the FPM master process is launched as root
+;       - The pool process will inherit the master process priority
+;         unless specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+; Set open file descriptor rlimit for the master process.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit for the master process.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Specify the event mechanism FPM will use. The following is available:
+; - select     (any POSIX os)
+; - poll       (any POSIX os)
+; - epoll      (linux >= 2.5.44)
+; - kqueue     (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
+; - /dev/poll  (Solaris >= 7)
+; - port       (Solaris >= 10)
+; Default Value: not set (auto detection)
+;events.mechanism = epoll
+
+; When FPM is built with systemd integration, specify the interval,
+; in seconds, between health report notification to systemd.
+; Set to 0 to disable.
+; Available Units: s(econds), m(inutes), h(ours)
+; Default Unit: seconds
+; Default value: 10
+;systemd_interval = 10
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options.  The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+;  - the global prefix if it's been set (-p argument)
+;  - /usr/local otherwise
+include=etc/php-fpm.d/*.conf
+
+pm.max_children = 50
+pm.max_spare_servers = 10

+ 12 - 0
docker/compose/yl/conf/php/mch-spwan-start

@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+spawn-fcgi -a 0.0.0.0 -p 9102 -F 8 -f "php /var/www/html/mchsrv/mchsrv_run.php"
+
+
+time=$(date "+%Y%m%d")
+
+if [ ! -f "/var/www/html/data/log/${time}-mchsrv.log" ]; then
+    touch "/var/www/html/data/log/${time}-mchsrv.log"
+fi
+
+tail -f "/var/www/html/data/log/${time}-mchsrv.log"

+ 11 - 0
docker/compose/yl/conf/php/mobile-spwan-start

@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+spawn-fcgi -a 0.0.0.0 -p 9100 -F 16 -f "php /var/www/html/mobile/mobile_run.php"
+
+time=$(date "+%Y%m%d")
+
+if [ ! -f "/var/www/html/data/log/${time}-mobile.log" ]; then
+    touch "/var/www/html/data/log/${time}-mobile.log"
+fi
+
+tail -f "/var/www/html/data/log/${time}-mobile.log"

File diff suppressed because it is too large
+ 1944 - 0
docker/compose/yl/conf/php/php-swoole.ini


File diff suppressed because it is too large
+ 1942 - 0
docker/compose/yl/conf/php/php.ini


+ 944 - 0
docker/compose/yl/conf/redis/6379.conf

@@ -0,0 +1,944 @@
+## Generated by install_server.sh ##
+# Redis configuration file example.
+#
+# Note that in order to read the configuration file, Redis must be
+# started with the file path as first argument:
+#
+# ./redis-server /path/to/redis.conf
+
+# Note on units: when memory size is needed, it is possible to specify
+# it in the usual form of 1k 5GB 4M and so forth:
+#
+# 1k => 1000 bytes
+# 1kb => 1024 bytes
+# 1m => 1000000 bytes
+# 1mb => 1024*1024 bytes
+# 1g => 1000000000 bytes
+# 1gb => 1024*1024*1024 bytes
+#
+# units are case insensitive so 1GB 1Gb 1gB are all the same.
+
+################################## INCLUDES ###################################
+
+# Include one or more other config files here.  This is useful if you
+# have a standard template that goes to all Redis servers but also need
+# to customize a few per-server settings.  Include files can include
+# other files, so use this wisely.
+#
+# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
+# from admin or Redis Sentinel. Since Redis always uses the last processed
+# line as value of a configuration directive, you'd better put includes
+# at the beginning of this file to avoid overwriting config change at runtime.
+#
+# If instead you are interested in using includes to override configuration
+# options, it is better to use include as the last line.
+#
+# include /path/to/local.conf
+# include /path/to/other.conf
+
+################################ GENERAL  #####################################
+
+# By default Redis does not run as a daemon. Use 'yes' if you need it.
+# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+daemonize no
+
+# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+# default. You can specify a custom pid file location here.
+pidfile /var/run/redis.pid
+
+# Accept connections on the specified port, default is 6379.
+# If port 0 is specified Redis will not listen on a TCP socket.
+port 6379
+
+# TCP listen() backlog.
+#
+# In high requests-per-second environments you need an high backlog in order
+# to avoid slow clients connections issues. Note that the Linux kernel
+# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
+# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
+# in order to get the desired effect.
+tcp-backlog 511
+
+# By default Redis listens for connections from all the network interfaces
+# available on the server. It is possible to listen to just one or multiple
+# interfaces using the "bind" configuration directive, followed by one or
+# more IP addresses.
+#
+# Examples:
+#
+# bind 192.168.1.100 10.0.0.1
+bind 0.0.0.0
+
+# Specify the path for the Unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+# unixsocket /tmp/redis.sock
+# unixsocketperm 700
+
+# Close the connection after a client is idle for N seconds (0 to disable)
+timeout 0
+
+# TCP keepalive.
+#
+# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
+# of communication. This is useful for two reasons:
+#
+# 1) Detect dead peers.
+# 2) Take the connection alive from the point of view of network
+#    equipment in the middle.
+#
+# On Linux, the specified value (in seconds) is the period used to send ACKs.
+# Note that to close the connection the double of the time is needed.
+# On other kernels the period depends on the kernel configuration.
+#
+# A reasonable value for this option is 60 seconds.
+tcp-keepalive 0
+
+# Specify the server verbosity level.
+# This can be one of:
+# debug (a lot of information, useful for development/testing)
+# verbose (many rarely useful info, but not a mess like the debug level)
+# notice (moderately verbose, what you want in production probably)
+# warning (only very important / critical messages are logged)
+loglevel notice
+
+# Specify the log file name. Also the empty string can be used to force
+# Redis to log on the standard output. Note that if you use standard
+# output for logging but daemonize, logs will be sent to /dev/null
+logfile redis.log
+
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
+# Set the number of databases. The default database is DB 0, you can select
+# a different one on a per-connection basis using SELECT <dbid> where
+# dbid is a number between 0 and 'databases'-1
+databases 16
+
+################################ SNAPSHOTTING  ################################
+#
+# Save the DB on disk:
+#
+#   save <seconds> <changes>
+#
+#   Will save the DB if both the given number of seconds and the given
+#   number of write operations against the DB occurred.
+#
+#   In the example below the behaviour will be to save:
+#   after 900 sec (15 min) if at least 1 key changed
+#   after 300 sec (5 min) if at least 10 keys changed
+#   after 60 sec if at least 10000 keys changed
+#
+#   Note: you can disable saving completely by commenting out all "save" lines.
+#
+#   It is also possible to remove all the previously configured save
+#   points by adding a save directive with a single empty string argument
+#   like in the following example:
+#
+#   save ""
+
+save 900 1
+save 300 10
+save 60 10000
+
+# By default Redis will stop accepting writes if RDB snapshots are enabled
+# (at least one save point) and the latest background save failed.
+# This will make the user aware (in a hard way) that data is not persisting
+# on disk properly, otherwise chances are that no one will notice and some
+# disaster will happen.
+#
+# If the background saving process will start working again Redis will
+# automatically allow writes again.
+#
+# However if you have setup your proper monitoring of the Redis server
+# and persistence, you may want to disable this feature so that Redis will
+# continue to work as usual even if there are problems with disk,
+# permissions, and so forth.
+stop-writes-on-bgsave-error no
+
+# Compress string objects using LZF when dump .rdb databases?
+# For default that's set to 'yes' as it's almost always a win.
+# If you want to save some CPU in the saving child set it to 'no' but
+# the dataset will likely be bigger if you have compressible values or keys.
+rdbcompression yes
+
+# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
+# This makes the format more resistant to corruption but there is a performance
+# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
+# for maximum performances.
+#
+# RDB files created with checksum disabled have a checksum of zero that will
+# tell the loading code to skip the check.
+rdbchecksum yes
+
+# The filename where to dump the DB
+dbfilename dump.rdb
+
+# The working directory.
+#
+# The DB will be written inside this directory, with the filename specified
+# above using the 'dbfilename' configuration directive.
+#
+# The Append Only File will also be created inside this directory.
+#
+# Note that you must specify a directory here, not a file name.
+dir /data
+
+################################# REPLICATION #################################
+
+# Master-Slave replication. Use slaveof to make a Redis instance a copy of
+# another Redis server. A few things to understand ASAP about Redis replication.
+#
+# 1) Redis replication is asynchronous, but you can configure a master to
+#    stop accepting writes if it appears to be not connected with at least
+#    a given number of slaves.
+# 2) Redis slaves are able to perform a partial resynchronization with the
+#    master if the replication link is lost for a relatively small amount of
+#    time. You may want to configure the replication backlog size (see the next
+#    sections of this file) with a sensible value depending on your needs.
+# 3) Replication is automatic and does not need user intervention. After a
+#    network partition slaves automatically try to reconnect to masters
+#    and resynchronize with them.
+#
+# slaveof <masterip> <masterport>
+
+# If the master is password protected (using the "requirepass" configuration
+# directive below) it is possible to tell the slave to authenticate before
+# starting the replication synchronization process, otherwise the master will
+# refuse the slave request.
+#
+# masterauth <master-password>
+
+# When a slave loses its connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+#    still reply to client requests, possibly with out of date data, or the
+#    data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
+#    an error "SYNC with master in progress" to all the kind of commands
+#    but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
+# You can configure a slave instance to accept writes or not. Writing against
+# a slave instance may be useful to store some ephemeral data (because data
+# written on a slave will be easily deleted after resync with the master) but
+# may also cause problems if clients are writing to it because of a
+# misconfiguration.
+#
+# Since Redis 2.6 by default slaves are read-only.
+#
+# Note: read only slaves are not designed to be exposed to untrusted clients
+# on the internet. It's just a protection layer against misuse of the instance.
+# Still a read only slave exports by default all the administrative commands
+# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
+# security of read only slaves using 'rename-command' to shadow all the
+# administrative / dangerous commands.
+slave-read-only yes
+
+# Replication SYNC strategy: disk or socket.
+#
+# -------------------------------------------------------
+# WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY
+# -------------------------------------------------------
+#
+# New slaves and reconnecting slaves that are not able to continue the replication
+# process just receiving differences, need to do what is called a "full
+# synchronization". An RDB file is transmitted from the master to the slaves.
+# The transmission can happen in two different ways:
+#
+# 1) Disk-backed: The Redis master creates a new process that writes the RDB
+#                 file on disk. Later the file is transferred by the parent
+#                 process to the slaves incrementally.
+# 2) Diskless: The Redis master creates a new process that directly writes the
+#              RDB file to slave sockets, without touching the disk at all.
+#
+# With disk-backed replication, while the RDB file is generated, more slaves
+# can be queued and served with the RDB file as soon as the current child producing
+# the RDB file finishes its work. With diskless replication instead once
+# the transfer starts, new slaves arriving will be queued and a new transfer
+# will start when the current one terminates.
+#
+# When diskless replication is used, the master waits a configurable amount of
+# time (in seconds) before starting the transfer in the hope that multiple slaves
+# will arrive and the transfer can be parallelized.
+#
+# With slow disks and fast (large bandwidth) networks, diskless replication
+# works better.
+repl-diskless-sync no
+
+# When diskless replication is enabled, it is possible to configure the delay
+# the server waits in order to spawn the child that transfers the RDB via socket
+# to the slaves.
+#
+# This is important since once the transfer starts, it is not possible to serve
+# new slaves arriving, that will be queued for the next RDB transfer, so the server
+# waits a delay in order to let more slaves arrive.
+#
+# The delay is specified in seconds, and by default is 5 seconds. To disable
+# it entirely just set it to 0 seconds and the transfer will start ASAP.
+repl-diskless-sync-delay 5
+
+# Slaves send PINGs to server in a predefined interval. It's possible to change
+# this interval with the repl_ping_slave_period option. The default value is 10
+# seconds.
+#
+# repl-ping-slave-period 10
+
+# The following option sets the replication timeout for:
+#
+# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
+# 2) Master timeout from the point of view of slaves (data, pings).
+# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
+#
+# It is important to make sure that this value is greater than the value
+# specified for repl-ping-slave-period otherwise a timeout will be detected
+# every time there is low traffic between the master and the slave.
+#
+# repl-timeout 60
+
+# Disable TCP_NODELAY on the slave socket after SYNC?
+#
+# If you select "yes" Redis will use a smaller number of TCP packets and
+# less bandwidth to send data to slaves. But this can add a delay for
+# the data to appear on the slave side, up to 40 milliseconds with
+# Linux kernels using a default configuration.
+#
+# If you select "no" the delay for data to appear on the slave side will
+# be reduced but more bandwidth will be used for replication.
+#
+# By default we optimize for low latency, but in very high traffic conditions
+# or when the master and slaves are many hops away, turning this to "yes" may
+# be a good idea.
+repl-disable-tcp-nodelay no
+
+# Set the replication backlog size. The backlog is a buffer that accumulates
+# slave data when slaves are disconnected for some time, so that when a slave
+# wants to reconnect again, often a full resync is not needed, but a partial
+# resync is enough, just passing the portion of data the slave missed while
+# disconnected.
+#
+# The bigger the replication backlog, the longer the time the slave can be
+# disconnected and later be able to perform a partial resynchronization.
+#
+# The backlog is only allocated once there is at least a slave connected.
+#
+# repl-backlog-size 1mb
+
+# After a master has no longer connected slaves for some time, the backlog
+# will be freed. The following option configures the amount of seconds that
+# need to elapse, starting from the time the last slave disconnected, for
+# the backlog buffer to be freed.
+#
+# A value of 0 means to never release the backlog.
+#
+# repl-backlog-ttl 3600
+
+# The slave priority is an integer number published by Redis in the INFO output.
+# It is used by Redis Sentinel in order to select a slave to promote into a
+# master if the master is no longer working correctly.
+#
+# A slave with a low priority number is considered better for promotion, so
+# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
+# pick the one with priority 10, that is the lowest.
+#
+# However a special priority of 0 marks the slave as not able to perform the
+# role of master, so a slave with priority of 0 will never be selected by
+# Redis Sentinel for promotion.
+#
+# By default the priority is 100.
+slave-priority 100
+
+# It is possible for a master to stop accepting writes if there are less than
+# N slaves connected, having a lag less or equal than M seconds.
+#
+# The N slaves need to be in "online" state.
+#
+# The lag in seconds, that must be <= the specified value, is calculated from
+# the last ping received from the slave, that is usually sent every second.
+#
+# This option does not GUARANTEE that N replicas will accept the write, but
+# will limit the window of exposure for lost writes in case not enough slaves
+# are available, to the specified number of seconds.
+#
+# For example to require at least 3 slaves with a lag <= 10 seconds use:
+#
+# min-slaves-to-write 3
+# min-slaves-max-lag 10
+#
+# Setting one or the other to 0 disables the feature.
+#
+# By default min-slaves-to-write is set to 0 (feature disabled) and
+# min-slaves-max-lag is set to 10.
+
+################################## SECURITY ###################################
+
+# Require clients to issue AUTH <PASSWORD> before processing any other
+# commands.  This might be useful in environments in which you do not trust
+# others with access to the host running redis-server.
+#
+# This should stay commented out for backward compatibility and because most
+# people do not need auth (e.g. they run their own servers).
+#
+# Warning: since Redis is pretty fast an outside user can try up to
+# 150k passwords per second against a good box. This means that you should
+# use a very strong password otherwise it will be very easy to break.
+#
+# requirepass foobared
+
+# Command renaming.
+#
+# It is possible to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# hard to guess so that it will still be available for internal-use tools
+# but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possible to completely kill a command by renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+#
+# Please note that changing the name of commands that are logged into the
+# AOF file or transmitted to slaves may cause problems.
+
+################################### LIMITS ####################################
+
+# Set the max number of connected clients at the same time. By default
+# this limit is set to 10000 clients, however if the Redis server is not
+# able to configure the process file limit to allow for the specified limit
+# the max number of allowed clients is set to the current file limit
+# minus 32 (as Redis reserves a few file descriptors for internal uses).
+#
+# Once the limit is reached Redis will close all the new connections sending
+# an error 'max number of clients reached'.
+#
+# maxclients 10000
+
+# Don't use more memory than the specified amount of bytes.
+# When the memory limit is reached Redis will try to remove keys
+# according to the eviction policy selected (see maxmemory-policy).
+#
+# If Redis can't remove keys according to the policy, or if the policy is
+# set to 'noeviction', Redis will start to reply with errors to commands
+# that would use more memory, like SET, LPUSH, and so on, and will continue
+# to reply to read-only commands like GET.
+#
+# This option is usually useful when using Redis as an LRU cache, or to set
+# a hard memory limit for an instance (using the 'noeviction' policy).
+#
+# WARNING: If you have slaves attached to an instance with maxmemory on,
+# the size of the output buffers needed to feed the slaves are subtracted
+# from the used memory count, so that network problems / resyncs will
+# not trigger a loop where keys are evicted, and in turn the output
+# buffer of slaves is full with DELs of keys evicted triggering the deletion
+# of more keys, and so forth until the database is completely emptied.
+#
+# In short... if you have slaves attached it is suggested that you set a lower
+# limit for maxmemory so that there is some free RAM on the system for slave
+# output buffers (but this is not needed if the policy is 'noeviction').
+#
+# maxmemory <bytes>
+
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached. You can select among five behaviors:
+#
+# volatile-lru -> remove the key with an expire set using an LRU algorithm
+# allkeys-lru -> remove any key according to the LRU algorithm
+# volatile-random -> remove a random key with an expire set
+# allkeys-random -> remove a random key, any key
+# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
+# noeviction -> don't expire at all, just return an error on write operations
+#
+# Note: with any of the above policies, Redis will return an error on write
+#       operations, when there are no suitable keys for eviction.
+#
+#       At the date of writing these commands are: set setnx setex append
+#       incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+#       sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+#       zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+#       getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy noeviction
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can tune it for speed or
+# accuracy. For default Redis will check five keys and pick the one that was
+# used less recently, you can change the sample size using the following
+# configuration directive.
+#
+# The default of 5 produces good enough results. 10 Approximates very closely
+# true LRU but costs a bit more CPU. 3 is very fast but not very accurate.
+#
+# maxmemory-samples 5
+
+############################## APPEND ONLY MODE ###############################
+
+# By default Redis asynchronously dumps the dataset on disk. This mode is
+# good enough in many applications, but an issue with the Redis process or
+# a power outage may result into a few minutes of writes lost (depending on
+# the configured save points).
+#
+# The Append Only File is an alternative persistence mode that provides
+# much better durability. For instance using the default data fsync policy
+# (see later in the config file) Redis can lose just one second of writes in a
+# dramatic event like a server power outage, or a single write if something
+# wrong with the Redis process itself happens, but the operating system is
+# still running correctly.
+#
+# AOF and RDB persistence can be enabled at the same time without problems.
+# If the AOF is enabled on startup Redis will load the AOF, that is the file
+# with the better durability guarantees.
+#
+# Please check http://redis.io/topics/persistence for more information.
+
+appendonly no
+
+# The name of the append only file (default: "appendonly.aof")
+
+appendfilename "appendonly.aof"
+
+# The fsync() call tells the Operating System to actually write data on disk
+# instead of waiting for more data in the output buffer. Some OS will really flush
+# data on disk, some other OS will just try to do it ASAP.
+#
+# Redis supports three different modes:
+#
+# no: don't fsync, just let the OS flush the data when it wants. Faster.
+# always: fsync after every write to the append only log. Slow, Safest.
+# everysec: fsync only one time every second. Compromise.
+#
+# The default is "everysec", as that's usually the right compromise between
+# speed and data safety. It's up to you to understand if you can relax this to
+# "no" that will let the operating system flush the output buffer when
+# it wants, for better performances (but if you can live with the idea of
+# some data loss consider the default persistence mode that's snapshotting),
+# or on the contrary, use "always" that's very slow but a bit safer than
+# everysec.
+#
+# More details please check the following article:
+# http://antirez.com/post/redis-persistence-demystified.html
+#
+# If unsure, use "everysec".
+
+# appendfsync always
+appendfsync everysec
+# appendfsync no
+
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving, the durability of Redis is
+# the same as "appendfsync none". In practical terms, this means that it is
+# possible to lose up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+
+no-appendfsync-on-rewrite no
+
+# Automatic rewrite of the append only file.
+# Redis is able to automatically rewrite the log file implicitly calling
+# BGREWRITEAOF when the AOF log size grows by the specified percentage.
+#
+# This is how it works: Redis remembers the size of the AOF file after the
+# latest rewrite (if no rewrite has happened since the restart, the size of
+# the AOF at startup is used).
+#
+# This base size is compared to the current size. If the current size is
+# bigger than the specified percentage, the rewrite is triggered. Also
+# you need to specify a minimal size for the AOF file to be rewritten, this
+# is useful to avoid rewriting the AOF file even if the percentage increase
+# is reached but it is still pretty small.
+#
+# Specify a percentage of zero in order to disable the automatic AOF
+# rewrite feature.
+
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+
+# An AOF file may be found to be truncated at the end during the Redis
+# startup process, when the AOF data gets loaded back into memory.
+# This may happen when the system where Redis is running
+# crashes, especially when an ext4 filesystem is mounted without the
+# data=ordered option (however this can't happen when Redis itself
+# crashes or aborts but the operating system still works correctly).
+#
+# Redis can either exit with an error when this happens, or load as much
+# data as possible (the default now) and start if the AOF file is found
+# to be truncated at the end. The following option controls this behavior.
+#
+# If aof-load-truncated is set to yes, a truncated AOF file is loaded and
+# the Redis server starts emitting a log to inform the user of the event.
+# Otherwise if the option is set to no, the server aborts with an error
+# and refuses to start. When the option is set to no, the user requires
+# to fix the AOF file using the "redis-check-aof" utility before to restart
+# the server.
+#
+# Note that if the AOF file will be found to be corrupted in the middle
+# the server will still exit with an error. This option only applies when
+# Redis will try to read more data from the AOF file but not enough bytes
+# will be found.
+aof-load-truncated yes
+
+################################ LUA SCRIPTING  ###############################
+
+# Max execution time of a Lua script in milliseconds.
+#
+# If the maximum execution time is reached Redis will log that a script is
+# still in execution after the maximum allowed time and will start to
+# reply to queries with an error.
+#
+# When a long running script exceeds the maximum execution time only the
+# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
+# used to stop a script that did not yet called write commands. The second
+# is the only way to shut down the server in the case a write command was
+# already issued by the script but the user doesn't want to wait for the natural
+# termination of the script.
+#
+# Set it to 0 or a negative value for unlimited execution without warnings.
+lua-time-limit 5000
+
+################################ REDIS CLUSTER  ###############################
+#
+# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however
+# in order to mark it as "mature" we need to wait for a non trivial percentage
+# of users to deploy it in production.
+# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#
+# Normal Redis instances can't be part of a Redis Cluster; only nodes that are
+# started as cluster nodes can. In order to start a Redis instance as a
+# cluster node enable the cluster support uncommenting the following:
+#
+# cluster-enabled yes
+
+# Every cluster node has a cluster configuration file. This file is not
+# intended to be edited by hand. It is created and updated by Redis nodes.
+# Every Redis Cluster node requires a different cluster configuration file.
+# Make sure that instances running in the same system do not have
+# overlapping cluster configuration file names.
+#
+# cluster-config-file nodes-6379.conf
+
+# Cluster node timeout is the amount of milliseconds a node must be unreachable
+# for it to be considered in failure state.
+# Most other internal time limits are multiple of the node timeout.
+#
+# cluster-node-timeout 15000
+
+# A slave of a failing master will avoid to start a failover if its data
+# looks too old.
+#
+# There is no simple way for a slave to actually have a exact measure of
+# its "data age", so the following two checks are performed:
+#
+# 1) If there are multiple slaves able to failover, they exchange messages
+#    in order to try to give an advantage to the slave with the best
+#    replication offset (more data from the master processed).
+#    Slaves will try to get their rank by offset, and apply to the start
+#    of the failover a delay proportional to their rank.
+#
+# 2) Every single slave computes the time of the last interaction with
+#    its master. This can be the last ping or command received (if the master
+#    is still in the "connected" state), or the time that elapsed since the
+#    disconnection with the master (if the replication link is currently down).
+#    If the last interaction is too old, the slave will not try to failover
+#    at all.
+#
+# The point "2" can be tuned by user. Specifically a slave will not perform
+# the failover if, since the last interaction with the master, the time
+# elapsed is greater than:
+#
+#   (node-timeout * slave-validity-factor) + repl-ping-slave-period
+#
+# So for example if node-timeout is 30 seconds, and the slave-validity-factor
+# is 10, and assuming a default repl-ping-slave-period of 10 seconds, the
+# slave will not try to failover if it was not able to talk with the master
+# for longer than 310 seconds.
+#
+# A large slave-validity-factor may allow slaves with too old data to failover
+# a master, while a too small value may prevent the cluster from being able to
+# elect a slave at all.
+#
+# For maximum availability, it is possible to set the slave-validity-factor
+# to a value of 0, which means, that slaves will always try to failover the
+# master regardless of the last time they interacted with the master.
+# (However they'll always try to apply a delay proportional to their
+# offset rank).
+#
+# Zero is the only value able to guarantee that when all the partitions heal
+# the cluster will always be able to continue.
+#
+# cluster-slave-validity-factor 10
+
+# Cluster slaves are able to migrate to orphaned masters, that are masters
+# that are left without working slaves. This improves the cluster ability
+# to resist to failures as otherwise an orphaned master can't be failed over
+# in case of failure if it has no working slaves.
+#
+# Slaves migrate to orphaned masters only if there are still at least a
+# given number of other working slaves for their old master. This number
+# is the "migration barrier". A migration barrier of 1 means that a slave
+# will migrate only if there is at least 1 other working slave for its master
+# and so forth. It usually reflects the number of slaves you want for every
+# master in your cluster.
+#
+# Default is 1 (slaves migrate only if their masters remain with at least
+# one slave). To disable migration just set it to a very large value.
+# A value of 0 can be set but is useful only for debugging and dangerous
+# in production.
+#
+# cluster-migration-barrier 1
+
+# By default Redis Cluster nodes stop accepting queries if they detect there
+# is at least an hash slot uncovered (no available node is serving it).
+# This way if the cluster is partially down (for example a range of hash slots
+# are no longer covered) all the cluster becomes, eventually, unavailable.
+# It automatically returns available as soon as all the slots are covered again.
+#
+# However sometimes you want the subset of the cluster which is working,
+# to continue to accept queries for the part of the key space that is still
+# covered. In order to do so, just set the cluster-require-full-coverage
+# option to no.
+#
+# cluster-require-full-coverage yes
+
+# In order to setup your cluster make sure to read the documentation
+# available at http://redis.io web site.
+
+################################## SLOW LOG ###################################
+
+# The Redis Slow Log is a system to log queries that exceeded a specified
+# execution time. The execution time does not include the I/O operations
+# like talking with the client, sending the reply and so forth,
+# but just the time needed to actually execute the command (this is the only
+# stage of command execution where the thread is blocked and can not serve
+# other requests in the meantime).
+#
+# You can configure the slow log with two parameters: one tells Redis
+# what is the execution time, in microseconds, to exceed in order for the
+# command to get logged, and the other parameter is the length of the
+# slow log. When a new command is logged the oldest one is removed from the
+# queue of logged commands.
+
+# The following time is expressed in microseconds, so 1000000 is equivalent
+# to one second. Note that a negative number disables the slow log, while
+# a value of zero forces the logging of every command.
+slowlog-log-slower-than 10000
+
+# There is no limit to this length. Just be aware that it will consume memory.
+# You can reclaim memory used by the slow log with SLOWLOG RESET.
+slowlog-max-len 128
+
+################################ LATENCY MONITOR ##############################
+
+# The Redis latency monitoring subsystem samples different operations
+# at runtime in order to collect data related to possible sources of
+# latency of a Redis instance.
+#
+# Via the LATENCY command this information is available to the user that can
+# print graphs and obtain reports.
+#
+# The system only logs operations that were performed in a time equal or
+# greater than the amount of milliseconds specified via the
+# latency-monitor-threshold configuration directive. When its value is set
+# to zero, the latency monitor is turned off.
+#
+# By default latency monitoring is disabled since it is mostly not needed
+# if you don't have latency issues, and collecting data has a performance
+# impact, that while very small, can be measured under big load. Latency
+# monitoring can easily be enabled at runtime using the command
+# "CONFIG SET latency-monitor-threshold <milliseconds>" if needed.
+latency-monitor-threshold 0
+
+############################# EVENT NOTIFICATION ##############################
+
+# Redis can notify Pub/Sub clients about events happening in the key space.
+# This feature is documented at http://redis.io/topics/notifications
+#
+# For instance if keyspace events notification is enabled, and a client
+# performs a DEL operation on key "foo" stored in the Database 0, two
+# messages will be published via Pub/Sub:
+#
+# PUBLISH __keyspace@0__:foo del
+# PUBLISH __keyevent@0__:del foo
+#
+# It is possible to select the events that Redis will notify among a set
+# of classes. Every class is identified by a single character:
+#
+#  K     Keyspace events, published with __keyspace@<db>__ prefix.
+#  E     Keyevent events, published with __keyevent@<db>__ prefix.
+#  g     Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
+#  $     String commands
+#  l     List commands
+#  s     Set commands
+#  h     Hash commands
+#  z     Sorted set commands
+#  x     Expired events (events generated every time a key expires)
+#  e     Evicted events (events generated when a key is evicted for maxmemory)
+#  A     Alias for g$lshzxe, so that the "AKE" string means all the events.
+#
+#  The "notify-keyspace-events" takes as argument a string that is composed
+#  of zero or multiple characters. The empty string means that notifications
+#  are disabled.
+#
+#  Example: to enable list and generic events, from the point of view of the
+#           event name, use:
+#
+#  notify-keyspace-events Elg
+#
+#  Example 2: to get the stream of the expired keys subscribing to channel
+#             name __keyevent@0__:expired use:
+#
+#  notify-keyspace-events Ex
+#
+#  By default all notifications are disabled because most users don't need
+#  this feature and the feature has some overhead. Note that if you don't
+#  specify at least one of K or E, no events will be delivered.
+notify-keyspace-events Ex
+
+############################### ADVANCED CONFIG ###############################
+
+# Hashes are encoded using a memory efficient data structure when they have a
+# small number of entries, and the biggest entry does not exceed a given
+# threshold. These thresholds can be configured using the following directives.
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happen to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
+# Similarly to hashes and lists, sorted sets are also specially encoded in
+# order to save a lot of space. This encoding is only used when the length and
+# elements of a sorted set are below the following limits:
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+
+# HyperLogLog sparse representation bytes limit. The limit includes the
+# 16 bytes header. When an HyperLogLog using the sparse representation crosses
+# this limit, it is converted into the dense representation.
+#
+# A value greater than 16000 is totally useless, since at that point the
+# dense representation is more memory efficient.
+#
+# The suggested value is ~ 3000 in order to have the benefits of
+# the space efficient encoding without slowing down too much PFADD,
+# which is O(N) with the sparse encoding. The value can be raised to
+# ~ 10000 when CPU is not a concern, but space is, and the data set is
+# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
+hll-sparse-max-bytes 3000
+
+# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
+# order to help rehashing the main Redis hash table (the one mapping top-level
+# keys to values). The hash table implementation Redis uses (see dict.c)
+# performs a lazy rehashing: the more operation you run into a hash table
+# that is rehashing, the more rehashing "steps" are performed, so if the
+# server is idle the rehashing is never complete and some more memory is used
+# by the hash table.
+#
+# The default is to use this millisecond 10 times every second in order to
+# actively rehash the main dictionaries, freeing memory when possible.
+#
+# If unsure:
+# use "activerehashing no" if you have hard latency requirements and it is
+# not a good thing in your environment that Redis can reply from time to time
+# to queries with 2 milliseconds delay.
+#
+# use "activerehashing yes" if you don't have such hard requirements but
+# want to free memory asap when possible.
+activerehashing yes
+
+# The client output buffer limits can be used to force disconnection of clients
+# that are not reading data from the server fast enough for some reason (a
+# common reason is that a Pub/Sub client can't consume messages as fast as the
+# publisher can produce them).
+#
+# The limit can be set differently for the three different classes of clients:
+#
+# normal -> normal clients including MONITOR clients
+# slave  -> slave clients
+# pubsub -> clients subscribed to at least one pubsub channel or pattern
+#
+# The syntax of every client-output-buffer-limit directive is the following:
+#
+# client-output-buffer-limit <class> <hard limit> <soft limit> <soft seconds>
+#
+# A client is immediately disconnected once the hard limit is reached, or if
+# the soft limit is reached and remains reached for the specified number of
+# seconds (continuously).
+# So for instance if the hard limit is 32 megabytes and the soft limit is
+# 16 megabytes / 10 seconds, the client will get disconnected immediately
+# if the size of the output buffers reach 32 megabytes, but will also get
+# disconnected if the client reaches 16 megabytes and continuously overcomes
+# the limit for 10 seconds.
+#
+# By default normal clients are not limited because they don't receive data
+# without asking (in a push way), but just after a request, so only
+# asynchronous clients may create a scenario where data is requested faster
+# than it can read.
+#
+# Instead there is a default limit for pubsub and slave clients, since
+# subscribers and slaves receive data in a push fashion.
+#
+# Both the hard or the soft limit can be disabled by setting them to zero.
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+
+# Redis calls an internal function to perform many background tasks, like
+# closing connections of clients in timeout, purging expired keys that are
+# never requested, and so forth.
+#
+# Not all tasks are performed with the same frequency, but Redis checks for
+# tasks to perform according to the specified "hz" value.
+#
+# By default "hz" is set to 10. Raising the value will use more CPU when
+# Redis is idle, but at the same time will make Redis more responsive when
+# there are many keys expiring at the same time, and timeouts may be
+# handled with more precision.
+#
+# The range is between 1 and 500, however a value over 100 is usually not
+# a good idea. Most users should use the default of 10 and raise this up to
+# 100 only in environments where very low latency is required.
+hz 10
+
+# When a child rewrites the AOF file, if the following option is enabled
+# the file will be fsync-ed every 32 MB of data generated. This is useful
+# in order to commit the file to the disk more incrementally and avoid
+# big latency spikes.
+aof-rewrite-incremental-fsync yes

+ 944 - 0
docker/compose/yl/conf/redis/6380.conf

@@ -0,0 +1,944 @@
+## Generated by install_server.sh ##
+# Redis configuration file example.
+#
+# Note that in order to read the configuration file, Redis must be
+# started with the file path as first argument:
+#
+# ./redis-server /path/to/redis.conf
+
+# Note on units: when memory size is needed, it is possible to specify
+# it in the usual form of 1k 5GB 4M and so forth:
+#
+# 1k => 1000 bytes
+# 1kb => 1024 bytes
+# 1m => 1000000 bytes
+# 1mb => 1024*1024 bytes
+# 1g => 1000000000 bytes
+# 1gb => 1024*1024*1024 bytes
+#
+# units are case insensitive so 1GB 1Gb 1gB are all the same.
+
+################################## INCLUDES ###################################
+
+# Include one or more other config files here.  This is useful if you
+# have a standard template that goes to all Redis servers but also need
+# to customize a few per-server settings.  Include files can include
+# other files, so use this wisely.
+#
+# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
+# from admin or Redis Sentinel. Since Redis always uses the last processed
+# line as value of a configuration directive, you'd better put includes
+# at the beginning of this file to avoid overwriting config change at runtime.
+#
+# If instead you are interested in using includes to override configuration
+# options, it is better to use include as the last line.
+#
+# include /path/to/local.conf
+# include /path/to/other.conf
+
+################################ GENERAL  #####################################
+
+# By default Redis does not run as a daemon. Use 'yes' if you need it.
+# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+daemonize yes
+
+# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+# default. You can specify a custom pid file location here.
+pidfile /var/run/redis.pid
+
+# Accept connections on the specified port, default is 6379.
+# If port 0 is specified Redis will not listen on a TCP socket.
+port 6380
+
+# TCP listen() backlog.
+#
+# In high requests-per-second environments you need an high backlog in order
+# to avoid slow clients connections issues. Note that the Linux kernel
+# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
+# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
+# in order to get the desired effect.
+tcp-backlog 511
+
+# By default Redis listens for connections from all the network interfaces
+# available on the server. It is possible to listen to just one or multiple
+# interfaces using the "bind" configuration directive, followed by one or
+# more IP addresses.
+#
+# Examples:
+#
+# bind 192.168.1.100 10.0.0.1
+bind 0.0.0.0
+
+# Specify the path for the Unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+# unixsocket /tmp/redis.sock
+# unixsocketperm 700
+
+# Close the connection after a client is idle for N seconds (0 to disable)
+timeout 0
+
+# TCP keepalive.
+#
+# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
+# of communication. This is useful for two reasons:
+#
+# 1) Detect dead peers.
+# 2) Take the connection alive from the point of view of network
+#    equipment in the middle.
+#
+# On Linux, the specified value (in seconds) is the period used to send ACKs.
+# Note that to close the connection the double of the time is needed.
+# On other kernels the period depends on the kernel configuration.
+#
+# A reasonable value for this option is 60 seconds.
+tcp-keepalive 0
+
+# Specify the server verbosity level.
+# This can be one of:
+# debug (a lot of information, useful for development/testing)
+# verbose (many rarely useful info, but not a mess like the debug level)
+# notice (moderately verbose, what you want in production probably)
+# warning (only very important / critical messages are logged)
+loglevel notice
+
+# Specify the log file name. Also the empty string can be used to force
+# Redis to log on the standard output. Note that if you use standard
+# output for logging but daemonize, logs will be sent to /dev/null
+logfile /var/redis/redis-6380.log
+
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
+# Set the number of databases. The default database is DB 0, you can select
+# a different one on a per-connection basis using SELECT <dbid> where
+# dbid is a number between 0 and 'databases'-1
+databases 16
+
+################################ SNAPSHOTTING  ################################
+#
+# Save the DB on disk:
+#
+#   save <seconds> <changes>
+#
+#   Will save the DB if both the given number of seconds and the given
+#   number of write operations against the DB occurred.
+#
+#   In the example below the behaviour will be to save:
+#   after 900 sec (15 min) if at least 1 key changed
+#   after 300 sec (5 min) if at least 10 keys changed
+#   after 60 sec if at least 10000 keys changed
+#
+#   Note: you can disable saving completely by commenting out all "save" lines.
+#
+#   It is also possible to remove all the previously configured save
+#   points by adding a save directive with a single empty string argument
+#   like in the following example:
+#
+#   save ""
+
+save 900 1
+save 300 10
+save 60 10000
+
+# By default Redis will stop accepting writes if RDB snapshots are enabled
+# (at least one save point) and the latest background save failed.
+# This will make the user aware (in a hard way) that data is not persisting
+# on disk properly, otherwise chances are that no one will notice and some
+# disaster will happen.
+#
+# If the background saving process will start working again Redis will
+# automatically allow writes again.
+#
+# However if you have setup your proper monitoring of the Redis server
+# and persistence, you may want to disable this feature so that Redis will
+# continue to work as usual even if there are problems with disk,
+# permissions, and so forth.
+stop-writes-on-bgsave-error yes
+
+# Compress string objects using LZF when dump .rdb databases?
+# For default that's set to 'yes' as it's almost always a win.
+# If you want to save some CPU in the saving child set it to 'no' but
+# the dataset will likely be bigger if you have compressible values or keys.
+rdbcompression yes
+
+# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
+# This makes the format more resistant to corruption but there is a performance
+# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
+# for maximum performances.
+#
+# RDB files created with checksum disabled have a checksum of zero that will
+# tell the loading code to skip the check.
+rdbchecksum yes
+
+# The filename where to dump the DB
+dbfilename dump.rdb
+
+# The working directory.
+#
+# The DB will be written inside this directory, with the filename specified
+# above using the 'dbfilename' configuration directive.
+#
+# The Append Only File will also be created inside this directory.
+#
+# Note that you must specify a directory here, not a file name.
+dir /var/redis
+
+################################# REPLICATION #################################
+
+# Master-Slave replication. Use slaveof to make a Redis instance a copy of
+# another Redis server. A few things to understand ASAP about Redis replication.
+#
+# 1) Redis replication is asynchronous, but you can configure a master to
+#    stop accepting writes if it appears to be not connected with at least
+#    a given number of slaves.
+# 2) Redis slaves are able to perform a partial resynchronization with the
+#    master if the replication link is lost for a relatively small amount of
+#    time. You may want to configure the replication backlog size (see the next
+#    sections of this file) with a sensible value depending on your needs.
+# 3) Replication is automatic and does not need user intervention. After a
+#    network partition slaves automatically try to reconnect to masters
+#    and resynchronize with them.
+#
+# slaveof <masterip> <masterport>
+
+# If the master is password protected (using the "requirepass" configuration
+# directive below) it is possible to tell the slave to authenticate before
+# starting the replication synchronization process, otherwise the master will
+# refuse the slave request.
+#
+# masterauth <master-password>
+
+# When a slave loses its connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+#    still reply to client requests, possibly with out of date data, or the
+#    data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
+#    an error "SYNC with master in progress" to all the kind of commands
+#    but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
+# You can configure a slave instance to accept writes or not. Writing against
+# a slave instance may be useful to store some ephemeral data (because data
+# written on a slave will be easily deleted after resync with the master) but
+# may also cause problems if clients are writing to it because of a
+# misconfiguration.
+#
+# Since Redis 2.6 by default slaves are read-only.
+#
+# Note: read only slaves are not designed to be exposed to untrusted clients
+# on the internet. It's just a protection layer against misuse of the instance.
+# Still a read only slave exports by default all the administrative commands
+# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
+# security of read only slaves using 'rename-command' to shadow all the
+# administrative / dangerous commands.
+slave-read-only yes
+
+# Replication SYNC strategy: disk or socket.
+#
+# -------------------------------------------------------
+# WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY
+# -------------------------------------------------------
+#
+# New slaves and reconnecting slaves that are not able to continue the replication
+# process just receiving differences, need to do what is called a "full
+# synchronization". An RDB file is transmitted from the master to the slaves.
+# The transmission can happen in two different ways:
+#
+# 1) Disk-backed: The Redis master creates a new process that writes the RDB
+#                 file on disk. Later the file is transferred by the parent
+#                 process to the slaves incrementally.
+# 2) Diskless: The Redis master creates a new process that directly writes the
+#              RDB file to slave sockets, without touching the disk at all.
+#
+# With disk-backed replication, while the RDB file is generated, more slaves
+# can be queued and served with the RDB file as soon as the current child producing
+# the RDB file finishes its work. With diskless replication instead once
+# the transfer starts, new slaves arriving will be queued and a new transfer
+# will start when the current one terminates.
+#
+# When diskless replication is used, the master waits a configurable amount of
+# time (in seconds) before starting the transfer in the hope that multiple slaves
+# will arrive and the transfer can be parallelized.
+#
+# With slow disks and fast (large bandwidth) networks, diskless replication
+# works better.
+repl-diskless-sync no
+
+# When diskless replication is enabled, it is possible to configure the delay
+# the server waits in order to spawn the child that transfers the RDB via socket
+# to the slaves.
+#
+# This is important since once the transfer starts, it is not possible to serve
+# new slaves arriving, that will be queued for the next RDB transfer, so the server
+# waits a delay in order to let more slaves arrive.
+#
+# The delay is specified in seconds, and by default is 5 seconds. To disable
+# it entirely just set it to 0 seconds and the transfer will start ASAP.
+repl-diskless-sync-delay 5
+
+# Slaves send PINGs to server in a predefined interval. It's possible to change
+# this interval with the repl_ping_slave_period option. The default value is 10
+# seconds.
+#
+# repl-ping-slave-period 10
+
+# The following option sets the replication timeout for:
+#
+# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
+# 2) Master timeout from the point of view of slaves (data, pings).
+# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
+#
+# It is important to make sure that this value is greater than the value
+# specified for repl-ping-slave-period otherwise a timeout will be detected
+# every time there is low traffic between the master and the slave.
+#
+# repl-timeout 60
+
+# Disable TCP_NODELAY on the slave socket after SYNC?
+#
+# If you select "yes" Redis will use a smaller number of TCP packets and
+# less bandwidth to send data to slaves. But this can add a delay for
+# the data to appear on the slave side, up to 40 milliseconds with
+# Linux kernels using a default configuration.
+#
+# If you select "no" the delay for data to appear on the slave side will
+# be reduced but more bandwidth will be used for replication.
+#
+# By default we optimize for low latency, but in very high traffic conditions
+# or when the master and slaves are many hops away, turning this to "yes" may
+# be a good idea.
+repl-disable-tcp-nodelay no
+
+# Set the replication backlog size. The backlog is a buffer that accumulates
+# slave data when slaves are disconnected for some time, so that when a slave
+# wants to reconnect again, often a full resync is not needed, but a partial
+# resync is enough, just passing the portion of data the slave missed while
+# disconnected.
+#
+# The bigger the replication backlog, the longer the time the slave can be
+# disconnected and later be able to perform a partial resynchronization.
+#
+# The backlog is only allocated once there is at least a slave connected.
+#
+# repl-backlog-size 1mb
+
+# After a master has no longer connected slaves for some time, the backlog
+# will be freed. The following option configures the amount of seconds that
+# need to elapse, starting from the time the last slave disconnected, for
+# the backlog buffer to be freed.
+#
+# A value of 0 means to never release the backlog.
+#
+# repl-backlog-ttl 3600
+
+# The slave priority is an integer number published by Redis in the INFO output.
+# It is used by Redis Sentinel in order to select a slave to promote into a
+# master if the master is no longer working correctly.
+#
+# A slave with a low priority number is considered better for promotion, so
+# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
+# pick the one with priority 10, that is the lowest.
+#
+# However a special priority of 0 marks the slave as not able to perform the
+# role of master, so a slave with priority of 0 will never be selected by
+# Redis Sentinel for promotion.
+#
+# By default the priority is 100.
+slave-priority 100
+
+# It is possible for a master to stop accepting writes if there are less than
+# N slaves connected, having a lag less or equal than M seconds.
+#
+# The N slaves need to be in "online" state.
+#
+# The lag in seconds, that must be <= the specified value, is calculated from
+# the last ping received from the slave, that is usually sent every second.
+#
+# This option does not GUARANTEE that N replicas will accept the write, but
+# will limit the window of exposure for lost writes in case not enough slaves
+# are available, to the specified number of seconds.
+#
+# For example to require at least 3 slaves with a lag <= 10 seconds use:
+#
+# min-slaves-to-write 3
+# min-slaves-max-lag 10
+#
+# Setting one or the other to 0 disables the feature.
+#
+# By default min-slaves-to-write is set to 0 (feature disabled) and
+# min-slaves-max-lag is set to 10.
+
+################################## SECURITY ###################################
+
+# Require clients to issue AUTH <PASSWORD> before processing any other
+# commands.  This might be useful in environments in which you do not trust
+# others with access to the host running redis-server.
+#
+# This should stay commented out for backward compatibility and because most
+# people do not need auth (e.g. they run their own servers).
+#
+# Warning: since Redis is pretty fast an outside user can try up to
+# 150k passwords per second against a good box. This means that you should
+# use a very strong password otherwise it will be very easy to break.
+#
+# requirepass foobared
+
+# Command renaming.
+#
+# It is possible to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# hard to guess so that it will still be available for internal-use tools
+# but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possible to completely kill a command by renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+#
+# Please note that changing the name of commands that are logged into the
+# AOF file or transmitted to slaves may cause problems.
+
+################################### LIMITS ####################################
+
+# Set the max number of connected clients at the same time. By default
+# this limit is set to 10000 clients, however if the Redis server is not
+# able to configure the process file limit to allow for the specified limit
+# the max number of allowed clients is set to the current file limit
+# minus 32 (as Redis reserves a few file descriptors for internal uses).
+#
+# Once the limit is reached Redis will close all the new connections sending
+# an error 'max number of clients reached'.
+#
+# maxclients 10000
+
+# Don't use more memory than the specified amount of bytes.
+# When the memory limit is reached Redis will try to remove keys
+# according to the eviction policy selected (see maxmemory-policy).
+#
+# If Redis can't remove keys according to the policy, or if the policy is
+# set to 'noeviction', Redis will start to reply with errors to commands
+# that would use more memory, like SET, LPUSH, and so on, and will continue
+# to reply to read-only commands like GET.
+#
+# This option is usually useful when using Redis as an LRU cache, or to set
+# a hard memory limit for an instance (using the 'noeviction' policy).
+#
+# WARNING: If you have slaves attached to an instance with maxmemory on,
+# the size of the output buffers needed to feed the slaves are subtracted
+# from the used memory count, so that network problems / resyncs will
+# not trigger a loop where keys are evicted, and in turn the output
+# buffer of slaves is full with DELs of keys evicted triggering the deletion
+# of more keys, and so forth until the database is completely emptied.
+#
+# In short... if you have slaves attached it is suggested that you set a lower
+# limit for maxmemory so that there is some free RAM on the system for slave
+# output buffers (but this is not needed if the policy is 'noeviction').
+#
+# maxmemory <bytes>
+
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached. You can select among five behaviors:
+#
+# volatile-lru -> remove the key with an expire set using an LRU algorithm
+# allkeys-lru -> remove any key according to the LRU algorithm
+# volatile-random -> remove a random key with an expire set
+# allkeys-random -> remove a random key, any key
+# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
+# noeviction -> don't expire at all, just return an error on write operations
+#
+# Note: with any of the above policies, Redis will return an error on write
+#       operations, when there are no suitable keys for eviction.
+#
+#       At the date of writing these commands are: set setnx setex append
+#       incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+#       sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+#       zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+#       getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy noeviction
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can tune it for speed or
+# accuracy. For default Redis will check five keys and pick the one that was
+# used less recently, you can change the sample size using the following
+# configuration directive.
+#
+# The default of 5 produces good enough results. 10 Approximates very closely
+# true LRU but costs a bit more CPU. 3 is very fast but not very accurate.
+#
+# maxmemory-samples 5
+
+############################## APPEND ONLY MODE ###############################
+
+# By default Redis asynchronously dumps the dataset on disk. This mode is
+# good enough in many applications, but an issue with the Redis process or
+# a power outage may result into a few minutes of writes lost (depending on
+# the configured save points).
+#
+# The Append Only File is an alternative persistence mode that provides
+# much better durability. For instance using the default data fsync policy
+# (see later in the config file) Redis can lose just one second of writes in a
+# dramatic event like a server power outage, or a single write if something
+# wrong with the Redis process itself happens, but the operating system is
+# still running correctly.
+#
+# AOF and RDB persistence can be enabled at the same time without problems.
+# If the AOF is enabled on startup Redis will load the AOF, that is the file
+# with the better durability guarantees.
+#
+# Please check http://redis.io/topics/persistence for more information.
+
+appendonly no
+
+# The name of the append only file (default: "appendonly.aof")
+
+appendfilename "appendonly.aof"
+
+# The fsync() call tells the Operating System to actually write data on disk
+# instead of waiting for more data in the output buffer. Some OS will really flush
+# data on disk, some other OS will just try to do it ASAP.
+#
+# Redis supports three different modes:
+#
+# no: don't fsync, just let the OS flush the data when it wants. Faster.
+# always: fsync after every write to the append only log. Slow, Safest.
+# everysec: fsync only one time every second. Compromise.
+#
+# The default is "everysec", as that's usually the right compromise between
+# speed and data safety. It's up to you to understand if you can relax this to
+# "no" that will let the operating system flush the output buffer when
+# it wants, for better performances (but if you can live with the idea of
+# some data loss consider the default persistence mode that's snapshotting),
+# or on the contrary, use "always" that's very slow but a bit safer than
+# everysec.
+#
+# More details please check the following article:
+# http://antirez.com/post/redis-persistence-demystified.html
+#
+# If unsure, use "everysec".
+
+# appendfsync always
+appendfsync everysec
+# appendfsync no
+
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving, the durability of Redis is
+# the same as "appendfsync none". In practical terms, this means that it is
+# possible to lose up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+
+no-appendfsync-on-rewrite no
+
+# Automatic rewrite of the append only file.
+# Redis is able to automatically rewrite the log file implicitly calling
+# BGREWRITEAOF when the AOF log size grows by the specified percentage.
+#
+# This is how it works: Redis remembers the size of the AOF file after the
+# latest rewrite (if no rewrite has happened since the restart, the size of
+# the AOF at startup is used).
+#
+# This base size is compared to the current size. If the current size is
+# bigger than the specified percentage, the rewrite is triggered. Also
+# you need to specify a minimal size for the AOF file to be rewritten, this
+# is useful to avoid rewriting the AOF file even if the percentage increase
+# is reached but it is still pretty small.
+#
+# Specify a percentage of zero in order to disable the automatic AOF
+# rewrite feature.
+
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+
+# An AOF file may be found to be truncated at the end during the Redis
+# startup process, when the AOF data gets loaded back into memory.
+# This may happen when the system where Redis is running
+# crashes, especially when an ext4 filesystem is mounted without the
+# data=ordered option (however this can't happen when Redis itself
+# crashes or aborts but the operating system still works correctly).
+#
+# Redis can either exit with an error when this happens, or load as much
+# data as possible (the default now) and start if the AOF file is found
+# to be truncated at the end. The following option controls this behavior.
+#
+# If aof-load-truncated is set to yes, a truncated AOF file is loaded and
+# the Redis server starts emitting a log to inform the user of the event.
+# Otherwise if the option is set to no, the server aborts with an error
+# and refuses to start. When the option is set to no, the user requires
+# to fix the AOF file using the "redis-check-aof" utility before to restart
+# the server.
+#
+# Note that if the AOF file will be found to be corrupted in the middle
+# the server will still exit with an error. This option only applies when
+# Redis will try to read more data from the AOF file but not enough bytes
+# will be found.
+aof-load-truncated yes
+
+################################ LUA SCRIPTING  ###############################
+
+# Max execution time of a Lua script in milliseconds.
+#
+# If the maximum execution time is reached Redis will log that a script is
+# still in execution after the maximum allowed time and will start to
+# reply to queries with an error.
+#
+# When a long running script exceeds the maximum execution time only the
+# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
+# used to stop a script that did not yet called write commands. The second
+# is the only way to shut down the server in the case a write command was
+# already issued by the script but the user doesn't want to wait for the natural
+# termination of the script.
+#
+# Set it to 0 or a negative value for unlimited execution without warnings.
+lua-time-limit 5000
+
+################################ REDIS CLUSTER  ###############################
+#
+# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however
+# in order to mark it as "mature" we need to wait for a non trivial percentage
+# of users to deploy it in production.
+# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#
+# Normal Redis instances can't be part of a Redis Cluster; only nodes that are
+# started as cluster nodes can. In order to start a Redis instance as a
+# cluster node enable the cluster support uncommenting the following:
+#
+# cluster-enabled yes
+
+# Every cluster node has a cluster configuration file. This file is not
+# intended to be edited by hand. It is created and updated by Redis nodes.
+# Every Redis Cluster node requires a different cluster configuration file.
+# Make sure that instances running in the same system do not have
+# overlapping cluster configuration file names.
+#
+# cluster-config-file nodes-6379.conf
+
+# Cluster node timeout is the amount of milliseconds a node must be unreachable
+# for it to be considered in failure state.
+# Most other internal time limits are multiple of the node timeout.
+#
+# cluster-node-timeout 15000
+
+# A slave of a failing master will avoid to start a failover if its data
+# looks too old.
+#
+# There is no simple way for a slave to actually have a exact measure of
+# its "data age", so the following two checks are performed:
+#
+# 1) If there are multiple slaves able to failover, they exchange messages
+#    in order to try to give an advantage to the slave with the best
+#    replication offset (more data from the master processed).
+#    Slaves will try to get their rank by offset, and apply to the start
+#    of the failover a delay proportional to their rank.
+#
+# 2) Every single slave computes the time of the last interaction with
+#    its master. This can be the last ping or command received (if the master
+#    is still in the "connected" state), or the time that elapsed since the
+#    disconnection with the master (if the replication link is currently down).
+#    If the last interaction is too old, the slave will not try to failover
+#    at all.
+#
+# The point "2" can be tuned by user. Specifically a slave will not perform
+# the failover if, since the last interaction with the master, the time
+# elapsed is greater than:
+#
+#   (node-timeout * slave-validity-factor) + repl-ping-slave-period
+#
+# So for example if node-timeout is 30 seconds, and the slave-validity-factor
+# is 10, and assuming a default repl-ping-slave-period of 10 seconds, the
+# slave will not try to failover if it was not able to talk with the master
+# for longer than 310 seconds.
+#
+# A large slave-validity-factor may allow slaves with too old data to failover
+# a master, while a too small value may prevent the cluster from being able to
+# elect a slave at all.
+#
+# For maximum availability, it is possible to set the slave-validity-factor
+# to a value of 0, which means, that slaves will always try to failover the
+# master regardless of the last time they interacted with the master.
+# (However they'll always try to apply a delay proportional to their
+# offset rank).
+#
+# Zero is the only value able to guarantee that when all the partitions heal
+# the cluster will always be able to continue.
+#
+# cluster-slave-validity-factor 10
+
+# Cluster slaves are able to migrate to orphaned masters, that are masters
+# that are left without working slaves. This improves the cluster ability
+# to resist to failures as otherwise an orphaned master can't be failed over
+# in case of failure if it has no working slaves.
+#
+# Slaves migrate to orphaned masters only if there are still at least a
+# given number of other working slaves for their old master. This number
+# is the "migration barrier". A migration barrier of 1 means that a slave
+# will migrate only if there is at least 1 other working slave for its master
+# and so forth. It usually reflects the number of slaves you want for every
+# master in your cluster.
+#
+# Default is 1 (slaves migrate only if their masters remain with at least
+# one slave). To disable migration just set it to a very large value.
+# A value of 0 can be set but is useful only for debugging and dangerous
+# in production.
+#
+# cluster-migration-barrier 1
+
+# By default Redis Cluster nodes stop accepting queries if they detect there
+# is at least an hash slot uncovered (no available node is serving it).
+# This way if the cluster is partially down (for example a range of hash slots
+# are no longer covered) all the cluster becomes, eventually, unavailable.
+# It automatically returns available as soon as all the slots are covered again.
+#
+# However sometimes you want the subset of the cluster which is working,
+# to continue to accept queries for the part of the key space that is still
+# covered. In order to do so, just set the cluster-require-full-coverage
+# option to no.
+#
+# cluster-require-full-coverage yes
+
+# In order to setup your cluster make sure to read the documentation
+# available at http://redis.io web site.
+
+################################## SLOW LOG ###################################
+
+# The Redis Slow Log is a system to log queries that exceeded a specified
+# execution time. The execution time does not include the I/O operations
+# like talking with the client, sending the reply and so forth,
+# but just the time needed to actually execute the command (this is the only
+# stage of command execution where the thread is blocked and can not serve
+# other requests in the meantime).
+#
+# You can configure the slow log with two parameters: one tells Redis
+# what is the execution time, in microseconds, to exceed in order for the
+# command to get logged, and the other parameter is the length of the
+# slow log. When a new command is logged the oldest one is removed from the
+# queue of logged commands.
+
+# The following time is expressed in microseconds, so 1000000 is equivalent
+# to one second. Note that a negative number disables the slow log, while
+# a value of zero forces the logging of every command.
+slowlog-log-slower-than 10000
+
+# There is no limit to this length. Just be aware that it will consume memory.
+# You can reclaim memory used by the slow log with SLOWLOG RESET.
+slowlog-max-len 128
+
+################################ LATENCY MONITOR ##############################
+
+# The Redis latency monitoring subsystem samples different operations
+# at runtime in order to collect data related to possible sources of
+# latency of a Redis instance.
+#
+# Via the LATENCY command this information is available to the user that can
+# print graphs and obtain reports.
+#
+# The system only logs operations that were performed in a time equal or
+# greater than the amount of milliseconds specified via the
+# latency-monitor-threshold configuration directive. When its value is set
+# to zero, the latency monitor is turned off.
+#
+# By default latency monitoring is disabled since it is mostly not needed
+# if you don't have latency issues, and collecting data has a performance
+# impact, that while very small, can be measured under big load. Latency
+# monitoring can easily be enabled at runtime using the command
+# "CONFIG SET latency-monitor-threshold <milliseconds>" if needed.
+latency-monitor-threshold 0
+
+############################# EVENT NOTIFICATION ##############################
+
+# Redis can notify Pub/Sub clients about events happening in the key space.
+# This feature is documented at http://redis.io/topics/notifications
+#
+# For instance if keyspace events notification is enabled, and a client
+# performs a DEL operation on key "foo" stored in the Database 0, two
+# messages will be published via Pub/Sub:
+#
+# PUBLISH __keyspace@0__:foo del
+# PUBLISH __keyevent@0__:del foo
+#
+# It is possible to select the events that Redis will notify among a set
+# of classes. Every class is identified by a single character:
+#
+#  K     Keyspace events, published with __keyspace@<db>__ prefix.
+#  E     Keyevent events, published with __keyevent@<db>__ prefix.
+#  g     Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
+#  $     String commands
+#  l     List commands
+#  s     Set commands
+#  h     Hash commands
+#  z     Sorted set commands
+#  x     Expired events (events generated every time a key expires)
+#  e     Evicted events (events generated when a key is evicted for maxmemory)
+#  A     Alias for g$lshzxe, so that the "AKE" string means all the events.
+#
+#  The "notify-keyspace-events" takes as argument a string that is composed
+#  of zero or multiple characters. The empty string means that notifications
+#  are disabled.
+#
+#  Example: to enable list and generic events, from the point of view of the
+#           event name, use:
+#
+#  notify-keyspace-events Elg
+#
+#  Example 2: to get the stream of the expired keys subscribing to channel
+#             name __keyevent@0__:expired use:
+#
+#  notify-keyspace-events Ex
+#
+#  By default all notifications are disabled because most users don't need
+#  this feature and the feature has some overhead. Note that if you don't
+#  specify at least one of K or E, no events will be delivered.
+notify-keyspace-events Ex
+
+############################### ADVANCED CONFIG ###############################
+
+# Hashes are encoded using a memory efficient data structure when they have a
+# small number of entries, and the biggest entry does not exceed a given
+# threshold. These thresholds can be configured using the following directives.
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happen to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
+# Similarly to hashes and lists, sorted sets are also specially encoded in
+# order to save a lot of space. This encoding is only used when the length and
+# elements of a sorted set are below the following limits:
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+
+# HyperLogLog sparse representation bytes limit. The limit includes the
+# 16 bytes header. When an HyperLogLog using the sparse representation crosses
+# this limit, it is converted into the dense representation.
+#
+# A value greater than 16000 is totally useless, since at that point the
+# dense representation is more memory efficient.
+#
+# The suggested value is ~ 3000 in order to have the benefits of
+# the space efficient encoding without slowing down too much PFADD,
+# which is O(N) with the sparse encoding. The value can be raised to
+# ~ 10000 when CPU is not a concern, but space is, and the data set is
+# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
+hll-sparse-max-bytes 3000
+
+# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
+# order to help rehashing the main Redis hash table (the one mapping top-level
+# keys to values). The hash table implementation Redis uses (see dict.c)
+# performs a lazy rehashing: the more operation you run into a hash table
+# that is rehashing, the more rehashing "steps" are performed, so if the
+# server is idle the rehashing is never complete and some more memory is used
+# by the hash table.
+#
+# The default is to use this millisecond 10 times every second in order to
+# actively rehash the main dictionaries, freeing memory when possible.
+#
+# If unsure:
+# use "activerehashing no" if you have hard latency requirements and it is
+# not a good thing in your environment that Redis can reply from time to time
+# to queries with 2 milliseconds delay.
+#
+# use "activerehashing yes" if you don't have such hard requirements but
+# want to free memory asap when possible.
+activerehashing yes
+
+# The client output buffer limits can be used to force disconnection of clients
+# that are not reading data from the server fast enough for some reason (a
+# common reason is that a Pub/Sub client can't consume messages as fast as the
+# publisher can produce them).
+#
+# The limit can be set differently for the three different classes of clients:
+#
+# normal -> normal clients including MONITOR clients
+# slave  -> slave clients
+# pubsub -> clients subscribed to at least one pubsub channel or pattern
+#
+# The syntax of every client-output-buffer-limit directive is the following:
+#
+# client-output-buffer-limit <class> <hard limit> <soft limit> <soft seconds>
+#
+# A client is immediately disconnected once the hard limit is reached, or if
+# the soft limit is reached and remains reached for the specified number of
+# seconds (continuously).
+# So for instance if the hard limit is 32 megabytes and the soft limit is
+# 16 megabytes / 10 seconds, the client will get disconnected immediately
+# if the size of the output buffers reach 32 megabytes, but will also get
+# disconnected if the client reaches 16 megabytes and continuously overcomes
+# the limit for 10 seconds.
+#
+# By default normal clients are not limited because they don't receive data
+# without asking (in a push way), but just after a request, so only
+# asynchronous clients may create a scenario where data is requested faster
+# than it can read.
+#
+# Instead there is a default limit for pubsub and slave clients, since
+# subscribers and slaves receive data in a push fashion.
+#
+# Both the hard or the soft limit can be disabled by setting them to zero.
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+
+# Redis calls an internal function to perform many background tasks, like
+# closing connections of clients in timeout, purging expired keys that are
+# never requested, and so forth.
+#
+# Not all tasks are performed with the same frequency, but Redis checks for
+# tasks to perform according to the specified "hz" value.
+#
+# By default "hz" is set to 10. Raising the value will use more CPU when
+# Redis is idle, but at the same time will make Redis more responsive when
+# there are many keys expiring at the same time, and timeouts may be
+# handled with more precision.
+#
+# The range is between 1 and 500, however a value over 100 is usually not
+# a good idea. Most users should use the default of 10 and raise this up to
+# 100 only in environments where very low latency is required.
+hz 10
+
+# When a child rewrites the AOF file, if the following option is enabled
+# the file will be fsync-ed every 32 MB of data generated. This is useful
+# in order to commit the file to the disk more incrementally and avoid
+# big latency spikes.
+aof-rewrite-incremental-fsync yes

+ 39 - 0
docker/compose/yl/ylacc/docker-compose.yml

@@ -0,0 +1,39 @@
+version: "3.7"
+
+services:
+  accnginx:
+    image: nginx:alpine
+    ports:
+      - "8000:80"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /nfs/ylmerchant:/var/www/html/merchant
+    container_name: "yl-accnginx"
+    command: [nginx,'-g','daemon off;']
+    extra_hosts:
+      - "docker.hostip:172.17.0.1"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  mobile:
+    image: php-zts:7.3.18
+    ports:
+      - "9700:9100"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+      - ../conf/php/mobile-spwan-start:/usr/local/bin/docker-spwan-start
+    container_name: "yl-mobile"
+    command: ['docker-spwan-start']
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 59 - 0
docker/compose/yl/yladmin/docker-compose.yml

@@ -0,0 +1,59 @@
+version: "3.7"
+
+services:
+  nginx:
+    image: nginx:alpine
+    ports:
+      - "8000:80"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/nginx/nginx_admin.conf:/etc/nginx/nginx.conf:ro
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /nfs/ylmerchant:/var/www/html/merchant
+    container_name: "yl-nginx"
+    command: [nginx,'-g','daemon off;']
+    extra_hosts:
+      - "docker.hostip:172.17.0.1"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  merchant:
+    image: php-zts:7.3.18
+    ports:
+      - "9702:9102"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - ../conf/php/mch-spwan-start:/usr/local/bin/docker-spwan-start
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-merchant"
+    command: [docker-spwan-start]
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  web:
+    image: php-fpm:alpine
+    ports:
+      - "9600:9000"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - ../conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-admin"
+    command: [php-fpm]
+    extra_hosts:
+      - "docker.hostip:172.17.0.1"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 30 - 0
docker/compose/yl/ylcli/docker-compose.yml

@@ -0,0 +1,30 @@
+version: "3.7"
+
+services:
+  php:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-php"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  swoole:
+    image: php-swool-redis:latest
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php-swoole.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-swoole"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 36 - 0
docker/compose/yl/ylmaster-crond/docker-compose.yml

@@ -0,0 +1,36 @@
+version: "3.7"
+
+services:
+  crontabsrv:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - ../conf/crontab/root:/var/spool/cron/crontabs/root
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-crontab"
+    command: [crond,"-f"]
+
+  cronsec:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-cronsec"
+    command: [php,"/var/www/html/crontab/index.php",'minutes','second_queue']
+
+  accedit:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-accedit"
+    command: [php,"/var/www/html/crontab/index.php",'minutes','account_edit']

+ 50 - 0
docker/compose/yl/ylslave-crond/docker-compose.yml

@@ -0,0 +1,50 @@
+version: "3.7"
+
+services:
+  crontabslave:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - ../conf/crontab/slave_root:/var/spool/cron/crontabs/root
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-slavecron"
+    command: [crond,"-f"]
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  taska:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - ../conf/crontab/slave_root:/var/spool/cron/crontabs/root
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-taska"
+    command: [php,"/var/www/html/crontab/index.php",'minutes','task']
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  taskb:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - ../conf/crontab/slave_root:/var/spool/cron/crontabs/root
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-taskb"
+    command: [php,"/var/www/html/crontab/index.php",'minutes','task']
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 98 - 0
docker/compose/yl/ylstat/docker-compose.yml

@@ -0,0 +1,98 @@
+version: "3.7"
+
+services:
+  readersrv:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-reader"
+    command: ['python','reader.py', '-h', '172.26.80.7', '-p', '6379']
+
+  mchreadersrv:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-mchreader"
+    command: ['python','mchreader.py', '-h', '172.26.80.7', '-p', '6379']
+
+  speedreader:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-speedreader"
+    command: ['python','speed_reader.py', '-h', '172.26.80.7', '-p', '6379']
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  chspeed:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-chspeed"
+    command: ['python','chspeed.py','-h', '172.26.80.7', '-p', '6379']
+
+  ratiosrv:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-ratio"
+    command: ['python','ratio.py', '-h', '172.26.80.7', '-p', '6379']
+
+  flasksrv:
+    image: pycpu:3.7.10
+    ports:
+      - "5000:5000"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-flask"
+    command: ['python','app.py']
+
+  mratiosrv:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-mratio"
+    command: ['python','mratio.py','-h', '172.26.80.7', '-p', '6379']
+
+  mratios:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-mratios"
+    command: ['python','mratios.py','-h', '172.26.80.7', '-p', '6379']
+
+  mcounts:
+    image: pycpu:3.7.10
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - /mnt/yllog:/var/www/html/data/log
+      - /mnt/stdata:/var/www/html/data/stdata
+    container_name: "yl-mcounts"
+    command: ['python','mcounts.py','-h', '172.26.80.7', '-p', '6379']

+ 13 - 0
docker/compose/yl/ylstorage/docker-compose.yml

@@ -0,0 +1,13 @@
+version: "3.7"
+
+services:
+  redis:
+    image: redis:alpine
+    ports:
+      - "6379:6379"
+    volumes:
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/redis/6379.conf:/etc/redis/redis.conf
+      - /mnt/ylredisdata:/data
+    container_name: "yl-redis"
+    command: [redis-server,"/etc/redis/redis.conf"]

+ 39 - 0
docker/compose/yl/ylworker/docker-compose.yml

@@ -0,0 +1,39 @@
+version: "3.7"
+
+services:
+  codispatcher:
+    image: php-swool-redis:latest
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php-swoole.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-codispatcher"
+    command: [php,"/var/www/html/rdispatcher/codispatcher.php","32"]
+    deploy:
+      resources:
+        limits:
+          cpus: '8'
+
+  queue:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-queue"
+    command: [php,"/var/www/html/queue/index.php", "queue", "index"]
+
+  searcher:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /mnt/yllog:/var/www/html/data/log
+    container_name: "yl-searcher"
+    command: [php, "/var/www/html/searcher.php"]

+ 4 - 0
docker/compose/yl/ylworker/restart_all.sh

@@ -0,0 +1,4 @@
+docker-compose stop -t 1200 codispatcher
+docker-compose down
+docker-compose up -d
+docker-compose ps

+ 3 - 0
docker/compose/yl/ylworker/restart_cordsrv.sh

@@ -0,0 +1,3 @@
+docker-compose stop -t 1200 codispatcher
+docker-compose up -d codispatcher
+docker-compose ps

+ 3 - 0
docker/compose/yl/ylworker/stop_all.sh

@@ -0,0 +1,3 @@
+docker-compose stop -t 1200 codispatcher
+docker-compose down
+docker-compose ps

+ 1 - 0
helper/fcgisrv/BaseServer.php

@@ -37,6 +37,7 @@ abstract class BaseServer
         $_COOKIE = [];
         $_POST = [];
         $_GET = [];
+//        $_SERVER = [];
     }
 
     public function handle_error($level, $message, $file, $line)

+ 8 - 8
helper/refill/api/xyz/dashang/config.php

@@ -40,14 +40,14 @@ class config
             ],
         mtopcard\ChinaTelecomCard =>
             [
-                10  => 90290010,
-                20  => 90290020,
-                30  => 90290030,
-                50  => 90290050,
-                100 => 90290100,
-                200 => 90290200,
-                300 => 90290300,
-                500 => 90290500
+                10  => 90450010,
+                20  => 90450020,
+                30  => 90450030,
+                50  => 90450050,
+                100 => 90450100,
+                200 => 90450200,
+                300 => 90450300,
+                500 => 90450500
             ]
     ];
 }

+ 29 - 1
helper/refill/api/xyz/dashang/开户信息-1.txt

@@ -10,6 +10,14 @@ key: bb9c64bbd8937e03ca73f9d7b29a17af
 查询:http://47.114.209.57/unicomAync/queryBizOrder.do
 余额:http://47.114.209.57/unicomAync/queryBalance.do
 
+90440010  中国移动-专供10
+90440020  中国移动-专供20
+90440030  中国移动-专供30
+90440050  中国移动-专供50
+90440100  中国移动-专供100
+90440200  中国移动-专供200
+90440300  中国移动-专供300
+90440500  中国移动-专供500
 
 联通沃支付
 90330010 中国联通-官方10
@@ -20,6 +28,16 @@ key: bb9c64bbd8937e03ca73f9d7b29a17af
 90330200 中国联通-官方200
 90330300 中国联通-官方300
 90330500 中国联通-官方500
+
+90460010  中国联通-专供10
+90460020  中国联通-专供20
+90460030  中国联通-专供30
+90460050  中国联通-专供50
+90460100  中国联通-专供100
+90460200  中国联通-专供200
+90460300  中国联通-专供300
+90460500  中国联通-专供500
+
 电信电渠
 90290010 中国电信-电渠10
 90290020 中国电信-电渠20
@@ -28,4 +46,14 @@ key: bb9c64bbd8937e03ca73f9d7b29a17af
 90290100 中国电信-电渠100
 90290200 中国电信-电渠200
 90290300 中国电信-电渠300
-90290500 中国电信-电渠500
+90290500 中国电信-电渠500
+
+2022.3.23 电信更新编码
+90450010 中国电信-专供10
+90450020 中国电信-专供20
+90450030 中国电信-专供30
+90450050 中国电信-专供50
+90450100 中国电信-专供100
+90450200 中国电信-专供200
+90450300 中国电信-专供300
+90450500 中国电信-专供500

BIN
helper/refill/api/xyz/guochuang/20220318湖南电信调价函.png


BIN
helper/refill/api/xyz/guochuang/20220323辽宁移动调价函.png


+ 2 - 2
helper/refill/api/xyz/guochuang/config.php

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 9.99, "4-20-2" => 19.98, "4-30-2" => 29.895, "4-50-2" => 49.825, "4-100-2" => 99.65, "4-200-2" => 199.3, "4-300-2" => 298.95, "4-500-2" => 498.25,//天津 2
-        "4-10-6" => 9.75, "4-20-6" => 19.5, "4-30-6" => 29.25, "4-50-6" => 48.75, "4-100-6" => 97.5, "4-200-6" => 195, "4-300-6" => 292.5, "4-500-6" => 487.5,//辽宁 6
+        "4-10-6" => 9.745, "4-20-6" => 19.49, "4-30-6" => 29.235, "4-50-6" => 48.725, "4-100-6" => 97.45, "4-200-6" => 194.9, "4-300-6" => 292.35, "4-500-6" => 487.25,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 10, "4-20-8" => 20, "4-30-8" => 30, "4-50-8" => 50, "4-100-8" => 100, "4-200-8" => 200, "4-300-8" => 300, "4-500-8" => 500 ,//黑龙江 8
         "4-10-29" => 9.765, "4-20-29" => 19.53, "4-30-29" => 29.295, "4-50-29" => 48.825, "4-100-29" => 97.65, "4-200-29" => 195.3, "4-300-29" => 292.95, "4-500-29" => 488.25,//青海 29
@@ -91,7 +91,7 @@ class config
         //电信
         "6-10-27" => 9.94, "6-20-27" => 19.88, "6-30-27" => 29.82, "6-50-27" => 49.7, "6-100-27" => 99.4, "6-200-27" => 198.8, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
-        "6-10-18" => 10.13, "6-20-18" => 20.26, "6-30-18" => 30.39, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
+        "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15
         "6-10-12" => 10.04, "6-20-12" => 20.05, "6-30-12" => 30.12, "6-50-12" => 50.2, "6-100-12" => 100.4, "6-200-12" => 200.6, "6-300-12" => 300.9, "6-500-12" => 501.5,//安徽 12
     ];

+ 4 - 2
helper/refill/api/xyz/hangtong/config.php

@@ -22,10 +22,12 @@ class config
             30 => 'CMCCALLr30r', 50 => 'CMCCALLr50r', 100 => 'CMCCALLr100r', 200 => 'CMCCALLr200r'
         ],
         mtopcard\ChinaUnicomCard => [
-            30 => 'CUCCALLr30sP00000', 50 => 'CUCCALLr50sP00001', 100 => 'CUCCALLr100sP00002', 200 => 'CUCCALLr200sP00003'
+            30 => 'CUCCALLr30r', 50 => 'CUCCALLr50r', 100 => 'CUCCALLr100r', 200 => 'CUCCALLr200r',
+            300 => 'CUCCALLr300r', 500 => 'CUCCALLr500r'
         ],
         mtopcard\ChinaTelecomCard => [
-            30 => 'CTCCALLr30r', 50 => 'CTCCALLr50r', 100 => 'CTCCALLr100r', 200 => 'CTCCALLr200r'
+            30 => 'CTCCALLr30r', 50 => 'CTCCALLr50r', 100 => 'CTCCALLr100r', 200 => 'CTCCALLr200r',
+            300 => 'CTCCALLr300r', 500 => 'CTCCALLr500r'
         ]
     ];
 }

+ 10 - 0
helper/refill/api/xyz/hangtong/椰子.txt

@@ -38,3 +38,13 @@ CUCCALLr30sP00000		30
 CUCCALLr50sP00001		50
 CUCCALLr100sP00002		100
 CUCCALLr200sP00003		200
+
+2022.3.19修改联通编码
+CUCCALLr30r
+CUCCALLr50r
+CUCCALLr100r
+CUCCALLr200r
+
+2022.3.23联通电信300-500
+联通:CUCCALLr300r     CUCCALLr500r
+电信:CTCCALLr300r     CTCCALLr500r

BIN
helper/refill/api/xyz/kuaikuaifs/20220318广东移动调价函.png


+ 1 - 1
helper/refill/api/xyz/kuaikuaifs/config.php

@@ -50,7 +50,7 @@ class config
         //移动
         "4-5-29" => 4.87, "4-10-29" => 9.74, "4-20-29" => 19.48, "4-30-29" => 29.22, "4-50-29" => 48.7, "4-100-29" => 97.4, "4-200-29" => 194.8, "4-300-29" => 292.2, "4-500-29" => 487,//青海 29
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
-        "4-10-19" => 9.95, "4-20-19" => 19.9, "4-30-19" => 29.85, "4-50-19" => 49.75, "4-100-19" => 99.5, "4-200-19" => 199, "4-300-19" => 298.5, "4-500-19" => 497.5,//广东 19
+        "4-10-19" => 9.92, "4-20-19" => 19.84, "4-30-19" => 29.76, "4-50-19" => 49.6, "4-100-19" => 99.2, "4-200-19" => 198.4, "4-300-19" => 297.6, "4-500-19" => 496,//广东 19
     ];
 
     public static function sign($params)

BIN
helper/refill/api/xyz/miaoxt_fs/20220322吉林青海辽宁移动调价函.png


+ 3 - 2
helper/refill/api/xyz/miaoxt_fs/config.php

@@ -28,8 +28,9 @@ class config
     const Price = [
         //移动
         "4-10-5" => 9.99, "4-20-5" => 19.98, "4-30-5" => 29.97, "4-50-5" => 49.95, "4-100-5" => 99.9, "4-200-5" => 199.8, "4-300-5" => 299.7, "4-500-5" => 499.5,//内蒙古 5
-        "4-10-6" => 9.79, "4-20-6" => 19.58, "4-30-6" => 29.37, "4-50-6" => 48.95, "4-100-6" => 97.9, "4-200-6" => 195.8, "4-300-6" => 293.7, "4-500-6" => 489.5,//辽宁 6
-        "4-10-29" => 9.82, "4-20-29" => 19.64, "4-30-29" => 29.46, "4-50-29" => 49.1, "4-100-29" => 98.2, "4-200-29" => 196.4, "4-300-29" => 294.6, "4-500-29" => 491,//青海 29
+        "4-10-6" => 9.75, "4-20-6" => 19.5, "4-30-6" => 29.25, "4-50-6" => 48.75, "4-100-6" => 97.5, "4-200-6" => 195, "4-300-6" => 292.5, "4-500-6" => 487.5,//辽宁 6
+        "4-10-7" => 9.84, "4-20-7" => 19.68, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
+        "4-10-29" => 9.79, "4-20-29" => 19.58, "4-30-29" => 29.37, "4-50-29" => 48.95, "4-100-29" => 97.9, "4-200-29" => 195.8, "4-300-29" => 293.7, "4-500-29" => 489.5,//青海 29
         "4-10-8" => 9.99, "4-20-8" => 19.98, "4-30-8" => 29.97, "4-50-8" => 49.95, "4-100-8" => 99.9, "4-200-8" => 199.8, "4-300-8" => 299.7, "4-500-8" => 499.5,//黑龙江 8
         "4-10-14" => 10.05, "4-20-14" => 20.1, "4-30-14" => 30.15, "4-50-14" => 50.25, "4-100-14" => 100.2, "4-200-14" => 200.4, "4-300-14" => 300.6, "4-500-14" => 501,//江西 14
         "4-10-19" => 9.955, "4-20-19" => 19.91, "4-30-19" => 29.865, "4-50-19" => 49.775, "4-100-19" => 99.55, "4-200-19" => 199.1, "4-300-19" => 298.65, "4-500-19" => 497.75,//广东 19

+ 4 - 4
helper/refill/api/xyz/yunlingfs/RefillPhone.php

@@ -18,10 +18,10 @@ class RefillPhone extends refill\IRefillPhone
     private function req_params(int $phone, int $card_type, int $amount, string $order_sn)
     {
         $params['userid'] = config::USER_ID;
-        if($card_type === mtopcard\ChinaTelecomCard) {
-            $params['productid'] = config::product_id[$card_type][$amount];
-        }else{
+        if($card_type === mtopcard\ChinaMobileCard) {
             $params['productid'] = '';
+        }else{
+            $params['productid'] = config::product_id[$card_type][$amount];
         }
         $params['price'] = $amount;
         $params['num'] = 1;
@@ -37,7 +37,7 @@ class RefillPhone extends refill\IRefillPhone
     {
         $order_sn = $params['order_sn'];
         $params = $this->req_params($card_no, $card_type, $amount, $order_sn);
-        if($card_type == mtopcard\ChinaTelecomCard && empty($params['productid'])) {
+        if($card_type != mtopcard\ChinaMobileCard && empty($params['productid'])) {
             return [false, '商品编号获取失败', false];
         }
         $sign = $this->sign($params);

+ 6 - 0
helper/refill/api/xyz/yunlingfs/config.php

@@ -18,6 +18,12 @@ class config
         mtopcard\ChinaTelecomCard => 'dx'
     ];
     const product_id = [
+        mtopcard\ChinaUnicomCard => [
+            30 => '30000000731',
+            50 => '30000000732',
+            100 => '30000000733',
+            200 => '30000000992'
+        ],
         mtopcard\ChinaTelecomCard => [
             30 => '30000000736',
             50 => '30000000737',

+ 8 - 1
helper/refill/api/xyz/yunlingfs/新系椰子分省通代理信息.txt

@@ -18,4 +18,11 @@
 30000000738   全国电信100元直充
 30000000739   全国电信200元直充
 30000000740   全国电信300元直充
-30000000741   全国电信500元直充
+30000000741   全国电信500元直充
+
+2022.3.20 新增联通编码
+云嶺联通分省编码
+30000000731   全国联通30元直充
+30000000732   全国联通50元直充
+30000000733   全国联通100元直充
+30000000992   全国联通200元直充

+ 52 - 0
helper/refill/api/yl/afand/RefillCallBack.php

@@ -0,0 +1,52 @@
+<?php
+
+
+namespace refill\afand;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afand/config.php');
+
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $content  = config::MCHID . $params['pt_order_id'] . $params['mch_order_id'] . $params['op_order_id'] . $params['tel'];
+        $content .= $params['price'] . $params['pay_type'] . $params['status'] . config::KEY;
+        return md5($content);
+    }
+
+    //[$order_id, $success, $can_try, $need_handle]
+    public function notify($params)
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['mch_order_id'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        
+        $data['official_sn'] = strtolower($params['op_order_id']) == 'null' ? '' : $params['op_order_id'];
+
+        if ($status === 1) {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 0) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 110 - 0
helper/refill/api/yl/afand/RefillPhone.php

@@ -0,0 +1,110 @@
+<?php
+
+namespace refill\afand;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afand/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['tel'] = $phone;
+        $params['mch_order_id'] = $order_sn;
+        $params['mchid'] = config::MCHID;
+        $params['price'] = $amount;
+        $params['notify'] = config::NOTIFY_URL;
+        $params['teltype'] = config::operator[$card_type];
+        $params['timeout'] = 50;
+        $params['time'] = time();
+        $params['rand'] = rand(100000,999999);
+
+        return $params;
+    }
+
+    //[$state, $errmsg,$neterr]
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $card_type, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST' , false,[],$net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            }
+            $code = intval($resp['code']);
+            if ($code === 0) {
+                return [true, $resp['pt_order_id'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['mch_order_id'] = $refill_info['order_sn'];
+        $params['mchid'] = config::MCHID;
+        $params['pt_order_id'] = $refill_info['ch_trade_no'];
+        $params['mch_order_id'] = $refill_info['order_sn'];
+        $params['op_order_id'] = $refill_info['official_sn'];
+        $params['tel'] = $refill_info['card_no'];
+        $params['time'] = time();
+        $params['rand'] = rand(100000,999999);
+        $content = $params['mchid'] . $params['pt_order_id'] . $params['mch_order_id'] . $params['op_order_id'] . $params['tel'] . $params['time'] . $params['rand'] . config::KEY;
+        $params['sign'] = md5($content);
+        $resp = http_request(config::QUERY_URL, $params , 'POST' , false);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            $code = intval($resp['code']);
+            if ($code === 0)
+            {
+                if ($resp['data']['status'] === '已支付') {
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resp['data']['status'] === '支付失败') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } else {
+                    return [false, $resp['data']];
+                }
+                return [true, $order_state];
+            }
+            else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+
+
+    private function sign($params)
+    {
+        $key = config::KEY;
+        $content  = $params['mchid'] . $params['tel'] . $params['mch_order_id'] . $params['price'] . $params['teltype'] . $params['timeout'] . $params['notify'];
+        $content .= $params['time'] . $params['rand'] . $key;
+        return md5($content);
+    }
+}

+ 20 - 0
helper/refill/api/yl/afand/config.php

@@ -0,0 +1,20 @@
+<?php
+
+
+namespace refill\afand;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://47.98.208.197/api/telpay';
+    const QUERY_URL = 'http://47.98.208.197/api/telpay/query';
+
+    const MCHID = 10019;
+    const KEY = '953b8e10a70ef4e85b77f09448c0e316';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_afand.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 2,
+        mtopcard\ChinaUnicomCard  => 1,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+}

+ 49 - 0
helper/refill/api/yl/afandeng/RefillCallBack.php

@@ -0,0 +1,49 @@
+<?php
+
+
+namespace refill\afandeng;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afandeng/config.php');
+
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sgn'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $content = $params['ord'] . $params['state'] . config::KEY;
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['state']);
+        $order_sn = $params['ord'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        $data['official_sn'] = $params['bz'];
+
+        if ($status === 1) {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 2) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 100 - 0
helper/refill/api/yl/afandeng/RefillPhone.php

@@ -0,0 +1,100 @@
+<?php
+
+namespace refill\afandeng;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afandeng/config.php');
+
+use refill;
+use Log;
+use mtopcard;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['usr'] = config::USR;
+        $params['mob'] = $phone;
+        $params['amt'] = $amount;
+        $params['ord'] = $order_sn;
+        $params['tim'] = date("YmdHis");
+        $params['yysid'] = 0;
+        $params['hmlx'] = 0;
+        return $params;
+
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no,$amount,$order_sn);
+        $sign = $this->sign($params);
+        $params['sgn'] = $sign;
+
+        $resp = http_request(config::PAY_PHONE_URL,$params,'GET',false,[],$net_errno);
+
+        if (empty($resp)) {
+            return [false,'系统错误',true];
+        }
+        else
+        {
+            Log::record($resp,Log::DEBUG);
+            $resp = ltrim($resp , '|');
+
+            $resp = explode('|' , $resp);
+            if (count($resp) != 3) {
+                return [false, '返回值错误', false];
+            } elseif ($resp[0] == 0) {
+                return [true, '', false];
+            } else {
+                return [false, $resp[1], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['ord'] = $refill_info['order_sn'];
+        $params['usr'] = config::USR;
+        $content = $params['usr'] . $params['ord'] . config::KEY;
+        $params['sgn'] = strtoupper(md5($content));
+        $resp = http_request(config::QUERY_URL,$params);
+        if (empty($resp)) {
+            return [false,'系统错误'];
+        }
+        else
+        {
+            Log::record($resp,Log::DEBUG);
+            $resp = ltrim($resp , '|');
+            $resp = explode('|' , $resp);
+            if(count($resp) != 3) {
+                return [false,'返回值错误'];
+            } elseif ($resp[0] === 1) {
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($resp[0] === 2) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif ($resp[0] === 0){
+                $order_state = ORDER_STATE_SEND;
+            } else {
+                return [false, $resp[0]];
+            }
+            return [true, $order_state];
+        }
+    }
+
+    public function balance()
+    {
+        return [false, '暂无余额接口'];
+    }
+
+    private function sign($params)
+    {
+        $key = config::KEY;
+        $content = $params['usr'] . $params['ord'] . $params['mob'] . $params['amt'] . $params['tim'] . $key;
+        return strtoupper(md5($content));
+    }
+}

+ 13 - 0
helper/refill/api/yl/afandeng/config.php

@@ -0,0 +1,13 @@
+<?php
+
+
+namespace refill\afandeng;
+
+
+class config
+{
+    const PAY_PHONE_URL = 'http://8.140.101.13:806/webInface/PayPhone.ashx';
+    const QUERY_URL= 'http://8.140.101.13:806/webInface/GetOrderState.ashx';
+    const USR= 'afandeng';
+    const KEY = 'd54e3cac95dec6839e74313740ce2ab1';
+}

+ 47 - 0
helper/refill/api/yl/afandfs/RefillCallBack.php

@@ -0,0 +1,47 @@
+<?php
+
+
+namespace refill\afandfs;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afandfs/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $content = $params['code'] . config::PARTNER_ID . $params['partner_order_no'] . $params['phone'] . $params['amount'] . $params['official_order_id'] . config::KEY;
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['code']);
+        $order_sn = $params['partner_order_no'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status === 1) {
+            $data['official_sn'] = strtolower($params['official_order_id']) == 'null' ? '' : $params['official_order_id'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 0) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 108 - 0
helper/refill/api/yl/afandfs/RefillPhone.php

@@ -0,0 +1,108 @@
+<?php
+
+namespace refill\afandfs;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afandfs/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['partner_id'] = config::PARTNER_ID;
+        $params['partner_order_no'] = $order_sn;
+        $params['phone'] = $phone;
+        $params['amount'] = $amount;
+        $params['charge_type'] = config::operator[$card_type];
+        $params['notify_url'] = config::NOTIFY_URL;
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $card_type, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST' , false , config::ExtHeaders,$net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误',true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] == 1) {
+                return [true, $resp['data'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['partner_id'] = config::PARTNER_ID;
+        $params['partner_order_no'] = $refill_info['order_sn'];
+        $content = $params['partner_id'] . $params['partner_order_no'] . config::KEY;
+        $params['sign'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params , 'POST' , false , config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] == 1)
+            {
+                $status = intval($resp['data']['code']);
+                if ($status == 1) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $save['official_sn'] = $resp['data']['official_order_id'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                } elseif ($status == 0) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status == 2) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['msg']];
+                }
+
+                return [true, $order_state];
+            }
+            else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        return [false, '暂无余额接口'];
+    }
+
+    private function sign($params)
+    {
+        $key = config::KEY;
+        $content = $params['partner_id'] . $params['partner_order_no'] . $params['phone'] . $params['amount'] . $params['notify_url'] . $key;
+        return md5($content);
+    }
+}

+ 20 - 0
helper/refill/api/yl/afandfs/config.php

@@ -0,0 +1,20 @@
+<?php
+namespace refill\afandfs;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://150.107.3.58/api/receiveOrder';
+    const QUERY_URL = 'http://150.107.3.58/api/queryOrder';
+    const BALANCE_URL = 'http://119.8.102.95/api/quotaQuery';
+
+    const PARTNER_ID = '52';
+    const KEY = '8dd29f631f84b11f4ed4c2fbfcfc4057';
+    const NOTIFY_URL =  BASE_SITE_URL."/mobile/refill_afandfs.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 2,
+        mtopcard\ChinaUnicomCard  => 0,
+        mtopcard\ChinaTelecomCard => 1
+    ];
+    const ExtHeaders = ['Content-Type: application/x-www-form-urlencoded'];
+}

+ 19 - 0
helper/refill/api/yl/afandfs/北京分省账户.txt

@@ -0,0 +1,19 @@
+????????http://119.8.102.95/api/receiveOrder
+???????http://119.8.102.95/api/queryOrder
+???????http://119.8.102.95/api/quotaQuery
+
+
+???IP
+119.8.102.95
+
+
+
+
+http://119.8.102.95/index.html
+
+afd0017
+123456afd0017
+
+
+
+???  130c44ac97bf094b6c7e448be1fbee8f

BIN
helper/refill/api/yl/afandfs/阿凡灯分省对接文档.docx


+ 73 - 0
helper/refill/api/yl/afandnew/RefillCallBack.php

@@ -0,0 +1,73 @@
+<?php
+
+
+namespace refill\afandnew;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afandnew/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        $content = '';
+        ksort($params);
+        foreach ($params as $key => $val) {
+            if (false === $this->check_empty($val) && "@" != substr($val, 0, 1)) {
+                $content .= "{$key}={$val}&";
+            }
+        }
+        $content .= "key=" . config::KEY;
+
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['orderStatus']);
+        $order_sn = $params['orderNo'];
+
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false];
+        }
+
+        $order_id = $order_info['order_id'];
+        $data['official_sn'] = strtolower($params['carrierOrderNo']) == 'null' ? '' : $params['carrierOrderNo'];
+
+        if ($status === 2) {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 3) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 114 - 0
helper/refill/api/yl/afandnew/RefillPhone.php

@@ -0,0 +1,114 @@
+<?php
+
+namespace refill\afandnew;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afandnew/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['appId'] = config::APP_ID;
+        $params['mobile'] = $phone;
+        $params['amount'] = $amount;
+        $params['orderNo'] = $order_sn;
+        $params['notifyUrl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $params['order_sn']);
+        $params['productNo'] = config::ProductIDS[$card_type][$amount];
+        if (empty($params['productNo'])) {
+            return [false, '产品编号错误', false];
+        }
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] == 200) {
+                return [true, $resp['data']['tradeNo'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['tradeNo'] = $refill_info['ch_trade_no'];
+        $params['appId'] = config::APP_ID;
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] == 200)
+            {
+                $data = $resp['data'];
+                if ($data['orderStatus'] == 2) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $updata['official_sn'] = strtolower($data['carrierOrderNo']) == 'null' ? '' : $data['carrierOrderNo'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                } elseif ($data['orderStatus'] == 3) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($data['orderStatus'] == 1) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['msg']];
+                }
+                return [true, $order_state];
+            }
+            else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        return [false, '暂无余额接口'];
+    }
+
+    private function sign($params)
+    {
+        $content = '';
+        ksort($params);
+        foreach ($params as $key => $val) {
+            if (false === $this->check_empty($val) && "@" != substr($val, 0, 1)) {
+                $content .= "{$key}={$val}&";
+            }
+        }
+        $content .= "key=" . config::KEY;
+
+        return strtoupper(md5($content));
+    }
+}

+ 14 - 0
helper/refill/api/yl/afandnew/afd007.txt

@@ -0,0 +1,14 @@
+后台地址:http://ddd.nvtu.ren/boss/login
+账户名:afd007 密码:123456
+
+AppID:RC5229f3ef515e4b34adfb9aa251b5e15e
+Key:9803e5a3e4984ea4b8f847de28f22e2f
+
+订单下单接口:
+地址:http://ddd.nvtu.ren/gateway/recharge
+
+订单查询接口:
+地址:?http://ddd.nvtu.ren/gateway/recharge/order
+
+账户余额查询接口:
+地址:?http://ddd.nvtu.ren/gateway/balance/query

+ 32 - 0
helper/refill/api/yl/afandnew/config.php

@@ -0,0 +1,32 @@
+<?php
+
+
+namespace refill\afandnew;
+use mtopcard;
+
+class config
+{
+    const ORDER_URL = 'http://ddd.nvtu.ren/gateway/recharge';
+    const QUERY_URL = 'http://ddd.nvtu.ren/gateway/recharge/order';
+
+    const APP_ID = 'RC5229f3ef515e4b34adfb9aa251b5e15e';
+    const KEY = '9803e5a3e4984ea4b8f847de28f22e2f';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_afandnew.php";
+    const ExtHeaders = ['Content-Type: application/x-www-form-urlencoded'];
+
+    const ProductIDS = [
+        mtopcard\ChinaMobileCard  => [
+            10 => '2110000010101', 20 => '2110000020101', 30 => '2110000030101',
+            50 => '2110000050000', 100 => '21100000100000', 200 => '21100000200101'
+        ],
+        mtopcard\ChinaUnicomCard  => [
+            50 => '2310000050101', 100 => '23100000100101', 200 => '23100000200101',
+            300 => '23100000300101'
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30 => '2210000030101',
+            50 => '2210000050101', 100 => '22100000100101', 200 => '22100000200101',
+            300 => '22100000300101', 500 => '22100000500101'
+        ]
+    ];
+}

+ 628 - 0
helper/refill/api/yl/afandnew/阿凡灯充值系统2.2.doc

@@ -0,0 +1,628 @@
+<html xmlns:v="urn:schemas-microsoft-com:vml"
+    xmlns:o="urn:schemas-microsoft-com:office:office"
+    xmlns:w="urn:schemas-microsoft-com:office:word"
+    xmlns="http://www.w3.org/TR/REC-html40">
+    <head><meta http-equiv=Content-Type content="text/html; charset=utf-8">
+    <style type="text/css">
+        table  
+        {  
+            border-collapse: collapse;
+            border: none;  
+            width: 100%;  
+        }  
+        td,tr  
+        {  
+            border: solid #CCC 1px;
+            padding:3px;
+            font-size:9pt;
+        } 
+        .codestyle{
+            word-break: break-all;
+            mso-highlight:rgb(252, 252, 252);
+            padding-left: 5px; background-color: rgb(252, 252, 252); border: 1px solid rgb(225, 225, 232);
+        }
+        img {
+            width:100;
+        }
+    </style>
+    <meta name=ProgId content=Word.Document>
+    <meta name=Generator content="Microsoft Word 11">
+    <meta name=Originator content="Microsoft Word 11">
+    <xml><w:WordDocument><w:View>Print</w:View></xml></head>
+    <body><h1>1、签名规则</h1><div style="margin-left:20px;"><blockquote>
+<p>签名生成的通用步骤如下</p>
+</blockquote>
+<p><strong>第一步:</strong>设所有发送或者接收到的数据为集合M,将集合M内非空参数值的参数按照参数名ASCII码从小到大排序(字典序),使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串stringA。<br/><br/>
+特别注意以下重要规则:<br/><br/>
+◆ 参数名ASCII码从小到大排序(字典序);<br/><br/>
+◆ 如果参数的值为空不参与签名;<br/><br/>
+◆ 参数名区分大小写;<br/><br/>
+◆ 验证调用返回或系统主动通知签名时,传送的sign参数不参与签名,将生成的签名与该sign值作校验。<br/><br/>
+
+<p><strong>第二步:</strong>在stringA最后拼接上key得到stringSignTemp字符串,并对stringSignTemp进行MD5运算,再将得到的字符串所有字符转换为大写,得到sign值signValue。  </p>
+
+<p>如请求系统参数如下:</p>
+
+<table width='100%' class='codestyle'><pre><code>    Map signMap = new HashMap<>();
+    signMap.put("appId", "test01");
+    signMap.put("mobile", "18698798721");
+    signMap.put("productNo", '2110000050000');
+    signMap.put("amount", 50);
+    signMap.put("orderNo", "12345");
+    signMap.put("notifyUrl", "xxxxxx");
+</code></pre></table>
+
+<p><code>待签名值</code>:amount=50&appId=test01&mobile=18698798721&<span>notifyUrl</span>=xxxxxx&orderNo=12345&productNo=2110000050000&key=EWEFD123RGSRETYDFNGFGFGSHDFGH</p><br/>
+<code>签名结果</code>:7864F84DE809CE3FA0C080FB516FD991<br/>
+
+##### 备注 
+appId 和 key请到代理商户后台 “账户管理 - 账户信息” 中查看</div><h1>2、充值提交</h1><div style="margin-left:20px;"><h5>简要描述</h5>
+<ul>
+<li>话费入单接口,接收话费商推送过来的话单。</li>
+</ul>
+<h5>请求URL</h5>
+<ul>
+<li><code>http://xx.com/gateway/recharge</code></li>
+</ul>
+<h5>请求方式</h5>
+<ul>
+<li>POST </li>
+</ul>
+<h5>参数</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">必选</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">appId</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>appId,可后台查看</td>
+</tr>
+<tr>
+<td style="text-align: left;">mobile</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>长度11</td>
+</tr>
+<tr>
+<td style="text-align: left;">productNo</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>具体值看下面商品NO</td>
+</tr>
+<tr>
+<td style="text-align: left;">amount</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>金额元</td>
+</tr>
+<tr>
+<td style="text-align: left;">orderNo</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>订单号,长度最大30位</td>
+</tr>
+<tr>
+<td style="text-align: left;">notifyUrl</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>异步通知地址,长度最大300位</td>
+</tr>
+<tr>
+<td style="text-align: left;">sign</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>见签名规则</td>
+</tr>
+</tbody>
+</table>
+<h5>返回示例</h5>
+<table width='100%' class='codestyle'><pre><code>{
+    "code": 200,
+    "msg": "",
+    "data": {
+        "moblie": "18676709241",
+        "orderNo": "22222222222",
+        "tradeNo": "2020092817541471344"
+    }
+}</code></pre></table>
+<h5>返回参数说明</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">code</td>
+<td style="text-align: left;">int</td>
+<td>返回码</td>
+</tr>
+<tr>
+<td style="text-align: left;">msg</td>
+<td style="text-align: left;">String</td>
+<td>返回信息</td>
+</tr>
+<tr>
+<td style="text-align: left;">data</td>
+<td style="text-align: left;">json</td>
+<td>成功返回数据</td>
+</tr>
+<tr>
+<td style="text-align: left;">moblie</td>
+<td style="text-align: left;">String</td>
+<td>手机号码</td>
+</tr>
+<tr>
+<td style="text-align: left;">orderNo</td>
+<td style="text-align: left;">String</td>
+<td>商户订单号</td>
+</tr>
+<tr>
+<td style="text-align: left;">tradeNo</td>
+<td style="text-align: left;">String</td>
+<td>交易订单号</td>
+</tr>
+</tbody>
+</table>
+<h5>商品NO说明</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">商品编号</th>
+<th>商品名称</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">23100000200101</td>
+<td>全国联通200话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">23100000100101</td>
+<td>全国联通100话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">2310000050101</td>
+<td>全国联通50话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">22100000200101</td>
+<td>全国电信200话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">22100000100101</td>
+<td>全国电信100话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">2210000050101</td>
+<td>全国电信50话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">21100000200101</td>
+<td>全国移动200话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">2110000050000</td>
+<td>全国移动50话费</td>
+</tr>
+<tr>
+<td style="text-align: left;">21100000100000</td>
+<td>全国移动100元话费</td>
+</tr>
+</tbody>
+</table>
+<h5>备注</h5>
+<ul>
+<li>返回码code
+200 提交成功
+其他 提交失败</li>
+</ul>
+<h5>错误码表</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">code</th>
+<th>msg</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">200</td>
+<td>OK</td>
+</tr>
+<tr>
+<td style="text-align: left;">999</td>
+<td>异常</td>
+</tr>
+<tr>
+<td style="text-align: left;">100</td>
+<td>sign不正确</td>
+</tr>
+<tr>
+<td style="text-align: left;">101</td>
+<td>请求ip不在白名单</td>
+</tr>
+<tr>
+<td style="text-align: left;">110</td>
+<td>参数异常</td>
+</tr>
+<tr>
+<td style="text-align: left;">120</td>
+<td>商品不存在</td>
+</tr>
+<tr>
+<td style="text-align: left;">121</td>
+<td>充值金额和商品编号不对应</td>
+</tr>
+<tr>
+<td style="text-align: left;">130</td>
+<td>商户appId错误</td>
+</tr>
+<tr>
+<td style="text-align: left;">131</td>
+<td>商户被冻结</td>
+</tr>
+<tr>
+<td style="text-align: left;">132</td>
+<td>商户被注销</td>
+</tr>
+<tr>
+<td style="text-align: left;">140</td>
+<td>平台维护中</td>
+</tr>
+<tr>
+<td style="text-align: left;">144</td>
+<td>产品运营商和号码不匹配</td>
+</tr>
+<tr>
+<td style="text-align: left;">141</td>
+<td>省份维护中</td>
+</tr>
+<tr>
+<td style="text-align: left;">142</td>
+<td>运营商维护中</td>
+</tr>
+<tr>
+<td style="text-align: left;">143</td>
+<td>号码黑名单中</td>
+</tr>
+<tr>
+<td style="text-align: left;">144</td>
+<td>号码提交太频繁</td>
+</tr>
+<tr>
+<td style="text-align: left;">145</td>
+<td>号码信息获取失败</td>
+</tr>
+<tr>
+<td style="text-align: left;">150</td>
+<td>订单已经存在</td>
+</tr>
+<tr>
+<td style="text-align: left;">151</td>
+<td>订单不存在</td>
+</tr>
+<tr>
+<td style="text-align: left;">160</td>
+<td>账户被冻结</td>
+</tr>
+<tr>
+<td style="text-align: left;">161</td>
+<td>账户异常</td>
+</tr>
+<tr>
+<td style="text-align: left;">162</td>
+<td>账户余额不足</td>
+</tr>
+<tr>
+<td style="text-align: left;">163</td>
+<td>未知交易类型</td>
+</tr>
+<tr>
+<td style="text-align: left;">164</td>
+<td>支付其他错误</td>
+</tr>
+<tr>
+<td style="text-align: left;">165</td>
+<td>账户不存在</td>
+</tr>
+<tr>
+<td style="text-align: left;">170</td>
+<td>商品没设置供货商</td>
+</tr>
+<tr>
+<td style="text-align: left;">171</td>
+<td>找不到合适的供货商</td>
+</tr>
+<tr>
+<td style="text-align: left;">172</td>
+<td>没有供货商接口</td>
+</tr>
+<tr>
+<td style="text-align: left;">173</td>
+<td>供货繁忙</td>
+</tr>
+</tbody>
+</table></div><h1>3、异步通知结果</h1><div style="margin-left:20px;"><h5>简要描述</h5>
+<ul>
+<li>异步通知结果</li>
+</ul>
+<h5>请求URL</h5>
+<ul>
+<li><code>充值提交的通知地址,需加白的,请咨询我方相关人员提供IP</code></li>
+</ul>
+<h5>请求方式</h5>
+<ul>
+<li>POST
+content-type  : application/json
+<h5>参数</h5></li>
+</ul>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">必选</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">tradeNo</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>平台交易订单号</td>
+</tr>
+<tr>
+<td style="text-align: left;">orderNo</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>代理商户订单号</td>
+</tr>
+<tr>
+<td style="text-align: left;">orderStatus</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">int</td>
+<td>1:处理中,2:成功,3:失败,9:未确认</td>
+</tr>
+<tr>
+<td style="text-align: left;">amount</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">int</td>
+<td>充值金额,单位元</td>
+</tr>
+<tr>
+<td style="text-align: left;">mobile</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>手机号</td>
+</tr>
+<tr>
+<td style="text-align: left;">carrierOrderNo</td>
+<td style="text-align: left;">否</td>
+<td style="text-align: left;">string</td>
+<td>运营商流水号</td>
+</tr>
+<tr>
+<td style="text-align: left;">sign</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>见签名规则</td>
+</tr>
+</tbody>
+</table>
+<h5>返回示例</h5>
+<table width='100%' class='codestyle'><pre><code>  {
+      "tradeNo": "123",
+      "orderNo": "12154545",
+      "orderStatus": 2,
+      "amont": 20 ,
+      "mobile": "1436864169",
+      "carrierOrderNo": "1008634343242343434",
+      "sign":"-----"
+    }</code></pre></table>
+<h5>备注</h5>
+<ul>
+<li>收到请求,需返回<strong>小写</strong>字符: success</li>
+</ul></div><h1>4、订单查询</h1><div style="margin-left:20px;"><h5>简要描述</h5>
+<ul>
+<li>订单查询</li>
+</ul>
+<h5>请求URL</h5>
+<ul>
+<li><code>http://xx.com/gateway/recharge/order</code></li>
+</ul>
+<h5>请求方式</h5>
+<ul>
+<li>POST  application/x-www-form-urlencoded</li>
+</ul>
+<h5>参数</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">必选</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">appId</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>用户名</td>
+</tr>
+<tr>
+<td style="text-align: left;">tradeNo</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>平台交易号</td>
+</tr>
+<tr>
+<td style="text-align: left;">sign</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>签名</td>
+</tr>
+</tbody>
+</table>
+<h5>返回参数说明</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">code</td>
+<td style="text-align: left;">int</td>
+<td>200查询成功,其他查询失败</td>
+</tr>
+<tr>
+<td style="text-align: left;">msg</td>
+<td style="text-align: left;">string</td>
+<td>描述信息</td>
+</tr>
+<tr>
+<td style="text-align: left;">data</td>
+<td style="text-align: left;">json</td>
+<td>成功返回信息</td>
+</tr>
+<tr>
+<td style="text-align: left;">orderNo</td>
+<td style="text-align: left;">string</td>
+<td>商户订单号</td>
+</tr>
+<tr>
+<td style="text-align: left;">tradeNo</td>
+<td style="text-align: left;">string</td>
+<td>平台交易号</td>
+</tr>
+<tr>
+<td style="text-align: left;">productNo</td>
+<td style="text-align: left;">string</td>
+<td>商品编号</td>
+</tr>
+<tr>
+<td style="text-align: left;">orderStatus</td>
+<td style="text-align: left;">int</td>
+<td>1:处理中,2:成功,3:失败,9:未确认</td>
+</tr>
+<tr>
+<td style="text-align: left;">moblie</td>
+<td style="text-align: left;">string</td>
+<td>手机号</td>
+</tr>
+<tr>
+<td style="text-align: left;">facePrice</td>
+<td style="text-align: left;">string</td>
+<td>订单面值(元)</td>
+</tr>
+<tr>
+<td style="text-align: left;">carrierOrderNo</td>
+<td style="text-align: left;">string</td>
+<td>运营商流水号</td>
+</tr>
+</tbody>
+</table>
+<h5>返回示例</h5>
+<table width='100%' class='codestyle'><pre><code>{
+    "code": 200,
+    "msg": "OK",
+    "data": {
+        "orderNo": "22222222233",
+        "tradeNo": "2020111013362583735",
+        "productNo": "2110000050000",
+        "orderStatus": 3,
+        "moblie": "13670074035",
+        "facePrice": "50"
+    }
+}</code></pre></table></div><h1>5、余额查询</h1><div style="margin-left:20px;"><h5>简要描述</h5>
+<ul>
+<li>查询余额</li>
+</ul>
+<h5>请求URL</h5>
+<ul>
+<li><code>http://xx.com/gateway/balance/query</code></li>
+</ul>
+<h5>请求方式</h5>
+<ul>
+<li>POST  application/x-www-form-urlencoded</li>
+</ul>
+<h5>参数</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">必选</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">appId</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>用户名</td>
+</tr>
+<tr>
+<td style="text-align: left;">sign</td>
+<td style="text-align: left;">是</td>
+<td style="text-align: left;">string</td>
+<td>签名</td>
+</tr>
+</tbody>
+</table>
+<h5>返回参数说明</h5>
+<table>
+<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
+<th style="text-align: left;">参数名</th>
+<th style="text-align: left;">类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">code</td>
+<td style="text-align: left;">int</td>
+<td>200查询成功,其他查询失败</td>
+</tr>
+<tr>
+<td style="text-align: left;">msg</td>
+<td style="text-align: left;">string</td>
+<td>描述信息</td>
+</tr>
+<tr>
+<td style="text-align: left;">data</td>
+<td style="text-align: left;">json</td>
+<td>成功返回信息</td>
+</tr>
+<tr>
+<td style="text-align: left;">totalBalance</td>
+<td style="text-align: left;">string</td>
+<td>余额(元)</td>
+</tr>
+<tr>
+<td style="text-align: left;">credit</td>
+<td style="text-align: left;">string</td>
+<td>授信(元)</td>
+</tr>
+</tbody>
+</table>
+<h5>返回示例</h5>
+<table width='100%' class='codestyle'><pre><code>{
+    "code": 200,
+    "msg": "OK",
+    "data": {
+        "totalBalance": "-86.80",
+        "credit": "10.00"
+    }
+}</code></pre></table></div></body></html>

+ 50 - 0
helper/refill/api/yl/afd/RefillCallBack.php

@@ -0,0 +1,50 @@
+<?php
+namespace refill\afd;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afd/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        //有中文需要转码
+        if(preg_match('/[^\x00-\x80]/',$params['orderid'])){
+            $params['orderid'] =iconv("UTF-8","gb2312",$params['orderid']);
+        }
+        $content  = $params['merchantorderId'] . $params['platformorderid'] . $params['orderid'] . $params['rechargeno'] . $params['amount'];
+        $content .= $params['rechargestate'] . config::MER_ID;
+        return md5($content);
+    }
+
+    //[$order_id, $success, $can_try, $need_handle]
+    public function notify($params)
+    {
+        $status = intval($params['rechargestate']);
+        $order_sn = $params['merchantorderId'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        if ($status === 99) {
+            $data['official_sn'] = strtolower($params['orderid']) == 'null' ? '' : $params['orderid'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 3) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 110 - 0
helper/refill/api/yl/afd/RefillPhone.php

@@ -0,0 +1,110 @@
+<?php
+namespace refill\afd;
+
+require_once(BASE_HELPER_RAPI_PATH . '/afd/config.php');
+
+use refill;
+use Log;
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['merid'] = config::MER_ID;
+        $params['type'] = 'phone';
+        $params['rechargeno'] = $phone;
+        $params['amount'] = $amount;
+        $params['ts'] = $this->getMillisecond();
+        $params['callbackurl'] = config::NOTIFY_URL;
+        $params['orderid'] = $order_sn;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+        $resp = http_request(config::ORDER_URL, $params , 'POST' , false , [] ,$net_errno);
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] === '000') {
+                return [true, $resp['orderno'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['merid'] = config::MER_ID;
+        $params['merchantorderId'] = $refill_info['order_sn'];
+        $params['ts'] = $this->getMillisecond();
+        $content = $params['merid'] . $params['merchantorderId'] . $params['ts'] . config::KEY;
+        $params['sign'] = md5($content);
+        $resp = http_request(config::QUERY_URL, $params , 'POST' , false);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif($resp['code'] === '000')
+            {
+                if ($resp['rechargestate'] == 99) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $save['official_sn'] = $resp['orderid'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                } elseif ($resp['rechargestate'] == 3) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($resp['rechargestate'] , [98,2])) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['rechargestate']];
+                }
+                return [true, $order_state];
+            }
+            else {
+                return [false, $resp['code']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        return [false, '暂无余额接口'];
+    }
+
+    private function sign($params)
+    {
+        $content  = $params['amount'] . $params['callbackurl'] . $params['merid'] . $params['orderid'] . $params['rechargeno'] . $params['ts'] . $params['type'];
+        $content .= config::KEY;
+        return md5($content);
+    }
+
+    /**
+     * 获取毫秒级别的时间戳
+     */
+    private function getMillisecond()
+    {
+        $cur = microtime (true);
+        $cur = intval($cur * 1000);
+        return $cur;
+    }
+}

+ 12 - 0
helper/refill/api/yl/afd/config.php

@@ -0,0 +1,12 @@
+<?php
+namespace refill\afd;
+
+class config
+{
+    const ORDER_URL = 'http://117.24.13.19:7100/home/recharge';
+    const QUERY_URL = 'http://117.24.13.19:7100/home/query';
+
+    const MER_ID = '7012';
+    const KEY = 'bfbe95e2030191aa3ac89a5ae3848241';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_afd.php";
+}

+ 13 - 0
helper/refill/api/yl/afd/账号信息.txt

@@ -0,0 +1,13 @@
+
+登录地址:http://117.24.13.19:7999/
+登录账户:yezi001
+登录密码:yezi001
+用户编号7012
+
+接口地址:
+下单   http://117.24.13.19:7100/home/recharge
+查单   http://117.24.13.19:7100/home/query
+余额   http://117.24.13.19:7100/home/getbalance
+
+
+秘钥bfbe95e2030191aa3ac89a5ae3848241

BIN
helper/refill/api/yl/afd/阿凡灯系统接口文档.docx


+ 50 - 0
helper/refill/api/yl/api.php

@@ -0,0 +1,50 @@
+<?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');
+require_once(BASE_HELPER_RAPI_PATH . '/afandeng/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/afandeng/RefillCallBack.php');
+//require_once(BASE_HELPER_RAPI_PATH . '/tongy/RefillPhone.php');
+//require_once(BASE_HELPER_RAPI_PATH . '/tongy/RefillCallBack.php');

+ 40 - 0
helper/refill/api/yl/bailian/RefillCallBack.php

@@ -0,0 +1,40 @@
+<?php
+namespace refill\bailian;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bailian/config.php');
+use Log;
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = config::sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public function notify($params)
+    {
+        $status = $params['status'];
+        $order_sn = $params['orderId'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status === 'Success') {
+            Model('refill_order')->edit($order_id, ['official_sn' => $params['voucher']]);
+            return [$order_id, true, false, true];
+        } elseif ($status === 'Fail') {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 132 - 0
helper/refill/api/yl/bailian/RefillOil.php

@@ -0,0 +1,132 @@
+<?php
+
+namespace refill\bailian;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bailian/config.php');
+
+use refill;
+use Log;
+
+class RefillOil extends refill\IRefillOil
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['time'] = time();
+        $params['macid'] = config::MAC_ID;
+        $params['account'] = $phone;
+        $params['macpid'] = config::PRODUCT[$card_type][$amount];
+        $params['orderid'] = $order_sn;
+        $params['noticeurl'] = config::NOTIFY_URL;
+        $params['count'] = 1;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+        if(empty($params['macpid'])) {
+            return [false, '商品编号错误', false];
+        }
+        $sign = config::sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            $code = $resp['errCode'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($code === '0') {
+                return [true, $resp['orderId'], false];
+            } elseif (in_array($code, [5, 6], true)) {
+                $net_errno = "HTTP-{$code}";
+                return [false, '查-'.$resp['errInfo'], true];
+            } else {
+                return [false, $resp['errInfo'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['time'] = time();
+        $params['macid'] = config::MAC_ID;
+        $params['id'] = $refill_info['order_sn'];
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params, 'GET');
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            elseif ($resp['errCode'] === 0)
+            {
+                $status = $resp['orderStatus'];
+                if ($status === 1) {
+                    Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['voucher']]);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 2) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 3) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $status];
+                }
+
+                return [true, $order_state];
+            }
+            elseif ($resp['errCode'] === 4 && (time() - $refill_info['commit_time'] >= 600))
+            {
+                return [true, ORDER_STATE_NOEXIST];
+            }
+            else
+            {
+                return [false, $resp['errInfo']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['time'] = time();
+        $params['macid'] = config::MAC_ID;
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'GET');
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['errCode'] === 0) {
+                return [true, $resp['data']['balance']];
+            } else {
+                return [false, $resp['errInfo']];
+            }
+        }
+    }
+}

+ 48 - 0
helper/refill/api/yl/bailian/config.php

@@ -0,0 +1,48 @@
+<?php
+
+namespace refill\bailian;
+
+use mtopcard;
+
+class config
+{
+    const ORDER_URL = 'http://101.37.252.250/cg/api/Owned/Charge';
+    const QUERY_URL = 'http://101.37.252.250/cg/api/Owned/Query';
+    const BALANCE_URL = 'http://101.37.252.250/cg/api/MacInfo/Balance';
+
+    const MAC_ID = '1646476170480002';
+    const KEY = 'ffcb6768ad0a8b631acd29355a31b50d';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_bailian.php";
+    const PRODUCT = [
+        mtopcard\SinopecCard => [
+            500 => 100004,
+            1000 => 100005
+        ]
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    public static function sign($params)
+    {
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            if(self::check_empty($value) === false) {
+                $content .= "{$key}{$value}";
+            }
+        }
+        $content .= config::KEY;
+        return md5($content);
+    }
+
+    public static function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+}

+ 14 - 0
helper/refill/api/yl/bailian/开户信息.txt

@@ -0,0 +1,14 @@
+api地址
+下单接口:http://101.37.252.250/cg/api/Owned/Charge
+查询接口:http://101.37.252.250/cg/api/Owned/Query
+余额查询接口:http://101.37.252.250/cg/api/MacInfo/Balance
+
+
+工号:1646476170480002
+密钥:ffcb6768ad0a8b631acd29355a31b50d
+
+
+管理后台:
+http://101.37.252.250/cg/v/#/home
+账号:yezi
+密码:836296

+ 67 - 0
helper/refill/api/yl/baixuan/RefillCallBack.php

@@ -0,0 +1,67 @@
+<?php
+namespace refill\baixuan;
+
+require_once(BASE_HELPER_RAPI_PATH . '/baixuan/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $params['appSecret'] = config::APP_SECRET;
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            if($this->check_empty($value) === false) {
+                $content .= "{$key}={$value}&";
+            }
+        }
+        $content = rtrim($content, '&');
+        return md5($content);
+    }
+
+    private function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['orderStatus']);
+        $order_sn = $params['outOrderId'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status === 2) {
+            $data['official_sn'] = strtolower($params['ext1']) == 'null' ? '' : $params['ext1'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 3) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 155 - 0
helper/refill/api/yl/baixuan/RefillPhone.php

@@ -0,0 +1,155 @@
+<?php
+
+namespace refill\baixuan;
+
+require_once(BASE_HELPER_RAPI_PATH . '/baixuan/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['appId'] = config::APP_ID;
+        $params['outOrderId'] = $order_sn;
+        $params['uuid'] = $phone;
+        $params['itemId'] = config::PRODUCT[$card_type][$amount];
+        $params['itemFace'] = $amount;
+        $params['callbackUrl'] = config::NOTIFY_URL;
+        $params['timestamp'] = date("YmdHis").$this->get_millisecond();
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+        if(empty($params['itemId'])) {
+            return [false, '商品编号错误', false];
+        }
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($resp['code'] === '00') {
+                return [true, $resp['orderId'], false];
+            } elseif (in_array($resp['code'], config::ERRCODES, true)) {
+                return [false, $resp['msg'], false];
+            } elseif (in_array($resp['code'], ['-22', '-23', '-99'], true)) {
+                $net_errno = "HTTP-{$resp['code']}";
+                return [false, $resp['msg'], true];
+            } else {
+                $net_errno = "HTTP-998";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['appId'] = config::APP_ID;
+        $params['outOrderId'] = $refill_info['order_sn'];
+        $params['timestamp'] = date("YmdHis").$this->get_millisecond();
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            elseif ($resp['code'] === '00')
+            {
+                $status = $resp['orderStatus'];
+                if ($status === '2') {
+                    $updata['official_sn'] = $resp['ext1'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === '3') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === '1') {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($status === '4' && (time() - $refill_info['commit_time'] >= 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resp['msg']];
+                }
+                return [true, $order_state];
+            }
+            else
+            {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['appId'] = config::APP_ID;
+        $params['timestamp'] = date("YmdHis").$this->get_millisecond();
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['code'] === '00') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    /**
+     * 获取毫秒级别的时间戳
+     */
+    private function get_millisecond()
+    {
+        list($usec, $sec) = explode(" ", microtime());
+        return round($usec*1000);
+    }
+
+    private function sign($params)
+    {
+        $params['appSecret'] = config::APP_SECRET;
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            if($this->check_empty($value) === false) {
+                $content .= "{$key}={$value}&";
+            }
+        }
+        $content = rtrim($content, '&');
+        return md5($content);
+    }
+}

+ 44 - 0
helper/refill/api/yl/baixuan/config.php

@@ -0,0 +1,44 @@
+<?php
+
+
+namespace refill\baixuan;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://119.23.174.34:8911/api/hf/order/submit';
+    const QUERY_URL = 'http://119.23.174.34:8911/api/order/query';
+    const BALANCE_URL = 'http://119.23.174.34:8911/api/account/balance';
+
+    const APP_ID = 'Hs2pvfcPTK';
+    const APP_SECRET = 'WYUvuzPpFNnBfQZm';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_baixuan.php";
+    const PRODUCT = [
+        mtopcard\ChinaMobileCard => [
+            30  => 100067,
+            50  => 100025,
+            100 => 100026,
+            200 => 100027,
+            300 => 100028,
+            500 => 100029,
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30  => 100086,
+            50  => 100087,
+            100 => 100088,
+            200 => 100090,
+            300 => 100091,
+            500 => 100089,
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30  => 100062,
+            50  => 100022,
+            100 => 100023,
+            200 => 100024,
+            300 => 100084,
+            500 => 100085,
+        ],
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+    const ERRCODES = ['-10', '-12', '-13', '-14', '-15', '-16', '-18', '-21'];
+}

+ 20 - 0
helper/refill/api/yl/baixuan/商品编码.txt

@@ -0,0 +1,20 @@
+高价移动30          100067
+高价移动50          100025
+高价移动100         100026
+高价移动200         100027
+高价移动300         100028
+高价移动500         100029
+
+高价联通30          100086
+高价联通50          100087
+高价联通100         100088
+高价联通300         100090
+高价联通500         100091
+高价联通200         100089
+
+高价电信30          100062
+高价电信50          100022
+高价电信100         100023
+高价电信200         100024
+高价电信300         100084
+高价电信500         100085

+ 13 - 0
helper/refill/api/yl/baixuan/开户信息.txt

@@ -0,0 +1,13 @@
+后台地址:http://119.23.174.34:8888
+帐号:YZ02
+密码:717750
+二级密码:nKyQ2049
+appId:Hs2pvfcPTK
+appSecret:WYUvuzPpFNnBfQZm
+后台-商品列表,可查看已配置商品信息
+后台-安全中心,可配置IP白名单
+接口文档:https://www.showdoc.com.cn/1686453783298366/7925312871840290
+下单接口地址:http://119.23.174.34:8911/api/hf/order/submit
+查单接口地址:http://119.23.174.34:8911/api/order/query
+余额接口地址:http://119.23.174.34:8911/api/account/balance
+提卡接口地址:http://119.23.174.34:8911/api/card/get

+ 67 - 0
helper/refill/api/yl/baixuan_normal/RefillCallBack.php

@@ -0,0 +1,67 @@
+<?php
+namespace refill\baixuan_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/baixuan_normal/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $params['appSecret'] = config::APP_SECRET;
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            if($this->check_empty($value) === false) {
+                $content .= "{$key}={$value}&";
+            }
+        }
+        $content = rtrim($content, '&');
+        return md5($content);
+    }
+
+    private function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['orderStatus']);
+        $order_sn = $params['outOrderId'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status === 2) {
+            $data['official_sn'] = strtolower($params['ext1']) == 'null' ? '' : $params['ext1'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 3) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 155 - 0
helper/refill/api/yl/baixuan_normal/RefillPhone.php

@@ -0,0 +1,155 @@
+<?php
+
+namespace refill\baixuan_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/baixuan_normal/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['appId'] = config::APP_ID;
+        $params['outOrderId'] = $order_sn;
+        $params['uuid'] = $phone;
+        $params['itemId'] = config::PRODUCT[$card_type][$amount];
+        $params['itemFace'] = $amount;
+        $params['callbackUrl'] = config::NOTIFY_URL;
+        $params['timestamp'] = date("YmdHis").$this->get_millisecond();
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+        if(empty($params['itemId'])) {
+            return [false, '商品编号错误', false];
+        }
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($resp['code'] === '00') {
+                return [true, $resp['orderId'], false];
+            } elseif (in_array($resp['code'], config::ERRCODES, true)) {
+                return [false, $resp['msg'], false];
+            } elseif (in_array($resp['code'], ['-22', '-23', '-99'], true)) {
+                $net_errno = "HTTP-{$resp['code']}";
+                return [false, $resp['msg'], true];
+            } else {
+                $net_errno = "HTTP-998";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['appId'] = config::APP_ID;
+        $params['outOrderId'] = $refill_info['order_sn'];
+        $params['timestamp'] = date("YmdHis").$this->get_millisecond();
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            elseif ($resp['code'] === '00')
+            {
+                $status = $resp['orderStatus'];
+                if ($status === '2') {
+                    $updata['official_sn'] = $resp['ext1'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === '3') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === '1') {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($status === '4' && (time() - $refill_info['commit_time'] >= 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resp['msg']];
+                }
+                return [true, $order_state];
+            }
+            else
+            {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['appId'] = config::APP_ID;
+        $params['timestamp'] = date("YmdHis").$this->get_millisecond();
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['code'] === '00') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    /**
+     * 获取毫秒级别的时间戳
+     */
+    private function get_millisecond()
+    {
+        list($usec, $sec) = explode(" ", microtime());
+        return round($usec*1000);
+    }
+
+    private function sign($params)
+    {
+        $params['appSecret'] = config::APP_SECRET;
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            if($this->check_empty($value) === false) {
+                $content .= "{$key}={$value}&";
+            }
+        }
+        $content = rtrim($content, '&');
+        return md5($content);
+    }
+}

+ 40 - 0
helper/refill/api/yl/baixuan_normal/config.php

@@ -0,0 +1,40 @@
+<?php
+
+
+namespace refill\baixuan_normal;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://119.23.174.34:8911/api/hf/order/submit';
+    const QUERY_URL = 'http://119.23.174.34:8911/api/order/query';
+    const BALANCE_URL = 'http://119.23.174.34:8911/api/account/balance';
+
+    const APP_ID = 'ntzRlj2kNV';
+    const APP_SECRET = 'HgQoSMSvolLaMZWV';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_baixuan_normal.php";
+    const PRODUCT = [
+        mtopcard\ChinaMobileCard => [
+            30  => 100067,
+            50  => 100025,
+            100 => 100026,
+            200 => 100027,
+            300 => 100028,
+            500 => 100029
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30  => 100011,
+            50  => 100012,
+            100 => 100013,
+            200 => 100014
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30  => 100015,
+            50  => 100016,
+            100 => 100017,
+            200 => 100018
+        ],
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+    const ERRCODES = ['-10', '-12', '-13', '-14', '-15', '-16', '-18', '-21'];
+}

+ 16 - 0
helper/refill/api/yl/baixuan_normal/商品编码.txt

@@ -0,0 +1,16 @@
+高价移动30         100067
+高价移动50         100025
+高价移动100        100026
+高价移动200        100027
+高价移动300        100028
+高价移动500        100029
+
+联通30          100011
+联通50          100012
+联通100         100013
+联通200         100014
+
+电信30          100015
+电信50          100016
+电信100         100017
+电信200         100018

+ 0 - 0
helper/refill/api/yl/baixuan_normal/开户信息.txt


Some files were not shown because too many files changed in this diff