Commit 1169d610 authored by zhuwei's avatar zhuwei

模型名称修改

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