Kaynağa Gözat

qianqian yd 953

haru haru 3 yıl önce
ebeveyn
işleme
787f240e92

+ 4 - 4
data/config/win/refill.ini.php

@@ -871,19 +871,19 @@ $qianqian_phone = ['name' => 'qianqian', 'store_id' => 48, 'qualitys' => '1',
 //            ['goods_id' => 74, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
 //        ],
         30 => [
-            ['goods_id' => 6529, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6529, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6529, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6530, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6530, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6530, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6531, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6531, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6531, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6532, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6532, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6532, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],

+ 4 - 4
data/config/xyz/refill.ini.php

@@ -871,19 +871,19 @@ $qianqian_phone = ['name' => 'qianqian', 'store_id' => 48, 'qualitys' => '1',
 //            ['goods_id' => 74, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
 //        ],
         30 => [
-            ['goods_id' => 6529, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6529, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6529, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6530, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6530, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6530, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6531, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6531, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6531, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6532, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6532, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6532, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],

+ 4 - 4
data/config/xyzadm/refill.ini.php

@@ -871,19 +871,19 @@ $qianqian_phone = ['name' => 'qianqian', 'store_id' => 48, 'qualitys' => '1',
 //            ['goods_id' => 74, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
 //        ],
         30 => [
-            ['goods_id' => 6529, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6529, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6529, 'price' => 28.44, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6530, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6530, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6530, 'price' => 47.4, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6531, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6531, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6531, 'price' => 94.8, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6532, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6532, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6532, 'price' => 189.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],

+ 24 - 16
mchsrv/control/merchant_order.php

@@ -14,6 +14,7 @@ class merchant_orderControl extends mbMerchantControl
 
         $cond['mchid'] = $this->mchid();
         $cond['inner_status'] = 0;
+        $fSingle = false;
         if (!empty($_GET['card_type'])) {
             if(in_array($_GET['card_type'] , ['1' , '2' , '4' , '5' , '6'])) {
                 $cond['refill_order.card_type'] = $_GET['card_type'];
@@ -26,38 +27,45 @@ class merchant_orderControl extends mbMerchantControl
             }
         }
         if (!empty($_GET['card_no'])) {
+            $fSingle = true;
             $cond['refill_order.card_no'] = $_GET['card_no'];
         }
         if (!empty($_GET['refill_amount'])) {
             $cond['refill_order.refill_amount'] = $_GET['refill_amount'];
         }
         if (!empty($_GET['mch_order'])) {
+            $fSingle = true;
             $cond['refill_order.mch_order'] = $_GET['mch_order'];
         }
         if (!empty($_GET['order_sn'])) {
+            $fSingle = true;
             $cond['refill_order.order_sn'] = $_GET['order_sn'];
         }
         if (!empty($_GET['quality'])) {
             $cond['refill_order.quality'] = $_GET['quality'];
         }
+        $start = time() - 3600;
+        $cond['refill_order.order_time'] = ['egt', $start];
 
-        $start_unixtime = intval($_GET['start_time']);
-        $end_unixtime = intval($_GET['end_time']);
+        if($fSingle) {
+            $start_unixtime = intval($_GET['start_time']);
+            $end_unixtime = intval($_GET['end_time']);
 
-        if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
-            $cond['refill_order.order_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
-        } elseif ($start_unixtime > 0) {
-            $cond['refill_order.order_time'] = ['egt', $start_unixtime];
-        } elseif ($end_unixtime > 0) {
-            $cond['refill_order.order_time'] = ['lt', $end_unixtime];
-        } else {
-            $start = strtotime(date('Y-m-d', time()));
-            $cond['refill_order.order_time'] = ['egt', $start];
-        }
-        if (in_array($_GET['order_state'], array('0', '30', '40'))) {
-            $cond['vr_order.order_state'] = $_GET['order_state'];
-            if($_GET['order_state'] == 30 && $_GET['time'] == 1){
-                $cond['refill_order.order_time'] = ['lt', (time() - 3600)];
+            if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
+                $cond['refill_order.order_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
+            } elseif ($start_unixtime > 0) {
+                $cond['refill_order.order_time'] = ['egt', $start_unixtime];
+            } elseif ($end_unixtime > 0) {
+                $cond['refill_order.order_time'] = ['lt', $end_unixtime];
+            } else {
+                $start = time() - 3600;
+                $cond['refill_order.order_time'] = ['egt', $start];
+            }
+            if (in_array($_GET['order_state'], array('0', '30', '40'))) {
+                $cond['vr_order.order_state'] = $_GET['order_state'];
+                if($_GET['order_state'] == 30 && $_GET['time'] == 1){
+                    $cond['refill_order.order_time'] = ['lt', (time() - 3600)];
+                }
             }
         }
 

+ 1 - 1
test/TestRefill.php

@@ -840,7 +840,7 @@ class TestRefill extends TestCase
 //        ]);
 //        $resp = $providers->query(['order_sn' => '80881630650784871094']);
 
-        $body = '{"code":"000","merchantorderId":"80881630650784871094","platformorderid":"aa8be6029895c6506a4672949","orderid":"523377195044165750","rechargeno":"13699279618","amount":"200.00","payamount":"191.00000","rechargestate":"99","createtime":"2021-09-03 14:35:14","sign":"bdba631ffdb7b799caa73ff70ac507b5"}';
+        $body = '{"code":"000","merchantorderId":"1854680684077057846998","platformorderid":"aada9b09583f66b2b83370016","orderid":"","rechargeno":"15971954673","amount":"50.00","payamount":"47.75000","rechargestate":"3","createtime":"2021-09-04 13:26:20","sign":"07b8a341c55639d3512a239f9cd07e31"}';
         $params = json_decode($body, true);
         $providers = $this->getProvider('xianzhibb','RefillCallBack');
         $ret = $providers->verify($params);

+ 2 - 2
test/TestRefillThird.php

@@ -36,8 +36,8 @@ class TestRefillThird extends TestCase
             'order_sn' => $this->make_sn(),
             'notifyurl' => 'https://www.xyzshops.cn/mobile/signature.php',
             'card_type' => 1,
-            'cardno' => '15136908757',
-            'product_code' => 'XYZ100019',
+            'cardno' => '2423503330',
+            'product_code' => 'XYZ100024',
             'quantity' => 1
         ];