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
5caafc4a
Commit
5caafc4a
authored
Jun 10, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a4316134
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
44 deletions
+26
-44
OfficeHomePageLog.php
application/api_broker/controller/OfficeHomePageLog.php
+0
-0
OfficePhoneFollowUpService.php
application/index/service/OfficePhoneFollowUpService.php
+2
-2
OfficeUPhoneFollowUp.php
application/model/OfficeUPhoneFollowUp.php
+11
-42
UPhoneFollowUpTemporary.php
application/model/UPhoneFollowUpTemporary.php
+10
-0
route.php
application/route.php
+3
-0
No files found.
application/api_broker/controller/OfficeHomePageLog.php
0 → 100644
View file @
5caafc4a
This diff is collapsed.
Click to expand it.
application/index/service/OfficePhoneFollowUpService.php
View file @
5caafc4a
...
@@ -11,7 +11,7 @@ namespace app\index\service;
...
@@ -11,7 +11,7 @@ namespace app\index\service;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\OfficePhoneFollowUp
;
use
app\model\OfficePhoneFollowUp
;
use
app\model\OfficeUPhoneFollowUp
Temporary
;
use
app\model\OfficeUPhoneFollowUp
;
class
OfficePhoneFollowUpService
class
OfficePhoneFollowUpService
{
{
...
@@ -23,7 +23,7 @@ class OfficePhoneFollowUpService
...
@@ -23,7 +23,7 @@ class OfficePhoneFollowUpService
{
{
$this
->
siteId
=
$site_id
;
$this
->
siteId
=
$site_id
;
$this
->
phoneFollowUp
=
new
OfficePhoneFollowUp
(
$site_id
);
$this
->
phoneFollowUp
=
new
OfficePhoneFollowUp
(
$site_id
);
$this
->
phoneFollowUpTemporary
=
new
OfficeUPhoneFollowUp
Temporary
(
$site_id
);
$this
->
phoneFollowUpTemporary
=
new
OfficeUPhoneFollowUp
(
$site_id
);
}
}
/**
/**
...
...
application/model/OfficeUPhoneFollowUp
Temporary
.php
→
application/model/OfficeUPhoneFollowUp.php
100755 → 100644
View file @
5caafc4a
...
@@ -9,30 +9,20 @@ use app\task\controller\FollowUpTask;
...
@@ -9,30 +9,20 @@ use app\task\controller\FollowUpTask;
use
think\Db
;
use
think\Db
;
class
OfficeUPhoneFollowUp
Temporary
extends
BaseModel
class
OfficeUPhoneFollowUp
extends
BaseModel
{
{
protected
$table
=
'office_u_phone_follow_up'
;
protected
$table
=
'office_u_phone_follow_up'
;
protected
$follow_up
;
protected
$follow_up
;
protected
$siteId
;
protected
$siteId
;
protected
$table_name_string
;
function
__construct
(
$site_id
)
function
__construct
(
$site_id
)
{
{
$date
=
date
(
"Y-m-d"
,
time
());
$date
=
date
(
"Y-m-d"
,
time
());
$this
->
follow_up
=
Db
(
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
);
$this
->
follow_up
=
Db
(
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
);
$this
->
siteId
=
$site_id
;
$this
->
siteId
=
$site_id
;
$this
->
table_name_string
=
'`'
.
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
.
'`'
;
}
}
public
function
createTable
(){
$date
=
date
(
"Y-m-d"
,
time
());
$t_follow_up_task
=
new
FollowUpTask
();
if
(
!
$t_follow_up_task
->
isExistTable
(
$date
,
$this
->
siteId
)){
return
false
;
}
return
true
;
}
/**
/**
* 新增电话跟进-插入数据
* 新增电话跟进-插入数据
...
@@ -40,10 +30,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -40,10 +30,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
* @return int|string
* @return int|string
*/
*/
public
function
savePhoneFollow
(
$params
)
{
public
function
savePhoneFollow
(
$params
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$arr
=
[];
$arr
=
[];
if
(
isset
(
$params
[
"content"
]))
{
if
(
isset
(
$params
[
"content"
]))
{
$arr
[
"content"
]
=
$params
[
"content"
];
$arr
[
"content"
]
=
$params
[
"content"
];
...
@@ -84,6 +70,16 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -84,6 +70,16 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
$city
=
'深圳市'
;
$city
=
'深圳市'
;
$disc
=
'罗湖区'
;
$disc
=
'罗湖区'
;
break
;
break
;
case
10004
:
$province
=
'广东省'
;
$city
=
'广州市'
;
$disc
=
'黄埔区'
;
break
;
case
10005
:
$province
=
'北京市'
;
$city
=
'北京市'
;
$disc
=
'朝阳区'
;
break
;
default
:
default
:
$province
=
'上海市'
;
$province
=
'上海市'
;
$city
=
'上海市'
;
$city
=
'上海市'
;
...
@@ -104,9 +100,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -104,9 +100,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
}
}
public
function
getFollowList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
public
function
getFollowList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
return
$this
->
follow_up
->
field
(
$field
)
return
$this
->
follow_up
->
field
(
$field
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
...
@@ -117,9 +110,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -117,9 +110,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
public
function
getFollowUpList
(
$field
,
$params
,
$page_no
,
$page_size
)
public
function
getFollowUpList
(
$field
,
$params
,
$page_no
,
$page_size
)
{
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$where_
=
[];
$where_
=
[];
if
(
isset
(
$params
[
"user_id"
]))
{
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
...
@@ -139,9 +129,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -139,9 +129,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
}
}
public
function
getFollowUpListByUserId
(
$field
,
$params
)
public
function
getFollowUpListByUserId
(
$field
,
$params
)
{
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$where_
=
[];
$where_
=
[];
if
(
isset
(
$params
[
"user_id"
]))
{
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
...
@@ -171,9 +158,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -171,9 +158,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
* @return int|string
* @return int|string
*/
*/
public
function
insertDefaultFollow
(
$agent_id
,
$user_id
,
$content
,
$type
)
{
public
function
insertDefaultFollow
(
$agent_id
,
$user_id
,
$content
,
$type
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$data
[
'agent_id'
]
=
$agent_id
;
$data
[
'agent_id'
]
=
$agent_id
;
$data
[
'user_id'
]
=
$user_id
;
$data
[
'user_id'
]
=
$user_id
;
$data
[
'content'
]
=
$content
;
$data
[
'content'
]
=
$content
;
...
@@ -189,9 +173,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -189,9 +173,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
*/
*/
public
function
getFollowTotal
(
$params
)
public
function
getFollowTotal
(
$params
)
{
{
if
(
!
$this
->
createTable
()){
return
null
;
}
return
$this
->
follow_up
->
where
(
$params
)
return
$this
->
follow_up
->
where
(
$params
)
->
count
();
->
count
();
}
}
...
@@ -202,9 +183,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -202,9 +183,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
*/
*/
public
function
getPhoneFollowData
(
$field
,
$params
,
$order
)
public
function
getPhoneFollowData
(
$field
,
$params
,
$order
)
{
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$result
=
$this
->
follow_up
$result
=
$this
->
follow_up
->
field
(
$field
)
->
field
(
$field
)
->
order
(
$order
)
->
order
(
$order
)
...
@@ -216,9 +194,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -216,9 +194,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
}
}
public
function
getFollowListV2
(
$site_id
,
$pageNo
=
1
,
$pageSize
=
15
,
$where
,
$filed
=
'`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`'
)
{
public
function
getFollowListV2
(
$site_id
,
$pageNo
=
1
,
$pageSize
=
15
,
$where
,
$filed
=
'`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`'
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$start_index
=
(
$pageNo
-
1
)
*
$pageSize
;
$start_index
=
(
$pageNo
-
1
)
*
$pageSize
;
$sql
=
"SELECT * FROM
$sql
=
"SELECT * FROM
((SELECT
((SELECT
...
@@ -251,9 +226,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -251,9 +226,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getFollowListV3
(
$site_id
,
$pageNo
,
$pageSize
,
$where
,
$field
=
'`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`'
)
{
public
function
getFollowListV3
(
$site_id
,
$pageNo
,
$pageSize
,
$where
,
$field
=
'`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`'
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$sql
=
Db
::
table
(
'u_phone_follow_up_'
.
$site_id
)
->
field
(
$field
)
->
order
(
'id desc'
)
->
where
(
$where
)
->
buildSql
();
$sql
=
Db
::
table
(
'u_phone_follow_up_'
.
$site_id
)
->
field
(
$field
)
->
order
(
'id desc'
)
->
where
(
$where
)
->
buildSql
();
$sql_string
=
$this
->
table
(
$this
->
table_name_string
)
->
field
(
$field
)
->
where
(
$where
)
->
union
([
$sql
],
true
)
->
buildSql
();
$sql_string
=
$this
->
table
(
$this
->
table_name_string
)
->
field
(
$field
)
->
where
(
$where
)
->
union
([
$sql
],
true
)
->
buildSql
();
$data
=
Db
::
table
(
$sql_string
.
' a'
)
$data
=
Db
::
table
(
$sql_string
.
' a'
)
...
@@ -274,9 +246,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
...
@@ -274,9 +246,6 @@ class OfficeUPhoneFollowUpTemporary extends BaseModel
* @return null
* @return null
*/
*/
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'id asc'
)
{
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'id asc'
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
return
$this
->
follow_up
->
where
(
$where
)
return
$this
->
follow_up
->
where
(
$where
)
->
order
(
$order
)
->
order
(
$order
)
->
value
(
$field
);
->
value
(
$field
);
...
...
application/model/UPhoneFollowUpTemporary.php
View file @
5caafc4a
...
@@ -84,6 +84,16 @@ class UPhoneFollowUpTemporary extends BaseModel
...
@@ -84,6 +84,16 @@ class UPhoneFollowUpTemporary extends BaseModel
$city
=
'深圳市'
;
$city
=
'深圳市'
;
$disc
=
'罗湖区'
;
$disc
=
'罗湖区'
;
break
;
break
;
case
10004
:
$province
=
'广东省'
;
$city
=
'广州市'
;
$disc
=
'黄埔区'
;
break
;
case
10005
:
$province
=
'北京市'
;
$city
=
'北京市'
;
$disc
=
'朝阳区'
;
break
;
default
:
default
:
$province
=
'上海市'
;
$province
=
'上海市'
;
$city
=
'上海市'
;
$city
=
'上海市'
;
...
...
application/route.php
View file @
5caafc4a
...
@@ -1002,6 +1002,9 @@ Route::group('office', [
...
@@ -1002,6 +1002,9 @@ Route::group('office', [
'bargainListSearchBargainId'
=>
[
'api_broker/OfficeBargain/bargainListSearchBargainId'
,
[
'method'
=>
'POST|GET'
]],
'bargainListSearchBargainId'
=>
[
'api_broker/OfficeBargain/bargainListSearchBargainId'
,
[
'method'
=>
'POST|GET'
]],
'bargainMain'
=>
[
'api_broker/OfficeBargain/bargainList'
,
[
'method'
=>
'POST|GET'
]],
'bargainMain'
=>
[
'api_broker/OfficeBargain/bargainList'
,
[
'method'
=>
'POST|GET'
]],
'bargainMainV2'
=>
[
'api_broker/OfficeBargain/bargainListV2'
,
[
'method'
=>
'POST|GET'
]],
'bargainMainV2'
=>
[
'api_broker/OfficeBargain/bargainListV2'
,
[
'method'
=>
'POST|GET'
]],
'userFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/userFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
'houseFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/houseFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
]);
]);
Route
::
group
(
'office_index'
,
[
Route
::
group
(
'office_index'
,
[
...
...
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