Browse Source

cbproxy buyback

haru haru 2 years atrás
parent
commit
46cc4281ef
2 changed files with 10 additions and 4 deletions
  1. 9 4
      admin/control/refill_order_manual.php
  2. 1 0
      data/config/win/base.ini.php

+ 9 - 4
admin/control/refill_order_manual.php

@@ -172,7 +172,7 @@ class refill_order_manualControl extends SystemControl
         }
 
         $model_refill_order = Model('refill_order');
-        $orders = $model_refill_order->getMerchantOrderList($cond,'',0,'refill_order.*,vr_order.order_state,vr_order.buyer_id,vr_order.store_id','refill_order.order_id desc',2000);
+        $orders = $model_refill_order->getMerchantOrderList($cond,'',0,'refill_order.*,vr_order.order_state,vr_order.buyer_id,vr_order.store_id,vr_order.goods_id','refill_order.order_id desc',2000);
         if(empty($orders)) {
             showMessage('操作数据为空');
         }
@@ -256,6 +256,7 @@ class refill_order_manualControl extends SystemControl
             $provider_amount = [];
             foreach ($orders as $order)
             {
+                $cbproxy = false;
                 $order_id = intval($order['order_id']);
                 if (algorithm::binary_search($buyback_ids, $order_id)) continue;
 
@@ -267,8 +268,12 @@ class refill_order_manualControl extends SystemControl
                 $provider_info = $providers[$store_id];
                 $account_id = $provider_info['account_id'];
                 if (empty($mchid) || empty($buyer_id) || empty($store_id) || empty($account_id)) {
-                    Log::record("refill order manual err order_id:{$order_id}, order_sn:{$order['order_sn']}");
-                    continue;
+                    if($order['channel_name'] === 'cbproxy' && $order['goods_id'] == ZERO_GOODS_ID) {
+                        $cbproxy = true;
+                    }else{
+                        Log::record("refill order manual err order_id:{$order_id}, order_sn:{$order['order_sn']}");
+                        continue;
+                    }
                 }
 
                 try
@@ -300,7 +305,7 @@ class refill_order_manualControl extends SystemControl
                         }
                     }
 
-                    if($ret)
+                    if($ret && !$cbproxy)
                     {
                         $provider_bz = "通道:{$store_id},椰子单号:{$order['order_sn']},卡号:{$order['card_no']},返销退款:{$order['channel_amount']}";
                         $this->credit_save_money($order['channel_amount'], 'add', $account_id, $provider_bz);

+ 1 - 0
data/config/win/base.ini.php

@@ -13,6 +13,7 @@ define('CROSS_DOAMIN',true);
 define('COOKIE_DOMAIN','192.168.1.218');
 define('COMPANY_NAME', 'XYZ_COMPANY');
 define('NET_IP','123.117.109.96');
+define('ZERO_GOODS_ID', 6666);
 define('ADMIN_NAME', 'YELIN');
 
 $SRV_HOST = 'http://192.168.1.218';