Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
6992ba55
Commit
6992ba55
authored
Oct 22, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进区分城市
parent
ff59b42a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
39 deletions
+17
-39
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+17
-39
No files found.
application/model/UPhoneFollowPp.php
View file @
6992ba55
...
@@ -81,7 +81,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -81,7 +81,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
->
field
(
$field
)
$r
=
$this
->
UPhoneFollowPp
->
field
(
$field
)
->
alias
(
'f'
)
->
alias
(
'f'
)
->
join
(
$join
)
->
join
(
$join
)
->
where
(
$where
)
->
where
(
$where
)
...
@@ -103,7 +103,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -103,7 +103,7 @@ class UPhoneFollowPp extends BaseModel
public
function
getUserAgentTotal
(
$params
,
$join
)
public
function
getUserAgentTotal
(
$params
,
$join
)
{
{
$result
=
$this
->
alias
(
'f'
)
$result
=
$this
->
UPhoneFollowPp
->
alias
(
'f'
)
->
join
(
$join
)
->
join
(
$join
)
->
where
(
$params
)
->
count
();
->
where
(
$params
)
->
count
();
return
$result
;
return
$result
;
...
@@ -117,27 +117,16 @@ class UPhoneFollowPp extends BaseModel
...
@@ -117,27 +117,16 @@ 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
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
$this
->
UPhoneFollowPp
->
where
(
'user_id'
,
$user_id
)
->
where
(
'user_id'
,
$user_id
)
->
where
(
'content'
,
$searchdate
)
->
where
(
'content'
,
$searchdate
)
->
order
(
'create_time'
,
'desc'
)
->
order
(
'create_time'
,
'desc'
)
//->limit($pagesize)
//->page($pagenum)
->
select
();
->
select
();
/*$total =$UPhoneFollowPp
->where('user_id',$user_id)
->where('content',$searchdate)
->count();*/
}
else
{
}
else
{
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
$this
->
UPhoneFollowPp
->
where
(
'user_id'
,
$user_id
)
->
where
(
'user_id'
,
$user_id
)
->
order
(
'create_time'
,
'desc'
)
->
order
(
'create_time'
,
'desc'
)
//->limit($pagesize)
//->page($pagenum)
->
select
();
->
select
();
/*$total =$UPhoneFollowPp
->where('user_id',$user_id)
->count();*/
}
}
return
$UPhoneFollowPp_res
;
return
$UPhoneFollowPp_res
;
...
@@ -153,7 +142,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -153,7 +142,7 @@ class UPhoneFollowPp extends BaseModel
if
(
isset
(
$params
[
"type"
]))
{
if
(
isset
(
$params
[
"type"
]))
{
$where_
[
"a.type"
]
=
$params
[
"type"
];
$where_
[
"a.type"
]
=
$params
[
"type"
];
}
}
$result
=
Db
::
name
(
$this
->
table
)
$result
=
$this
->
UPhoneFollowPp
->
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"
)
...
@@ -170,7 +159,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -170,7 +159,7 @@ class UPhoneFollowPp extends BaseModel
public
function
phone_up_list
(
$pagesize
,
$pagenum
)
public
function
phone_up_list
(
$pagesize
,
$pagenum
)
{
{
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
$this
->
UPhoneFollowPp
->
order
(
'create_time'
,
'desc'
)
->
order
(
'create_time'
,
'desc'
)
->
limit
(
$pagesize
)
->
limit
(
$pagesize
)
->
page
(
$pagenum
)
->
page
(
$pagenum
)
...
@@ -181,7 +170,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -181,7 +170,7 @@ class UPhoneFollowPp extends BaseModel
public
function
phone_up_list_count
()
public
function
phone_up_list_count
()
{
{
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
$this
->
UPhoneFollowPp
->
count
();
->
count
();
return
$UPhoneFollowPp_res
;
return
$UPhoneFollowPp_res
;
...
@@ -189,8 +178,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -189,8 +178,7 @@ class UPhoneFollowPp extends BaseModel
public
function
all_user_search
(
$searchdate
,
$pagesize
,
$pagenum
)
public
function
all_user_search
(
$searchdate
,
$pagesize
,
$pagenum
)
{
{
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
$this
->
UPhoneFollowPp
//->where('user_id',$user_id)
->
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'
)
...
@@ -199,25 +187,14 @@ class UPhoneFollowPp extends BaseModel
...
@@ -199,25 +187,14 @@ class UPhoneFollowPp extends BaseModel
->
limit
(
$pagesize
)
->
limit
(
$pagesize
)
->
page
(
$pagenum
)
->
page
(
$pagenum
)
->
select
();
->
select
();
/*$total =$UPhoneFollowPp
->where('user_id',$user_id)
->where('content',$searchdate)
->count();*/
return
$UPhoneFollowPp_res
;
return
$UPhoneFollowPp_res
;
}
}
public
function
all_user_search_count
(
$searchdate
)
public
function
all_user_search_count
(
$searchdate
)
{
{
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
$this
->
UPhoneFollowPp
//->where('user_id',$user_id)
->
where
(
'content'
,
'like'
,
"%
$searchdate
%"
)
->
where
(
'content'
,
'like'
,
"%
$searchdate
%"
)
//->limit($pagesize)
//->page($pagenum)
->
count
();
->
count
();
/*$total =$UPhoneFollowPp
->where('user_id',$user_id)
->where('content',$searchdate)
->count();*/
return
$UPhoneFollowPp_res
;
return
$UPhoneFollowPp_res
;
}
}
...
@@ -235,7 +212,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -235,7 +212,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
=
''
)
{
$data
=
$this
->
field
(
$field
)
$data
=
$this
->
UPhoneFollowPp
->
field
(
$field
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
...
@@ -283,12 +260,12 @@ class UPhoneFollowPp extends BaseModel
...
@@ -283,12 +260,12 @@ class UPhoneFollowPp extends BaseModel
*/
*/
public
function
getFollowTotal
(
$params
)
public
function
getFollowTotal
(
$params
)
{
{
return
$this
->
where
(
$params
)
return
$this
->
UPhoneFollowPp
->
where
(
$params
)
->
count
();
->
count
();
}
}
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'asc'
)
{
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'asc'
)
{
return
$this
->
where
(
$where
)
return
$this
->
UPhoneFollowPp
->
where
(
$where
)
->
order
(
$order
)
->
order
(
$order
)
->
value
(
$field
);
->
value
(
$field
);
}
}
...
@@ -297,7 +274,8 @@ class UPhoneFollowPp extends BaseModel
...
@@ -297,7 +274,8 @@ class UPhoneFollowPp extends BaseModel
public
function
getLastOrNextUserIDPhoneFollowP
(
$where
,
$field
,
$limit
,
$order
)
public
function
getLastOrNextUserIDPhoneFollowP
(
$where
,
$field
,
$limit
,
$order
)
{
{
$return
=
$this
->
field
(
$field
)
$return
=
$this
->
UPhoneFollowPp
->
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'
)
->
where
(
$where
)
->
where
(
$where
)
...
@@ -356,7 +334,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -356,7 +334,7 @@ class UPhoneFollowPp extends BaseModel
$field
=
'create_time'
;
$field
=
'create_time'
;
$order
=
'id desc'
;
$order
=
'id desc'
;
$limit
=
1
;
$limit
=
1
;
$return
=
Db
::
name
(
$this
->
table
)
$return
=
$this
->
UPhoneFollowPp
->
field
(
$field
)
->
field
(
$field
)
->
where
(
$arr
)
->
where
(
$arr
)
->
limit
(
$limit
)
->
limit
(
$limit
)
...
@@ -373,7 +351,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -373,7 +351,7 @@ class UPhoneFollowPp extends BaseModel
*/
*/
public
function
getPhoneFollow
(
$field
,
$params
)
public
function
getPhoneFollow
(
$field
,
$params
)
{
{
$result
=
Db
::
table
(
$this
->
table
)
$result
=
$this
->
UPhoneFollowPp
->
field
(
$field
)
->
field
(
$field
)
//->alias('a')
//->alias('a')
->
where
(
$params
)
->
where
(
$params
)
...
@@ -388,7 +366,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -388,7 +366,7 @@ class UPhoneFollowPp extends BaseModel
*/
*/
public
function
updatePhoneFollow
(
$params
)
public
function
updatePhoneFollow
(
$params
)
{
{
$result
=
$this
->
update
(
$params
);
$result
=
$this
->
UPhoneFollowPp
->
update
(
$params
);
//dump($this->getLastSql());
//dump($this->getLastSql());
return
$result
;
return
$result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment