Browse Source

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

stanley-king 2 years atrás
parent
commit
8de5632e06

+ 9 - 0
admin/control/merchant.php

@@ -37,6 +37,8 @@ class merchantControl extends SystemControl
         $available_total = 0;
         $merchant_list = $model_merchant->getMerchantList($condition, 200, 'available_predeposit desc,merchant_state asc,mchid desc', true);
         $refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_merchant]);
+
+        $merchant_debts = rcache("merchant-debts-detail", 'refill-');
         foreach ($merchant_list as $key => $merchant) {
             $mchid = $merchant['mchid'];
             $available_predeposit = $merchant['available_predeposit'] - $merchant['credit_bonus'];
@@ -50,6 +52,13 @@ class merchantControl extends SystemControl
                     $debt_total += $available_predeposit;
                 }
             }
+
+            if (array_key_exists($mchid, $merchant_debts)) {
+                $debt_detail = unserialize($merchant_debts[$mchid]);
+                $merchant_list[$key]['debt'] = $debt_detail;
+            } else {
+                $merchant_list[$key]['debt'] = ['debt' => 0, 'send_amounts' => 0, 'lack_amounts' => 0];
+            }
         }
         $stats = ['available_total' => $available_total, 'debt_total' => $debt_total];
 

+ 15 - 3
admin/control/refill_company.php

@@ -15,12 +15,24 @@ class refill_companyControl extends SystemControl
             $cond['co_name'] = ['like', '%'.$_GET['co_name'].'%'];
         }
         if(!empty($_GET['co_type'])) {
-            $cond['params'] = $_GET['co_type'];
+            $cond['co_type'] = $_GET['co_type'];
         }
         if(!empty($_GET['opened'])) {
             $cond['opened'] = $_GET['opened'];
         }
-        $list = $company_mod->getCompanyList($cond);
+        $list = $company_mod->getCompanyList($cond, 50);
+
+        $company_debts = rcache("company-debts", 'refill-');
+
+        foreach ($list as $key => $value)
+        {
+            $co_id = $value['co_id'];
+            if(array_key_exists($co_id, $company_debts)) {
+                $list[$key]['debt'] = number_format($company_debts[$co_id],2,'.','');
+            }else{
+                $list[$key]['debt'] = '/';
+            }
+        }
 
         Tpl::output('list', $list);
         Tpl::output('show_page', $company_mod->showpage());
@@ -187,7 +199,7 @@ class refill_companyControl extends SystemControl
         } elseif ($end_unixtime > 0) {
             $cond['add_time'] = ['lt', $end_unixtime];
         }
-        $list = $mod_remit->getRemitList($cond);
+        $list = $mod_remit->getRemitList($cond, 50);
         foreach ($list as $key => $value)
         {
             $list[$key]['amount'] = number_format($value['amount'],4,'.',',');

+ 1 - 1
admin/templates/default/merchant.edit.php

@@ -100,7 +100,7 @@
                     <select name="co_id" id="co_id">
                         <option value="">请选择...</option>
                         <?php foreach ($output['refill_company'] as $company){ ?>
-                            <option value="<?php echo $company['co_id'];?>" <?php if($output['provider']['co_id'] == $company['co_id']){ echo 'selected';}?>><?php echo $company['co_name'];?></option>
+                            <option value="<?php echo $company['co_id'];?>" <?php if($output['merchant']['co_id'] == $company['co_id']){ echo 'selected';}?>><?php echo $company['co_name'];?></option>
                         <?php }?>
                     </select>
                 </td>

+ 10 - 0
admin/templates/default/merchant.index.php

@@ -84,6 +84,11 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                         <th class="align-left">绑定公司名称</th>
                         <th class="align-right">所剩余额</th>
                         <th class="align-right">授信额度</th>
+
+                        <th class="align-right">欠款金额</th>
+                        <th class="align-right">充值中金额</th>
+                        <th class="align-right">充值中可能成功金额</th>
+
                         <th class="align-right">预警余额</th>
                         <th class="align-center">机构状态</th>
                         <th class="align-left">上次登录ip</th>
@@ -115,6 +120,11 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                                                 </span>
                                     </td>
                                     <td class="align-right"><?php echo $v['credit_bonus']; ?></td>
+
+                                    <td class="align-right"><?php echo number_format($v['debt']['debt'],2,'.',''); ?></td>
+                                    <td class="align-right"><?php echo $v['debt']['send_amounts']; ?></td>
+                                    <td class="align-right"><?php echo $v['debt']['lack_amounts']; ?></td>
+
                                     <td class="align-right"><?php echo $v['alarm_amount']; ?></td>
                                     <td class="align-center">
                                         <?php if ($v['merchant_state'] == 1) { ?>

+ 6 - 3
admin/templates/default/refill.company.php

@@ -67,7 +67,9 @@
                 <th>记录ID</th>
                 <th>公司名称</th>
                 <th>公司类型</th>
-                <th>最大欠款额度</th>
+                <th class="align-right">最大欠款额度</th>
+                <th class="align-right">欠款总额</th>
+
                 <th class="align-left">收款银行名称</th>
                 <th class="align-left">开户人名称</th>
                 <th class="align-left">收款卡号</th>
@@ -87,7 +89,8 @@
                         <td><?php echo $v['co_id']; ?></td>
                         <td><?php echo $v['co_name']; ?></td>
                         <td><?php echo $v['co_type']; ?></td>
-                        <td><?php echo $v['max_debt'] ?? '0'; ?></td>
+                        <td class="align-right"><?php echo $v['max_debt'] ?? '0'; ?></td>
+                        <td class="align-right"><?php echo $v['debt']; ?></td>
                         <td class="align-left"><?php echo $v['bank_name']; ?></td>
                         <td class="align-left"><?php echo $v['bank_username']; ?></td>
                         <td class="align-left"><?php echo $v['bank_card_no']; ?></td>
@@ -125,7 +128,7 @@
             <tr class="tfoot">
                 <td></td>
                 <td colspan="13">
-                    <div class="pagination"><?php echo $output['page']; ?></div>
+                    <div class="pagination"><?php echo $output['show_page']; ?></div>
                 </td>
             </tr>
             </tfoot>

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


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

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.15, "4-20-2" => 19.92, "4-30-2" => 29.94, "4-50-2" => 49.9, "4-100-2" => 99.8, "4-200-2" => 199.6, "4-300-2" => 299.4, "4-500-2" => 499,//天津 2
-        "4-10-6" => 9.85, "4-20-6" => 19.7, "4-30-6" => 29.55, "4-50-6" => 49.25, "4-100-6" => 98.5, "4-200-6" => 197, "4-300-6" => 295.5, "4-500-6" => 492.5,//辽宁 6
+        "4-10-6" => 9.8, "4-20-6" => 19.6, "4-30-6" => 29.4, "4-50-6" => 49, "4-100-6" => 98, "4-200-6" => 196, "4-300-6" => 294, "4-500-6" => 490,//辽宁 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.015, "4-20-8" => 20.03, "4-30-8" => 30.045, "4-50-8" => 50.075, "4-100-8" => 100.15, "4-200-8" => 200.3, "4-300-8" => 300.9, "4-500-8" => 501.5,//黑龙江 8
         "4-10-29" => 9.78, "4-20-29" => 19.56, "4-30-29" => 29.34, "4-50-29" => 48.9, "4-100-29" => 97.8, "4-200-29" => 195.6, "4-300-29" => 293.4, "4-500-29" => 489,//青海 29

+ 1 - 1
helper/refill/api/yl/guochuang/config.php

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.15, "4-20-2" => 19.92, "4-30-2" => 29.94, "4-50-2" => 49.9, "4-100-2" => 99.8, "4-200-2" => 199.6, "4-300-2" => 299.4, "4-500-2" => 499,//天津 2
-        "4-10-6" => 9.85, "4-20-6" => 19.7, "4-30-6" => 29.55, "4-50-6" => 49.25, "4-100-6" => 98.5, "4-200-6" => 197, "4-300-6" => 295.5, "4-500-6" => 492.5,//辽宁 6
+        "4-10-6" => 9.8, "4-20-6" => 19.6, "4-30-6" => 29.4, "4-50-6" => 49, "4-100-6" => 98, "4-200-6" => 196, "4-300-6" => 294, "4-500-6" => 490,//辽宁 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.015, "4-20-8" => 20.03, "4-30-8" => 30.045, "4-50-8" => 50.075, "4-100-8" => 100.15, "4-200-8" => 200.3, "4-300-8" => 300.9, "4-500-8" => 501.5,//黑龙江 8
         "4-10-29" => 9.78, "4-20-29" => 19.56, "4-30-29" => 29.34, "4-50-29" => 48.9, "4-100-29" => 97.8, "4-200-29" => 195.6, "4-300-29" => 293.4, "4-500-29" => 489,//青海 29