order
This commit is contained in:
@@ -402,13 +402,16 @@ class User extends Wxapp
|
||||
$s_month = date('Y-m-01', strtotime(date("Y-m-d"))) . ' 00:00:00';
|
||||
$e_month = date('Y-m-d', strtotime("$s_month +1 month -1 day")) . ' 23:59:59';
|
||||
//线索
|
||||
$where_today_xs = ['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status>=' => 0, 'c_time>=' => strtotime($s_today), 'c_time<=' => strtotime($e_today)];
|
||||
$where_month_xs = ['biz_id' => $biz_id, 'cs_biz_id<>' => -1, 'status>=' => 0, 'c_time>=' => strtotime($s_month), 'c_time<=' => strtotime($e_month)];
|
||||
$where_today_xs = ['biz_id' => $biz_id, 'status>=' => 0, 'c_time>=' => strtotime($s_today), 'c_time<=' => strtotime($e_today)];
|
||||
$where_month_xs = ['biz_id' => $biz_id, 'status>=' => 0, 'c_time>=' => strtotime($s_month), 'c_time<=' => strtotime($e_month)];
|
||||
//到店
|
||||
$where_today_dd = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
|
||||
$where_today_dd = ['biz_id' => $biz_id, 'status>=' => 0,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=4 and uid in({$str_uids}) and c_time>=" . strtotime($s_today) . " and c_time<=" . strtotime($e_today) . ")" => null];
|
||||
$where_month_dd = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
|
||||
$where_month_dd = ['biz_id' => $biz_id, 'status>=' => 0,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=4 and uid in({$str_uids}) and c_time>=" . strtotime($s_month) . " and c_time<=" . strtotime($e_month) . ")" => null];
|
||||
//订单
|
||||
$where_today_order = ['biz_id' => $biz_id, 'status>=' => 0, 'c_time>=' => strtotime($s_today), 'c_time<=' => strtotime($e_today)];
|
||||
$where_month_order = ['biz_id' => $biz_id, 'status>=' => 0, 'c_time>=' => strtotime($s_month), 'c_time<=' => strtotime($e_month)];
|
||||
//战败
|
||||
$where_today_defeat = ['biz_id' => $biz_id, 'status>=' => 0, 'cs_biz_id<>' => -1,
|
||||
"id in(select customer_id from lc_receiver_customer_oplogs where type=7 and uid in({$str_uids}) and c_time>=" . strtotime($s_today) . " and c_time<=" . strtotime($e_today) . ")" => null];
|
||||
@@ -423,8 +426,8 @@ class User extends Wxapp
|
||||
, 'month' => ['title' => '本月客户', 'value' => $this->customers_model->count($where_month_xs)]],
|
||||
['today' => ['title' => '今日', 'value' => $this->customers_model->count($where_today_dd), 'url' => '/pages/customer/filterList/index?status=5&visit=5&title=到店']
|
||||
, 'month' => ['title' => '本月到店', 'value' => $this->customers_model->count($where_month_dd)]],
|
||||
['today' => ['title' => '今日', 'value' => 0, 'url' => '/pages/order/filterList/index2?status=6&visit=6&title=订单']
|
||||
, 'month' => ['title' => '本月订单', 'value' => 0]],
|
||||
['today' => ['title' => '今日', 'value' => $this->orders_model->count($where_today_order), 'url' => '/pages/order/filterList/index2?status=6&visit=6&title=订单']
|
||||
, 'month' => ['title' => '本月订单', 'value' => $this->orders_model->count($where_month_order)]],
|
||||
['today' => ['title' => '今日', 'value' => $this->customers_model->count($where_today_defeat), 'url' => '/pages/customer/filterList/index?status=7&visit=7&title=战败']
|
||||
, 'month' => ['title' => '本月战败', 'value' => $this->customers_model->count($where_month_defeat)]]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user