Browse Source

Merge branch 'raccount' into rchannel

xiaoyu 3 năm trước cách đây
mục cha
commit
98ddab7e43

+ 6 - 2
admin/control/refill_detail.php

@@ -155,8 +155,8 @@ class refill_detailControl extends SystemControl
             $mch_order = $detail['mch_order'];
             Log::record("mchid: {$mchid} , mch_order: {$mch_order}", Log::DEBUG);
 
-            $refill_order = $mod_refill->getOrderInfo(['mchid' => $mchid,'mch_order' => $mch_order]);
-            if (empty($refill_order))
+            $refill_orders = $mod_refill->getOrderInfos(['mchid' => $mchid,'mch_order' => $mch_order]);
+            if (empty($refill_orders))
             {
                 Log::record("order dispose type:{$type}, params:{$detail['params']}",Log::DEBUG);
                 $params = json_decode($detail['params'],true);
@@ -178,6 +178,10 @@ class refill_detailControl extends SystemControl
                 }
             }
             else {
+                $refill_order = $mod_refill->getOrderInfo(['mchid' => $mchid,'mch_order' => $mch_order,'inner_status' => 0]);
+                if(!empty($refill_order)) {
+                    QueueClient::push("NotifyMerchantComplete", ['order_id' => $refill_order['order_id'], 'manual' => true]);
+                }
                 util::pop_queue_order($mchid,$mch_order);
             }
         }

+ 15 - 19
data/config/xyz/refill.ini.php

@@ -2572,8 +2572,8 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
 
         10 => [
             ['goods_id' => 7060, 'price' => 10.46, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7060, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7060, 'price' => 10.22, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7060, 'price' => 10.04, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7060, 'price' => 10.17, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 7061, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinamobile'],
@@ -5159,43 +5159,39 @@ $huazhong_phone = ['name' => 'huazhong', 'store_id' => 204, 'qualitys' => '1',
     'amount' => [
 //        10 => [
 //            ['goods_id' => 7714, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7714, 'price' => 9.42, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7714, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7714, 'price' => 9.48, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        20 => [
 //            ['goods_id' => 7715, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7715, 'price' => 18.84, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7715, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinatelecom']
+//            ['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.26, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7716, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7716, 'price' => 28.65, '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.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7717, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom'],
+            ['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' => 94.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7718, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['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' => 188.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7719, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7719, 'price' => 187.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7719, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        300 => [
 //            ['goods_id' => 7720, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7720, 'price' => 282.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7720, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7720, 'price' => 284.4, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        500 => [
 //            ['goods_id' => 7721, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 7721, 'price' => 471, 'quality' => 1, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7721, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7721, 'price' => 474, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 9 - 0
data/model/refill_order.model.php

@@ -18,6 +18,15 @@ class refill_orderModel extends Model
         return $order_info;
     }
 
+    public function getOrderInfos($condition = [], $fields = '*', $master = false, $lock = false)
+    {
+        $order_info = $this->table('refill_order')->field($fields)->where($condition)->order('')->master($master)->lock($lock)->select();
+        if (empty($order_info)) {
+            return [];
+        }
+        return $order_info;
+    }
+
     public function add_refill($params)
     {
         return $this->table('refill_order')->insert($params);

BIN
helper/refill/api/xyz/guochuang/20220314辽宁移动调价函.jpg


+ 1 - 1
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.74, "4-20-6" => 19.48, "4-30-6" => 29.22, "4-50-6" => 48.7, "4-100-6" => 97.4, "4-200-6" => 194.8, "4-300-6" => 292.2, "4-500-6" => 487,//辽宁 6
+        "4-10-6" => 9.76, "4-20-6" => 19.52, "4-30-6" => 29.28, "4-50-6" => 48.8, "4-100-6" => 97.6, "4-200-6" => 195.2, "4-300-6" => 292.8, "4-500-6" => 488,//辽宁 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" => 9.945, "4-20-8" => 19.89, "4-30-8" => 29.835, "4-50-8" => 49.725, "4-100-8" => 99.45, "4-200-8" => 198.9, "4-300-8" => 298.35, "4-500-8" => 497.25 ,//黑龙江 8
         "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

+ 8 - 0
helper/refill/api/xyz/huazhong/config.php

@@ -26,10 +26,18 @@ class config
     const ProductIdS = [
         mtopcard\ChinaMobileCard =>
             [
+                30 => '101687',
                 50 => '101688',
                 100 => '101689',
                 200 => '101690',
             ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                30 => '101705',
+                50 => '101706',
+                100 => '101707',
+                200 => '101708',
+            ],
         mtopcard\ChinaTelecomCard =>
             [
                 30 => '101723',

+ 10 - 1
helper/refill/api/xyz/huazhong/对接文档-yezi.txt

@@ -17,4 +17,13 @@ api接口文档地址:https://www.showdoc.com.cn/AQL666666/
  30面值   101723
  50面值   101724
 100面值   101725
-200面值   101726
+200面值   101726
+
+2022.3.15 增加移动30
+101687	全国移动话费30元直充
+
+2022.3.15 增加联通编码
+101705	全国联通话费30元直充
+101706	全国联通话费50元直充
+101707	全国联通话费100元直充
+101708	全国联通话费200元直充

+ 4 - 2
util/purge.sh

@@ -60,8 +60,10 @@ function slave_behind_match() {
 }
 
 #master = '172.26.80.10'
-slave_hosts=(172.26.80.8 172.26.80.6)
-allhosts=(172.26.80.10 172.26.80.8 172.26.80.6)
+slave_hosts=(${XYZ_SLAVE_HOSTS//:/ })
+#(172.26.80.8 172.26.80.6)
+allhosts=(${XYZ_ALL_HOSTS//:/ })
+#(172.26.80.10 172.26.80.8 172.26.80.6)
 
 # shellcheck disable=SC2068
 for host in ${slave_hosts[@]}

+ 15 - 3
util/shtest/var.sh

@@ -1,7 +1,19 @@
 #!/bin/bash
 
 
-slave_hosts=$XYZ_SLAVE_HOSTS
-echo $slave_hosts
+#slave_hosts=$XYZ_SLAVE_HOSTS
+#echo $slave_hosts
 
-vdb=$(df -h | grep /dev/vdb1 | awk 'BEGIN{OFS=","}{print $1,$2,$3,$4}')
+slave_hosts=(${XYZ_SLAVE_HOSTS//:/ })
+# shellcheck disable=SC2068
+echo ${slave_hosts[@]}
+
+# shellcheck disable=SC2068
+for host in ${slave_hosts[@]}
+do
+  echo $host
+done
+
+XYZ_NETIP=''
+XYZ_MONITOR_DU_DIR=/mnt/shoplog:/mnt/mysql/xyzshop:/data/mysqlundo
+XYZ_MONITOR_DF_DIR=/dev/vda1:/dev/vdb1:/dev/vdc1