|
@@ -101,7 +101,12 @@ class OrderDayStatService
|
|
|
{
|
|
|
$channel_merchant_recharge_amount = DB::select("select sum(price) amount from orders join pay_merchants on pay_merchants.id=orders.pay_merchant_id where orders.distribution_channel_id = '{$distribution_channel_id}' and orders.created_at > '{$date}' and orders.created_at <= '{$end_time}' and orders.status ='PAID' and pay_merchants.is_self_channel <> 1 and orders.pay_merchant_id not in (44,41)");//pay_merchant_id in ({$not_in_pay_merchant_ids})
|
|
|
}
|
|
|
- $data['channel_merchant_recharge_amount'] = (float)$channel_merchant_recharge_amount[0]->amount;
|
|
|
+
|
|
|
+ if(isset($channel_merchant_recharge_amount[0]->amount)){
|
|
|
+ $data['channel_merchant_recharge_amount'] = (float)$channel_merchant_recharge_amount[0]->amount;
|
|
|
+ }else{
|
|
|
+ $data['channel_merchant_recharge_amount'] = 0;
|
|
|
+ }
|
|
|
|
|
|
//首充数据
|
|
|
$first_recharge_data = OrderService::getChannelDayFirstRechargeData($distribution_channel_id,$date);
|