Browse Source

admin update

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

+ 1 - 2
admin/control/ordersendlist.php

@@ -212,7 +212,6 @@ class ordersendlistControl extends SystemControl
 
     public function notifyerr_all_notifyOp()
     {
-        var_dump($_GET);die;
         if(empty($_GET['time']) || empty($_GET['notify_time'])) {
             showMessage('日期条件错误');
         }
@@ -232,7 +231,7 @@ class ordersendlistControl extends SystemControl
         $order_list = $model_refill_order->getMerchantOrderList($condition, '', 'refill_order.*,vr_order.order_state', 'refill_order.notify_time asc', 1000);
 
         foreach ($order_list as $order) {
-//            QueueClient::push("NotifyMerchantComplete", ['order_id' => $order['order_id'], 'manual' => true]);
+            QueueClient::push("NotifyMerchantComplete", ['order_id' => $order['order_id'], 'manual' => true]);
         }
         showMessage('操作成功');
     }

+ 17 - 0
admin/templates/default/refill.order.index.php

@@ -307,6 +307,23 @@
             </tbody>
         </table>
     </form>
+    <table class="table tb-type2" id="prompt" style="min-width:1400px">
+        <tbody>
+        <tr class="space odd">
+            <th colspan="12"><div class="title"><h5>
+                        队列任务统计</h5><span class="arrow"></span></div></th>
+        </tr>
+        <tr>
+            <td>
+                <ul>
+                    <li>
+                        队列任务个数:
+                    </li>
+                </ul>
+            </td>
+        </tr>
+        </tbody>
+    </table>
     <?php if($_GET['fShowStat'] == 1){?>
         <table class="table tb-type2" id="prompt" style="min-width:1400px">
             <tbody>

+ 35 - 2
admin/templates/default/refill.order.notify.err.index.php

@@ -69,7 +69,7 @@
             <tr>
                 <th><label class="lefto">近期时间(小时内)</label></th>
                 <td  class="layui-form">
-                    <select name="time" class="querySelect" lay-verify="" lay-search>
+                    <select name="time" class="querySelect" id="time_id"  lay-verify="" lay-search lay-filter="time_id">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <?php for ($i = 1; $i<=12; $i++) { ?>
                             <option value="<?php echo $i; ?>" <?php if ($_GET['time'] == $i){ ?>selected<?php } ?>><?php echo $i;?>小时
@@ -79,7 +79,7 @@
                 </td>
                 <th>回调时间</th>
                 <td>
-                    <select name="notify_time" class="querySelect">
+                    <select name="notify_time" class="querySelect" id="arrangeClass">
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <option value="1"
                                 <?php if ($_GET['notify_time'] == '1'){ ?>selected<?php } ?>>1秒</option>
@@ -111,6 +111,9 @@
                     <a href="#" class="btns" onclick="hCopyCardNo(event)">
                         <span><i class="icon-edit"></i>拷贝充值卡号</span>
                     </a>
+                    <a href="#" id="btn_time" class="btns">
+                        <span><i class="icon-edit"></i>批量回调</span>
+                    </a>
                 </td>
             </tr>
         </table>
@@ -227,6 +230,36 @@
             elem: '#endTime',
             type: 'datetime'
         });
+     
+        //批量回调
+        $('#btn_time').click(() => {
+            let time1 = $("#time_id option:selected").val()
+            let time2 = $("#arrangeClass option:selected").val()
+          console.log(time1, time2);
+          window.location.href =`index.php?act=OrderSendList&op=notifyerr_all_notify&time= ${time1 ? time1 : ''} &notify_time= ${time2 ? time2 : ''}`
+         
+        })
+        layui.use(['form'], function(){
+            var form = layui.form;
+            form.on('select(time_id)', function (data) {
+                const time3 = data.value;
+                console.log(time3);
+                form.render('select')
+
+                $("select[name='notify_time']").blur(function(){
+                const time4 = $(this).val()
+				console.log(time4)
+                $('#btn_time').click(() =>{
+                console.log(time3, time4);
+                window.location.href = `index.php?act=OrderSendList&op=notifyerr_all_notify&time= ${time3} &notify_time= ${time4}`
+
+
+                })
+			});
+            })
+        })
+    
+      
         let isWring = '<?php echo $output['count'][1];?>';
         // console.log('isWring', Number(isWring));
         let setTimer

+ 7 - 6
test/TestRefill.php

@@ -1268,12 +1268,13 @@ class TestRefill extends TestCase
     public function testcreateSign()
     {
         $params['act'] = 'refill';
-        $params['amount'] = '100';
-        $params['cardno'] = '11100';
-        $params['mchid'] = '10152';
-        $params['notifyurl'] = 'http://122.114.168.35/gateway/api.notify/call?s_order=D20210623163820797539530&s_type=1';
+        $params['amount'] = '30';
+        $params['cardno'] = '18500972879';
+        $params['mchid'] = '10175';
+        $params['notifyurl'] = 'https://su.emgot.com/union/coco/rechargeNotify';
         $params['op'] = 'add';
-        $params['order_sn'] = 'D20210623163820797539530';
+        $params['order_sn'] = '20210706125001412243513';
+        $params['quality'] = 7;
         $sign = $this->md5_sign($params);
     }
 
@@ -1327,7 +1328,7 @@ class TestRefill extends TestCase
             }
         }
 
-        $body .= "&key=NNLUOn14tNBeG7JJRGoPDKEO6Ocdt89G";
+        $body .= "&key=BcuXVAbW3KstGRWh6EdMMoFIfq9XKUW0";
 
         return md5($body);
     }