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
3b6d628b
Commit
3b6d628b
authored
Jan 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql
parent
e7be63f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+1
-1
PhoneFollowUpService.php
application/index/service/PhoneFollowUpService.php
+1
-1
UPhoneFollowUpTemporary.php
application/model/UPhoneFollowUpTemporary.php
+23
-8
No files found.
application/api_broker/controller/HomePageLog.php
View file @
3b6d628b
...
...
@@ -121,7 +121,7 @@ class HomePageLog extends Basic
big_log
(
json_encode
(
$where_
));
$result
=
$this
->
phoneFollowUpTemporary
->
getFollowList
(
$pageNo
,
$pageSize
,
$order_
=
'id desc'
,
$field
,
$where_
);
}
else
{
$result
=
$this
->
phoneFollowUpTemporary
->
getFollowListV
2
(
$this
->
siteId
,
$pageNo
,
$pageSize
,
$where
,
$field
);
$result
=
$this
->
phoneFollowUpTemporary
->
getFollowListV
3
(
$this
->
siteId
,
$pageNo
,
$pageSize
,
$where
,
$field
);
}
$clientService
=
new
ClientService
();
foreach
(
$result
as
$key
=>
$value
)
{
...
...
application/index/service/PhoneFollowUpService.php
View file @
3b6d628b
...
...
@@ -106,7 +106,7 @@ class PhoneFollowUpService
if
(
$start_time
>=
$date
&&
$start_time
<=
$date
.
" 23:59:59"
)
{
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
}
else
{
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowListV
2
(
$this
->
siteId
,
$page_no
,
$page_size
,
$where
,
$field
);
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowListV
3
(
$this
->
siteId
,
$page_no
,
$page_size
,
$where
,
$field
);
}
$s_user_service
=
new
UserService
();
...
...
application/model/UPhoneFollowUpTemporary.php
View file @
3b6d628b
...
...
@@ -13,14 +13,15 @@ class UPhoneFollowUpTemporary extends BaseModel
{
protected
$table
=
'u_phone_follow_up'
;
protected
$
UPhoneFollowU
p
;
protected
$
follow_u
p
;
protected
$siteId
;
protected
$table_name_string
;
function
__construct
(
$site_id
)
{
$site_id
=
10001
;
$date
=
date
(
"Y-m-d"
,
time
());
$this
->
UPhoneFollowU
p
=
Db
(
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
);
$this
->
follow_u
p
=
Db
(
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
);
$this
->
siteId
=
$site_id
;
$this
->
table_name_string
=
'`'
.
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
.
'`'
;
}
...
...
@@ -83,12 +84,12 @@ class UPhoneFollowUpTemporary extends BaseModel
$arr
[
"disc"
]
=
'黄埔区'
;
}
$result
=
$this
->
UPhoneFollowU
p
->
insert
(
$arr
);
$result
=
$this
->
follow_u
p
->
insert
(
$arr
);
return
$result
;
}
public
function
getFollowList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
UPhoneFollowU
p
->
field
(
$field
)
return
$this
->
follow_u
p
->
field
(
$field
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
...
...
@@ -110,7 +111,7 @@ class UPhoneFollowUpTemporary extends BaseModel
$data
[
'user_id'
]
=
$user_id
;
$data
[
'content'
]
=
$content
;
$data
[
'type'
]
=
$type
;
return
$this
->
UPhoneFollowU
p
->
insertGetId
(
$data
);
return
$this
->
follow_u
p
->
insertGetId
(
$data
);
}
/**
...
...
@@ -121,7 +122,7 @@ class UPhoneFollowUpTemporary extends BaseModel
*/
public
function
getFollowTotal
(
$params
)
{
return
$this
->
UPhoneFollowU
p
->
where
(
$params
)
return
$this
->
follow_u
p
->
where
(
$params
)
->
count
();
}
...
...
@@ -131,7 +132,7 @@ class UPhoneFollowUpTemporary extends BaseModel
*/
public
function
getPhoneFollowData
(
$field
,
$params
,
$order
)
{
$result
=
$this
->
UPhoneFollowU
p
$result
=
$this
->
follow_u
p
->
field
(
$field
)
->
order
(
$order
)
->
where
(
$params
)
...
...
@@ -159,7 +160,21 @@ class UPhoneFollowUpTemporary extends BaseModel
$where
) ) as aa ORDER BY `id` DESC limit
$start_index
,
$pageSize
"
;
return
$this
->
UPhoneFollowUp
->
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`'
)
{
$sql
=
$this
->
follow_up
->
field
(
$filed
)
->
where
(
$where
)
->
buildSql
();
$sql_temp
=
$this
->
follow_up
->
table
(
'u_phone_follow_up_'
.
$site_id
)
->
field
(
$filed
)
->
where
(
$where
)
->
buildSql
();
$sql_string
=
$this
->
table
(
$this
->
table_name_string
)
->
field
(
$filed
)
->
where
(
$where
)
->
union
(
$sql
,
$sql_temp
)
->
buildSql
();
$data
=
Db
::
table
(
$sql_string
.
' a'
)
->
where
(
$where
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$data
;
}
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'id asc'
)
{
...
...
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