Commit 1169d610 authored by zhuwei's avatar zhuwei

模型名称修改

parent 505e4d51
No preview for this file type
......@@ -5,15 +5,15 @@ namespace app\model;
use think\Db;
class UPhoneFollowPp extends BaseModel
class UPhoneFollowUp extends BaseModel
{
protected $table = 'u_phone_follow_up';
protected $UPhoneFollowPp;
protected $UPhoneFollowUp;
function __construct($site_id)
{
$this->UPhoneFollowPp = Db($this->table."_".$site_id);
$this->UPhoneFollowUp = Db($this->table."_".$site_id);
}
/**
......@@ -51,7 +51,7 @@ class UPhoneFollowPp extends BaseModel
if (isset($params["disc"])) {
$arr["disc"] = $params["disc"];
}
$result = $this->UPhoneFollowPp->insert($arr);
$result = $this->UPhoneFollowUp->insert($arr);
return $result;
}
......@@ -70,7 +70,7 @@ class UPhoneFollowPp extends BaseModel
*/
public function getSearch($p = 1, $pageSize = 15, $order_ = 'id desc', $field, $join, $where, $group)
{
$r = $this->UPhoneFollowPp->field($field)
$r = $this->UPhoneFollowUp->field($field)
->alias('f')
->join($join)
->where($where)
......@@ -92,7 +92,7 @@ class UPhoneFollowPp extends BaseModel
public function getUserAgentTotal($params, $join)
{
$result = $this->UPhoneFollowPp->alias('f')
$result = $this->UPhoneFollowUp->alias('f')
->join($join)
->where($params)->count();
return $result;
......@@ -106,19 +106,19 @@ class UPhoneFollowPp extends BaseModel
public function select_useraction_search($user_id, $searchdate)
{
if ($searchdate) {
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->where('user_id', $user_id)
->where('content', $searchdate)
->order('create_time', 'desc')
->select();
} else {
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->where('user_id', $user_id)
->order('create_time', 'desc')
->select();
}
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
/*zw start**/
......@@ -132,7 +132,7 @@ class UPhoneFollowPp extends BaseModel
if (isset($params["type"])) {
$where_["a.type"] = $params["type"];
}
$result = $this->UPhoneFollowPp
$result = $this->UPhoneFollowUp
->field($field)
->alias("a")
->join("a_agents b", "a.agent_id = b.id", "left")
......@@ -151,7 +151,7 @@ class UPhoneFollowPp extends BaseModel
if (isset($params["user_id"])) {
$where_["a.user_id"] = $params["user_id"];
}
$result = $this->UPhoneFollowPp
$result = $this->UPhoneFollowUp
->field($field)
->alias("a")
->join("a_agents b", "a.agent_id = b.id", "left")
......@@ -169,26 +169,26 @@ class UPhoneFollowPp extends BaseModel
public function phone_up_list($pagesize, $pagenum)
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->order('create_time', 'desc')
->limit($pagesize)
->page($pagenum)
->select();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
public function phone_up_list_count()
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->count();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
public function all_user_search($searchdate, $pagesize, $pagenum)
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->field('a.*,b.vip')
->alias('a')
->join('u_users b','a.user_id = b.id', 'left')
......@@ -197,15 +197,15 @@ class UPhoneFollowPp extends BaseModel
->limit($pagesize)
->page($pagenum)
->select();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
public function all_user_search_count($searchdate)
{
$UPhoneFollowPp_res = $this->UPhoneFollowPp
$UPhoneFollowUp_res = $this->UPhoneFollowUp
->where('content', 'like', "%$searchdate%")
->count();
return $UPhoneFollowPp_res;
return $UPhoneFollowUp_res;
}
/**
......@@ -222,7 +222,7 @@ class UPhoneFollowPp extends BaseModel
* @throws \think\exception\DbException
*/
public function getFollowList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
return $this->UPhoneFollowPp->field($field)
return $this->UPhoneFollowUp->field($field)
->where($params)
->order($order_)
->limit($pageSize)
......@@ -238,12 +238,12 @@ class UPhoneFollowPp extends BaseModel
*/
public function getFollowTotal($params)
{
return $this->UPhoneFollowPp->where($params)
return $this->UPhoneFollowUp->where($params)
->count();
}
public function getUserFollowKey($field, $where, $order = 'id asc') {
return $this->UPhoneFollowPp->where($where)
return $this->UPhoneFollowUp->where($where)
->order($order)
->value($field);
}
......@@ -252,7 +252,7 @@ class UPhoneFollowPp extends BaseModel
public function getLastOrNextUserIDPhoneFollowP($where, $field, $limit, $order)
{
$return = $this->UPhoneFollowPp
$return = $this->UPhoneFollowUp
->field($field)
->alias('a')
->join('u_users b','a.user_id = b.id', 'left')
......@@ -286,7 +286,7 @@ class UPhoneFollowPp extends BaseModel
$data['user_id'] = $user_id;
$data['content'] = $content;
$data['type'] = $type;
return $this->UPhoneFollowPp->insertGetId($data);
return $this->UPhoneFollowUp->insertGetId($data);
}
public function getLastPhoneFollowTime($user_id)
......@@ -298,12 +298,12 @@ class UPhoneFollowPp extends BaseModel
$field = 'create_time';
$order = 'id desc';
$limit = 1;
$return = $this->UPhoneFollowPp
->field($field)
->where($arr)
->limit($limit)
->order($order)
->select();
$return = $this->UPhoneFollowUp
->field($field)
->where($arr)
->limit($limit)
->order($order)
->select();
//echo $this->getLastSql();
return $return;
......@@ -315,7 +315,7 @@ class UPhoneFollowPp extends BaseModel
*/
public function getPhoneFollowData($field,$params,$order)
{
$result = $this->UPhoneFollowPp
$result = $this->UPhoneFollowUp
->field($field)
->order($order)
->where($params)
......
No preview for this file type
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