From 88debfefb1898cdac581a77d839b6d4e5dcd5d68 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Fri, 25 Mar 2022 09:28:51 +0800 Subject: [PATCH] edit-commit-robot --- common/libraries/Qyrobot.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/common/libraries/Qyrobot.php b/common/libraries/Qyrobot.php index 1b2c72cf..bdf64ebc 100644 --- a/common/libraries/Qyrobot.php +++ b/common/libraries/Qyrobot.php @@ -177,6 +177,29 @@ class Qyrobot{ $today_count = $today_query['total']; $month_count = $month_query['total']; + //旧支付信息 + $where = [ + 'type' => 1, + 'status' => 1, + 'pay_price>=' => 100 + ]; + $where["pay_time>="] = date('Y-m-d 00:00:00'); + $old_today_count = $this->ci->app_liche_orders_model->count($where);//今日成交订单数 + $where['pay_time>='] = date('Y-m-01 00:00:00'); + $old_month_count = $this->ci->app_liche_orders_model->count($where);//本月成交订单数 + + //意向金等于定金的支付订单 + $sql = "select count(*) as total from lc_app_liche_orders as a left join lc_receiver_orders as b on a.o_id=b.id where a.total_price=b.deposit and a.type=4 and a.status=1 and a.pay_price>=50 and a.pay_time>='".date('Y-m-d 00:00:00')."'"; + $old_today_query = $this->ci->db->query($sql)->row_array(); + $sql = "select count(*) as total from lc_app_liche_orders as a left join lc_receiver_orders as b on a.o_id=b.id where a.total_price=b.deposit and a.type=4 and a.status=1 and a.pay_price>=50 and a.pay_time>='".date('Y-m-01 00:00:00')."'"; + $old_month_query = $this->ci->db->query($sql)->row_array(); + $old_today_query['total'] && $old_today_count += $old_today_query['total']; + $old_month_query['total'] && $old_month_count += $old_month_query['total']; + + $old_today_count && $today_count += $old_today_count; + $old_month_count && $month_count += $old_month_count; + + $url = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key='.$this->key; $this->ci->load->library('mycurl'); $data = [