|
@@ -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);
|