edit-api-order_time and filter customer

This commit is contained in:
lccsw
2021-11-01 10:00:35 +08:00
parent 68a72d531f
commit 5fdcca327a
3 changed files with 9 additions and 5 deletions
+4 -2
View File
@@ -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);
+3 -1
View File
@@ -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]);
+2 -2
View File
@@ -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);