Commit 0ca19c32 authored by hujun's avatar hujun

name

parent 22a14a6d
...@@ -163,8 +163,8 @@ class Label extends Basic ...@@ -163,8 +163,8 @@ class Label extends Basic
if (empty($this->params['user_id'])) { if (empty($this->params['user_id'])) {
return $this->response(101, '没有用户信息'); return $this->response(101, '没有用户信息');
} }
$follow = new UPhoneFollowUpTemporary($this->siteId); $follow_temp = new UPhoneFollowUpTemporary($this->siteId);
$user_status = $follow->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC'); $user_status = $follow_temp->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC');
if (empty($user_status)) { if (empty($user_status)) {
$follow = new UPhoneFollowUp($this->siteId); $follow = new UPhoneFollowUp($this->siteId);
$user_status = $follow->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC'); $user_status = $follow->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC');
......
...@@ -190,7 +190,18 @@ class UPhoneFollowUpTemporary extends BaseModel ...@@ -190,7 +190,18 @@ class UPhoneFollowUpTemporary extends BaseModel
return $this->follow_up->execute($sql); return $this->follow_up->execute($sql);
} }
public function getFollowListV3($site_id,$pageNo = 1, $pageSize = 15, $where, $filed = '`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`') { /**
* @param $site_id
* @param int $pageNo
* @param int $pageSize
* @param $where
* @param string $filed
* @return false|null|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getFollowListV3($site_id, $pageNo, $pageSize, $where, $filed = '`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`') {
if(!$this->createTable()){ if(!$this->createTable()){
return null; return null;
} }
...@@ -206,11 +217,17 @@ class UPhoneFollowUpTemporary extends BaseModel ...@@ -206,11 +217,17 @@ class UPhoneFollowUpTemporary extends BaseModel
} }
/**
* @param $field
* @param $where
* @param string $order
* @return null
*/
public function getUserFollowKey($field, $where, $order = 'id asc') { public function getUserFollowKey($field, $where, $order = 'id asc') {
if(!$this->createTable()){ if(!$this->createTable()){
return null; return null;
} }
return $this->UPhoneFollowUp->where($where) return $this->follow_up->where($where)
->order($order) ->order($order)
->value($field); ->value($field);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment