edit-api-order_time and filter customer
This commit is contained in:
@@ -42,6 +42,7 @@ class Cusorder extends Wxapp{
|
||||
$this->load->model('sys/sys_finance_model');
|
||||
|
||||
$this->load->library('receiver/orders_entity');
|
||||
$this->load->library('receiver/customers_entity');
|
||||
}
|
||||
|
||||
protected function get(){
|
||||
@@ -205,8 +206,9 @@ class Cusorder extends Wxapp{
|
||||
}
|
||||
|
||||
//更新客户下单时间
|
||||
$this->customers_model->update(array('order_time' => strtotime('now')),['id'=>$cus_id]);
|
||||
|
||||
$this->customers_model->update(array('order_time' => date('Y-m-d H:i:s')),['id'=>$cus_id]);
|
||||
$this->customers_entity->add_log($cus_id, $this->session['uid'], $this->session['uname'], "新增订单");
|
||||
|
||||
return ['id'=>$o_id];
|
||||
}else{
|
||||
throw new Exception('创建失败', ERR_PARAMS_ERROR);
|
||||
|
||||
@@ -34,6 +34,7 @@ class Cusorder2 extends Wxapp{
|
||||
$this->load->model('app/liche/app_liche_orders_model');
|
||||
|
||||
$this->load->library('receiver/orders_entity');
|
||||
$this->load->library('receiver/customers_entity');
|
||||
}
|
||||
|
||||
protected function get(){
|
||||
@@ -106,7 +107,8 @@ class Cusorder2 extends Wxapp{
|
||||
}
|
||||
|
||||
//更新客户下单时间
|
||||
$this->customers_model->update(array('order_time' => strtotime('now')),['id'=>$cus_id]);
|
||||
$this->customers_model->update(array('order_time' => date('Y-m-d H:i:s')),['id'=>$cus_id]);
|
||||
$this->customers_entity->add_log($cus_id, $this->session['uid'], $this->session['uname'], "新增订单");
|
||||
|
||||
//增加分销记录
|
||||
$this->load->library('entity/deal_entity',['app_id'=>1]);
|
||||
|
||||
@@ -427,8 +427,8 @@ class Customers extends Wxapp
|
||||
strlen($status) && $where['status'] = $status;
|
||||
$level && $where['level'] = $level;
|
||||
$cfrom && $where['cf_title'] = $cfrom;
|
||||
$name && $where['name'] = $name;
|
||||
$mobile && $where['mobile'] = $mobile;
|
||||
$name && $where["name like '%{$name}%'"] = null;
|
||||
$mobile && $where["mobile like '%$mobile%'"] = null;
|
||||
$cf_clues && $where['cf_clues'] = $cf_clues;
|
||||
|
||||
$count = $this->customers_model->count($where);
|
||||
|
||||
Reference in New Issue
Block a user